This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Put application in a specific memory location

Hi,

How can I put an application at a specific memory location?

I want to upload 2 programs to my device and switch between these applications. I modified the bootloader according to this post which should allow me to start an application from a specific address, but I have trouble finding out how to put an application at a fixed memory location in the first place.

Also wondering if this is possible via Arduino IDE or if I need SES.

I'm using the NRF SDK 15.3.0 with softdevice 140 (version 6.1.1). The hardware I'm using is the Adafruit feather nrf52840 express.

Regards,

Senne

  • Hi Senne, 
    I'm not very familiar with Arduino IDE so I will use SES here. 

    If you want to change the start address of an application you just need to modify the project configuration. You can find an example of different setup in the peripheral\blinky example. 
    You have 3 option blank, mbr, s132 with different start address: 
    Blank, starts from 0x000000

    MBR, starts from 0x1000: 

    Softdevice, starts from 0x26000:

    Note that, if you use softdevice,  it will always jump to the end address of the softdevice to start the application. 

  • Thank you. I could't figure out why my application wasn't running at a different memory location, but as you said it is because of the softdevice.

    Also, I figured out that Arduino IDE uses a .ld file for linking. For my specific use case it is located inside $HOME/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/cores/nRF5/linker

Related