EmbDev.net

Forum: ARM programming with GCC/GNU tools Fragmented flash programming with STR750


von Jack P. (jakbird)


Rate this post
useful
not useful
I'm using Eclipse/GNU C/OpenOCD as the development environment, for the
STR750 controller.  The STR750 has two separate flash banks, with
non-contiguous addresses.  The main program code loads into bank 0, no
problem flashing it with OpenOCD.

In my C program I create a separate section for field modifiable
application parameter data to load into bank 1, using the _attribute_
((section(".infomem"))) qualifier on global declarations (no code, data
only in this section).  I would like to flash the ".infomem" section
into bank 1.

My question is how can I program both banks of flash from OpenOCD?  I
assume this will take two separate flash write commands, one to write
bank 0, and one for bank 1.  Does OpenOCD know from addressing in the
bin file where to place code/data in flash banks?  The loader file in
the build does assign the actual flash bank 1 base address to the
".infomem" section of code.
   Jack Peacock

von Spencer O. (ntfreak)


Rate this post
useful
not useful
> My question is how can I program both banks of flash from OpenOCD?  I
> assume this will take two separate flash write commands, one to write
> bank 0, and one for bank 1.  Does OpenOCD know from addressing in the
> bin file where to place code/data in flash banks?  The loader file in
> the build does assign the actual flash bank 1 base address to the
> ".infomem" section of code.
>    Jack Peacock

From a bin file it knows no information about addresses, but if you a
elf, hex or s19 then openocd will be able to use the flash write_image
command and will program both banks.

That's assuming the flash addresses are correct.

The flash config line for a str75x is:
flash bank str7x 0x20000000 0x000040000 0 0 0 STR75x

Cheers
Spen

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.