Hello
i use eclipse luna with gnu arm gcc plugin, nordic nrf51 soc with S110 softdevice.
The compiled and linked application in elf (hex) file should start at offset (flash address) 0x16000.
How to write the linked application into flash with offset by the debugger configuration?.
If i create an external tool entry to write the application with the nrfjprog.exe (nrfjprog.exe --program S110_EHAL_App.hex --pinreset) then all is ok. That means the linker process was ok. After that i can attach the debugger (with unchecked "Load executable" checkbox) and can debug, the app is running and was written to the right offset address.
But if i enable the checkbox "Load executable" then the application is written to the wrong address. If i enter 16000 into Executable offset (hex) field nothing changed. I think the application is written into a wrong place. The cpu go into a hard fault.
What must be set to write the application to the right offset address?
Thanks,
Lukas
See also original Post. That File is correct because if i use the nordic
flasher Software (which use the Segger J-Link SW) then this software read
the exact destination position from the file.
But ok, i can check the file, on which position in the elf file is the
destination address?
Thanks Lukas
Am 04.05.2015 10:43 schrieb "Liviu Ionescu (ilg)" ilg-ul@users.sf.net:
Related
Support requests:
#139please do not reply by email, use the web interface.
normally the debugger will use the addresses in the elf header, so if this header is correct, flash programming should work.
I guess there must be something wrong with the linker scripts.
any progress?
I reread the original message and your comments, and I have difficulties to understand your issue.
are you comparing programming a .hex file using nrfjprog.exe with programming an .elf file using j-Link?
ah, I don't know, but there are ways to read the elf details (readelf, objdump, etc).
list the elf section details and try to understand what is wrong.
I use a Bootloader application additionally to my normal application on an STM32.
I solved the issue of writing the normal application with an offset of 0x8000 by editing the linker script (adding a section in front):
Does that answer your question?
This makes the debugger leave the first 32K as is and then flash the programm.. Though it still starts at 0x0 (where nothing is programmed here..) - i didn't manage to alter the 'start'-address of the debugger.
I think the easiest method of reserving the bootloader area is by just modifying the flash start address from 0x0 to 0x8000 or whatever address you like (and also reducing the total flash size).