[riot-users] How to flash at a specific address ?
francisco.acosta at inria.fr
Wed Mar 21 18:45:42 CET 2018
This is completely normal. Whenever you flash an ELF file the “not used” ROM will become 0.
What you might do is some magic to generate a “.o" file from your bootloader ELF and link it in a single ELF file together with your application.
Or, you can flash everything as BIN, with openocd you can place it wherever you want.
I have already tried something like that in some of my PRs regarding OTA and bootloader. You might look at them to have an example.
Francisco Javier Acosta Padilla
Research Engineer at INFINE team
Inria Saclay Ile-de-France
On 21 March 2018 at 18:37:39, Aurélien Fillau (aurelien.fillau at gmail.com) wrote:
> I'm currently working on a stm32l073 on a custom board. I'm writing an
> application where i need to use my own linker file because i need to put
> the application at a specific address. This application is starting at
> 0x08008000. Between 0x08000000 and 0x08008000, i have a bootloader in
> charge of booting on my application. But when i'm doing a "make flash", the
> flasher is writing some code before 0x08008000 ... that is corrupting my
> bootloader. Indeed, when i dump the memory i can find the ELF magic string
> and i don't know why the flasher is flashing some code before 0x08008000
> whereas it is specified in the linker file : rom (rx) : ORIGIN =
> 0x08008000 !!! Regarding the vector table, it is put at the right place. If
> i want this to work i need to flash my bootloader after the application ...
> If i'm missing something or if you have any idea on how to put an
> application at a specific address without corrupting the other partitions,
> feel free to share :)
> Best regards,
> users mailing list
> users at riot-os.org
More information about the users