My program in flash end at some point. From that endpoint on I'd like to fill up the whole flash with 0xff.
Something like
.equ FlashDictionaryEnde, 0x00100000 .equ numberofbytes , FlashDictionaryEnde-. .space numberofbytes,0xff
doesn't work.
How can I achieve this?
Let me exaplain what was the reason behind and why it came to my question:
In the first place I was only interested in the ARM assembler syntax. That was my original question. And I found the solution by myself.
Re-thinking about the original intention behind it was the following:
Consider you program a piece of program from 0x0800000 to 0x080001a0, would it be possible to do another program step from 0x080001a1 to 0x08001fff, so to say fit a second piece of program seamlessly right after the end of the first one? (without "damaging" the first piece?)
As you won't necessarily know the end address of the code at assemble time, I recommend you use the linker to fill the region via scatterloading. A section defined as (something like) the below will likely work:
FILL_REGION +0 FILL 0xFFFFFFFF{}
See https://www.keil.com/support/man/docs/armlink/armlink_pge1362075670305.htm
Thanks. That's what I was looking for in another context also. Good to know. Excellent!
@Paul DeRocco answered very early in this thread - I'm citing - :
"Since 0xFF is the erased state of the flash, the obvious choice would simply be not to program the flash past the end of the code"