My program in flash end at some point. From that endpoint on I'd like to fill up the whole flash with 0xff.
.equ FlashDictionaryEnde, 0x00100000
.equ numberofbytes , FlashDictionaryEnde-.
How can I achieve this?
Looks like you didn't get any solution.
Yes. It couldn't be that difficult to find the right assembler instructions. Maybe I'll have to figure it out myself...
Some programmers can be set to fill unused space.
Or you could post-process the Hex file...
@ellamacrow , I will wait your response. Thanks in advance
I finally found a solution using assembly langage instructions.
ARM GAS simple.s page 1
1 .syntax unified
2 .cpu cortex-m4
4 .global Reset,Loop
5 .equ ram, 0x20000000
6 .equ dict,0x188
7 .equ stack,0x20000300
9 .org 0
10 .align 2
11 0000 00030020 .long stack
12 0004 00000000 .long Reset
13 0008 00000000 .skip 0x400
15 0408 B618 adds r6, r2
16 040a 0A04 lsls r2, r1, #16
17 040c 4FF4C471 ldr r1,=dict
18 @ ldr r0,=ram+4
19 0410 0160 str r1, [r0]
20 @ ldr r0, = Loop
21 0412 00BF Loop: nop
22 0414 FFF7FEBF b Loop
23 .set here,.
24 0418 18040000 .word here
25 .equ endflash,0x10000
26 041c 5A5A5A5A .org endflash,0x5a5a
Don't care about the nonesense code stuff. Importand is the
.org value,fill the resulting .bin file is filled up to the end of flash with the desired data.
All well and good, what you are saying, but my original question was not whether it is a good idea or not to fill flash with data 0xff , but what the assembly language construct would be to achieve my goal (fill the flash with arbitrary data).
And I found the answer myself. Thank you.
View all questions in GNU Toolchain forum