Topic : STR9 and IAP Driver

Forum : ARM

Original Post
Post Information Post
November 1, 2007 - 9:45am
Guest

Hello,

i'm new in working with the STR9. I'm using Resonance Reva v2.10 Starter Kit and STR912F Doughterbord. Ride is updated to BN746-P5.

So i wanted to try the example IAP Driver (AN2475) to test the possibilty of this "flash program". But it doesn't work. When i want to compile all the files i get the error message "expected '=',','... or '__attribute__' before void". The line "RAM_exe void Execute_STR9Application(void);" in header file common.h is meant with the previous define "#define RAM_exe __ramfunc".

So the function should be loaded to ram for remapping the bootbanks. But i don't know how i can configure this attributes to do that. If my understanding is right, i have to edit the linkerscript to make this attribute __ramfunc laoding to ram and execute from there?! I don't know how to do that. Hope anyone could help a newbie ...

regards...

Replies
Post Information Post
+1
0
-1
November 5, 2007 - 9:43am
Raisonance Support Team

Hi,

Are you sure the project you are using has been designed for GCC/RIDE?

If not, then you'll have to adapt it, or ask the person who wrote it.

Best Regards,

Vincent

+1
0
-1
November 5, 2007 - 12:27pm
Guest

hello,

i noticed that i tried to use an example which was build for IAR tools. On ST forum i found a fitted version for ride...now its working fine and i can boot from bank1 with the bootloader and flash bank0 with an external bin file by using UART (HyperTerminal).

For all who wants to do the same: It's very important not to remap the bootbanks in the application itselfs which should run in bank0 (for example you can comment out the bootbank mapping part in startup file)

best regards...

+1
0
-1
March 7, 2008 - 9:05pm
Guest

Hi,

I tried to port the IAP project from IAR to RIDE7 environment, but failed. guest_jeti, would it be possible if you can post the entire working IAP project here in this forum?

I also tried to program a simple blinking LED application into Bank 1 and boot from it. I think I could load the program, but couldn't run from it. Here is what I did:

1) Change the following flash bank parameters in the crt0_STR91x.s file:

ldr R0, =0x54000000 ;boot bank size
ldr R7, =0x0 ;32K
str R7, [R0]

ldr R0, =0x54000004 ;non boot bank size
ldr R1, =0x6 ;512K
str R1, [R0]

ldr R0, =0x5400000C ;boot bank address = Bank 1
ldr R1, =0x0 ;0x0
str R1, [R0]

ldr R0, =0x54000010 ;non boot bank address = Bank 0
ldr R1, =0x20000
str R1, [R0]

ldr R0, =0x54000018 ;enable Non Boot bank
ldr R1, =0x18
str R1, [R0]

2) Build the crt0_STR91x.s file
3) Include the newly compiled crt0_STR91x.o as the startup file into the blinking LED project
4) Build Project
5) Erase the full chip
6) Set boot bank to Bank 1
7) Download the program

When I hard reset the board, I think it is booting from Bank 1, but it is not blinking the LED! Anything I need to change other than the flash bank parameters in the crt0_STR91x.s startup file?? Thanks in advance

Regards,

+1
0
-1
March 10, 2008 - 9:17am
Guest

Did you see the STR9-specific options available in "Advanced ARM Options"->"Processor", such as "Flash bank selection" and "High bank address" ? They will select which bank to boot from, and the start address of the other bank. These options will probably help you, and you won't need to modify the default startup file.

Lionel