This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Does NRgo studo program BOOTLOADERADDR?

I have a 256k NRF51822 with S110 installed.

I have a small custom bootloader that is located at 0x3f000.

I used nrfgo studio to install the S110 stack, then the bootloader.

When I use the debugger memory window I can see the bootloader code is there.

However, the BOOTLOADERADDR is 0xffffffff and the bootloader code does not run.

How does the BOOTLOADERADDR value get set?

Parents
  • Ok, to answer my own question...

    You need to have something like the following in the code:

    uint32_t m_uicr_bootloader_start_address 
        __attribute__((at(NRF_UICR_BOOT_START_ADDRESS))) = REMOTE_BOOTLOADER_ADDR;
    

    This creates a record that ends up in the hex file for programming the UICR BOOTLOADERADDR.

    It appears that when NRF studio sees this, it knows it is a bootloader.

    I think it would be a good idea if NRF Studio was to warn that there is no such record in the hex file.

  • You are correct,

    When you compile with that line in the code, the compiler will add into the generated hex file at the address in "NRF_UICR_BOOT_START_ADDRESS" the value REMOTE_BOOTLOADER_ADDR.

    nRFGo Studio doesn't know if the address is there or not when programming.

    But when it reads there is an address in the UICR, it will display that address as the start of the bootloader.

Reply Children
No Data
Related