Berndt Josef Wulf wrote:
How do I find the top most address of flash used by applications at runtime? I

top most address: 0xfff0
the interrupt vectors are always there ;-)

want to load and execute applications under the control of a monitor program.

that probably means you want to use entire flash segments anyway.

Is there a symbol that can be queried for this purpose?

At this point of time, I only managed to do this by creating a section that is placed at the top flash memory address that can be queried by the application, see below:
...
Is this the way to do it or is there an easier way?

yes, i would place the mointor at the upper end of the memory (as you probably want to use the interrupt table anyway, at least for the reset). then when you only use entire flash segments, which makes sense if you want to erase some of them at runtime, you'll have to choose a size multiple of 512 bytes.

i used something like this in the serial<->jtag adapter, see mspgcc CVS/serJTAGfirmware. there i use -Ttext=0xe000 as linker option, which limits the text section to the upper 8kB of the flash.
the rest of the flash is used to download user code.

you probably need a similar trick for the RAM usage too.

chris

Reply via email to