Hi,
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.
Jiri
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
Hi,
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.
Jiri
HI,
thanks reply ,is perfect solve my problem.
But i don't about __ROM_AT = .;
can you tell me ?
Hi,
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.
Jiri