i use the S32K MCU,and i set generate bin file ,it's 70kB(addr is 0~0x117FF)
but i want to fill 0x00 to the addr 0x11800~0x11fff, because i need set checksum .
how to set auto fill the bin file?
I'm not sure what's wrong with your project - but on my side is everything working okay - I used S32K148 and your address range. Here is S-Record:
And here raw binary file (0x3F000 - 0x20000 - binary file starts always from 0x00000000):
I forgot mention that for raw binary file you also need to fill by 0x00 unused m_text section. Binary doesn't contain addresses and your 0x00 part starts right after last program instruction. Thats why bin file has 128k and s-record only 29k. So, just add into last m_text entry:
Hope it helps.
you can modify linker file for that and define for example m_fill memory area and .fill section:
In attachment is an example. Hope it helps.
hi ,thanks reply
i do follow your idea, but it can't hanve a perfect result, i do this
because my prj is app ,it has a bootloader jump to here. so my start addr not 0x00000000,
is 0x20000.And then i generater the bin file
the end addr is 0x20DDB, i think ,
my start is 0x20000,and the m_text start addr is 0x20410,lenth is 0x1EBF0, so
the app end addr is 0x3EFFF.Then ,the m_fill start addr is 0x3F000,lenth is
0x1000, and the file end addr should be 0x40000. Because my app file start is
0x20000,not 0 ,so the file end addr should be (0x40000-0x20000)=0x20000.
My MCU is S32K148
thanks reply ,is perfect solve my problem.
But i don't about __ROM_AT = .;
can you tell me ?
I took this part from another thread and originally it is from Erich Styger's blog - FILLing unused Memory with the GNU Linker | MCU on Eclipse - as he said - some Linkers/startup code needs this symbol to be defined. For S32DS for ARM v2018.R1 - you can remove it.
hi ,now i use a new problem ,i use the same solution in the S32K146,
it show this
it generate the bin file over 128k byte and the accessory is my ld file ,my IDE is
S32 Design Studio for ARM Version 2018.R1
Retrieving data ...