EmbDev.net

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


Author: Jack Peacock (jakbird)
Posted on:

Rate this post
0 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

Author: Spencer Oliver (ntfreak)
Posted on:

Rate this post
0 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

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.