Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52820 USB CDC ACM example. Linker issue?

Hey!

I'm trying to adapt a modified version of the open bootloader example for the nRF52820 MCU and have one issue as well as some questions.

I have adapted the build configuration as described here:
https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/developing-for-the-nrf52820-with-nrf5-sdk-v16-0-0

and here:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fnrf52820_user_guide.html

The modified memory section of the linker script:

MEMORY
{
  FLASH (rx) : ORIGIN = 0x78000, LENGTH = 0x40000 - 0x7800
  RAM (rwx) :  ORIGIN = 0x20000008, LENGTH = 0x20008000 - 0x20000008
  uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4
  uicr_mbr_params_page (r) : ORIGIN = 0x10001018, LENGTH = 0x4
  mbr_params_page (r) : ORIGIN = 0x0007E000, LENGTH = 0x1000
  bootloader_settings_page (r) : ORIGIN = 0x0007F000, LENGTH = 0x1000
}

Questions:

1. The Flash "ORIGIN", "bootloader_settings_page location" and "mbr_params_page" addresses I found for the nRF52833 at:
infocenter.nordicsemi.com/index.jsp

but is the addresses the same for nRF52820? Where can I find the addresses for nrf52820?

2. The addresses for "uicr_bootloader_start_address" and "uicr_mbr_params_page" comes from a pca10040 project linker script but again I can't find any documentation for these addresses for the nrf52820.
The issue:

Compiling goes without any issues but when flashing I get the warning:

WARNING: A UICR write operation has been requested but UICR has not been
WARNING: erased. Please verify that the result is correct.

And the program does not behave as expected. I suspect the address for the UICR addresses are wrong but I don't really know.

Thanks for the help :)
// Andreas

Parents
  • That seems to be the same documentation I have linked in my original post except the web address for some reason. This guide does not cover my questions. What I really want to know is:

    1. The memory addresses for:
        -  uicr_bootloader_start_address
        -  uicr_mbr_params_page
        -  mbr_params_page
        -  bootloader_settings_page

    2. And if these addresses are linked to the warning:
    WARNING: A UICR write operation has been requested but UICR has not been
    WARNING: erased. Please verify that the result is correct.
      

    Best Regards, Andreas

Reply
  • That seems to be the same documentation I have linked in my original post except the web address for some reason. This guide does not cover my questions. What I really want to know is:

    1. The memory addresses for:
        -  uicr_bootloader_start_address
        -  uicr_mbr_params_page
        -  mbr_params_page
        -  bootloader_settings_page

    2. And if these addresses are linked to the warning:
    WARNING: A UICR write operation has been requested but UICR has not been
    WARNING: erased. Please verify that the result is correct.
      

    Best Regards, Andreas

Children
  • Hi Andreas,

     

    Andreas3T said:

    That seems to be the same documentation I have linked in my original post except the web address for some reason. This guide does not cover my questions. What I really want to know is:

    1. The memory addresses for:
        -  uicr_bootloader_start_address
        -  uicr_mbr_params_page
        -  mbr_params_page
        -  bootloader_settings_page

    My apologies for not explaining better, but SDK v17 has projects for the nRF52820 device example that you're trying to run, where all of this is already handled for you.

    If you look at the folder:

    ../nRF5_SDK_17.0.2_d674dde/examples/dfu/secure_bootloader/pca10100e_usb_debug/armgcc

     

    You will find the linker script and Makefile for the nRF52820 device.

    Andreas3T said:
    2. And if these addresses are linked to the warning:
    WARNING: A UICR write operation has been requested but UICR has not been
    WARNING: erased. Please verify that the result is correct.
      

     UICR is a section that is only erased if you're issuing an ERASEALL (ie. "nrfjprog -e -f nrf52").

    If you program by erasing sector-by-sector (ie. "nrfjprog --program <hex> --sectorerase -f nrf52"), you cannot erase the UICR section. This means that if it was already populated; it is highly likely that there's a conflict in that region.

     

    Kind regards,

    Håkon

Related