Porting from nRF52840 to nRF52811

Dear Nordic,

I have developed an application for nRF52811 on nRF52840-DK.

For this i have referred examples -> peripheral -> template_project.

I have followed https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/nrf52811_user_guide.html article
done changes in my *emProject file but then failed to compile the project.

Looking forward from your side.

  • Hi Sumit, 
    What change did you do ? What error did you receive ?

    Have you simply use the pca10056e folder ? It's made for the nRF52811 

  • Hi Hung Bui,

    My end goal is to develop an application for the nRF52811 SoC. However, for ease of development, I started working on the nRF52840-DK with the plan of transferring the project to the nRF52811 SoC later.

    I came across the article titled "Creating your own emulated project", which explains the steps to emulate the nRF52811 SoC on the nRF52840-DK.

    Creating your own emulated project

    If the emulated project is not available for the example you need, then complete these steps to emulate the nRF52811 SoC.

    Converting a standard PCA10056 project to an emulated project
    1. Open the example project for your IDE.
    2. In the project settings, change to device "NordicSemiconductor->nRF52811_xxaa".
    3. In the C/C++ preprocessor settings, remove the defines "NRF52" and "NRF52840_XXAA".
    4. Add the preprocessor define "NRF52811_XXAA".
    5. In the linker script settings, adjust the linker script to match the maximum RAM and flash size of nRF52811.
      • ROM END: 0x2FFFF
      • RAM END: 0x20005FFF
    6. Remove the following files from the project: <compiler>_startup_nrf52.s and system_nrf52.c.
    7. Add the following files to the project: <compiler>_startup_nrf52811.s and system_nrf52811.c.
    8. Add the DEVELOP_IN_NRF52840 define to the compile flags. Adding this define will add extra code in SystemInit needed for nRF52840.
    9. Add the NRFX_COREDEP_DELAY_US_LOOP_CYCLES=3 define to ensure correct timing when using nrf_delay_us function.

    Steps Taken:

    1. Base Project:

      • Selected an example from the SDK under examples/peripheral.
      • Noticed that there wasn’t a separate pca10056e folder, so I decided to create my own emulated project.
    2. Device Settings and Preprocessor Changes:

      • Changed the target device in the project settings to NRF52811_XXAA.
      • Updated preprocessor settings:
        • Removed: NRF52 and NRF52840_XXAA.
        • Added: NRF52811_XXAA.
    3. Memory Configuration:

      • Adjusted the linker script to reflect nRF52811 memory sizes:
        • Flash end: 0x2FFFF.
        • RAM end: 0x20005FFF.
    4. Startup and System Files:

      • Removed: <compiler>_startup_nrf52.s and system_nrf52.c.
      • Added: <compiler>_startup_nrf52811.s and system_nrf52811.c.
    5. Compile Flags:

      • Added DEVELOP_IN_NRF52840 to the compile flags for necessary adjustments to SystemInit.
      • Defined NRFX_COREDEP_DELAY_US_LOOP_CYCLES=3 for accurate timing in the nrf_delay_us function.
    6. Compilation:

      • After making all these changes, the project compiled successfully in Segger Embedded Studio (SES).

    Issue Faced:

    Even though I modified the linker script and project settings, the IDE still displays 1 MB flash and 256 KB RAM, which correspond to the nRF52840 SoC.

    For the nRF52811 SoC, the memory should be:

    • Flash: 256 KB
    • RAM: 24 KB

    I am unsure if my current configuration is correct for emulation or if there are additional steps required to reflect the correct memory sizes in the IDE.


    I am using:

    • nRF5-SDK v17.1.0
    • Segger Embedded Studio (SES)




    Any guidance would be greatly appreciated!

    Thank you in advance!

  • Hi Sumit, 
    Please show how you configure the Flash and RAM ? 
    For example here is what in the pca10056e project for ble_app_template: 



    One trick to do this convert process is to use a text compare tool to check the difference between the pca10056 and pca10056e project. For example if you use Notepad++ you can compare them like this: 


    From that you would know what you need to do with your project to convert the project to nRF52811

Related