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

Load NRF52833-DK code on custom NRF52820

Hi everyone,

I have designed a project based on the Radio test example, in the Nordic SDK. After programming all my code on the NRF52833 DK (PCA10100), i decided to design my own pcb and load it with the NRF-DK. As Chip i used the NRF52820. So far so good. I am now running into some compatability issues which im not shure how to fix.

Checking project status
Building ‘Bluetooth_Radio_Periferal’ from solution ‘Bluetooth_Radio_Periferal’ in configuration ‘Debug’
Compiling ‘nrf_log_backend_serial.c’
Compiling ‘nrf_log_backend_rtt.c’
Compiling ‘nrf_log_backend_uart.c’
Compiling ‘nrf_log_default_backends.c’
Compiling ‘nrf_log_frontend.c’
Compiling ‘nrf_log_str_formatter.c’
Compiling ‘boards.c’
Compiling ‘app_error_handler_gcc.c’
Compiling ‘app_error_weak.c’
Compiling ‘app_fifo.c’
Compiling ‘app_timer2.c’
Compiling ‘app_scheduler.c’
Compiling ‘app_uart_fifo.c’
Compiling ‘drv_rtc.c’
Compiling ‘nrf_atfifo.c’
Compiling ‘nrf_atomic.c’
Compiling ‘nrf_cli.c’
Compiling ‘nrf_balloc.c’
Compiling ‘nrf_fprintf.c’
Compiling ‘nrf_cli_uart.c’
Compiling ‘nrf_memobj.c’
Compiling ‘nrf_pwr_mgmt.c’
Compiling ‘nrf_fprintf_format.c’
Compiling ‘nrf_queue.c’
Compiling ‘nrf_ringbuf.c’
Compiling ‘nrf_section_iter.c’
Compiling ‘nrf_sortlist.c’
Compiling ‘retarget.c’
Compiling ‘nrf_strerror.c’
Compiling ‘nrf_drv_clock.c’
Compiling ‘nrf_drv_uart.c’
Compiling ‘nrfx_clock.c’
Compiling ‘nrfx_atomic.c’
Compiling ‘nrfx_prs.c’
Compiling ‘nrfx_timer.c’
Compiling ‘nrfx_uart.c’
Compiling ‘nrfx_uarte.c’
Compiling ‘nrfx_gpiote.c’
Compiling ‘main.c’
Compiling ‘SEGGER_RTT.c’
Compiling ‘SEGGER_RTT_printf.c’
Compiling ‘SEGGER_RTT_Syscalls_SES.c’
Linking Bluetooth_Radio_Periferal.elf
Output/Debug/Exe/Bluetooth_Radio_Periferal.elf section `.init' will not fit in region `UNPLACED_SECTIONS'
region `UNPLACED_SECTIONS' overflowed by 20648 bytes
Output/Bluetooth_Radio_Periferal Debug/Obj/thumb_crt0.o: in function `memory_set':
(.init+0xe8): undefined reference to `__data_load_start__'
(.init+0xec): undefined reference to `__data_start__'
(.init+0xf0): undefined reference to `__data_end__'
(.init+0xf4): undefined reference to `__text_load_start__'
(.init+0xf8): undefined reference to `__text_start__'
(.init+0xfc): undefined reference to `__text_end__'
(.init+0x100): undefined reference to `__fast_load_start__'
(.init+0x104): undefined reference to `__fast_start__'
(.init+0x108): undefined reference to `__fast_end__'
(.init+0x10c): undefined reference to `__ctors_load_start__'
(.init+0x110): undefined reference to `__ctors_start__'
(.init+0x114): undefined reference to `__ctors_end__'
(.init+0x118): undefined reference to `__dtors_load_start__'
(.init+0x11c): undefined reference to `__dtors_start__'
(.init+0x120): undefined reference to `__dtors_end__'
(.init+0x124): undefined reference to `__rodata_load_start__'
(.init+0x128): undefined reference to `__rodata_start__'
(.init+0x12c): undefined reference to `__rodata_end__'
(.init+0x130): undefined reference to `__tdata_load_start__'
(.init+0x134): undefined reference to `__tdata_start__'
(.init+0x138): undefined reference to `__tdata_end__'
Output/Bluetooth_Radio_Periferal Debug/Obj/ses_startup_nrf_common.o: in function `InitializeUserMemorySections':
(.init+0x3c): undefined reference to `__start_nrf_sections'
Output/Bluetooth_Radio_Periferal Debug/Obj/nrf_log_frontend.o: in function `nrf_log_init':
nrf_log_frontend.c:(.text.nrf_log_init+0xf0): undefined reference to `__stop_log_const_data'
nrf_log_frontend.c:(.text.nrf_log_init+0xf4): undefined reference to `__start_log_const_data'
Output/Bluetooth_Radio_Periferal Debug/Obj/nrf_log_frontend.o: in function `nrf_log_module_cnt_get':
nrf_log_frontend.c:(.text.nrf_log_module_cnt_get+0xc): undefined reference to `__stop_log_const_data'
nrf_log_frontend.c:(.text.nrf_log_module_cnt_get+0x10): undefined reference to `__start_log_const_data'
Output/Bluetooth_Radio_Periferal Debug/Obj/nrf_log_frontend.o: in function `nrf_log_frontend_dequeue':
nrf_log_frontend.c:(.text.nrf_log_frontend_dequeue+0x3fc): undefined reference to `__start_log_const_data'
Output/Bluetooth_Radio_Periferal Debug/Obj/app_error_weak.o: in function `app_error_fault_handler':
app_error_weak.c:(.text.app_error_fault_handler+0x11c): undefined reference to `__start_log_const_data'
Output/Bluetooth_Radio_Periferal Debug/Obj/drv_rtc.o: in function `drv_rtc_init':
drv_rtc.c:(.text.drv_rtc_init+0x104): undefined reference to `__start_log_const_data'
Build failed

It has probably to do with some config files which im not aware of how to edit.

Please help, the deadline is comming closer.

Best regards Maikel

  • Hello Maikel

    Please check out the developing for nRF52820 user guide on the Infocenter, and specifically the section on "Transferring the project to nRF52820 hardware" which will explain what you need to modify in your project to make it run on the nRF52820.

    Best regards,

    Simon

  • Hi Simonr, 

    Thanks for your help, you set me on the right way. I have now Created a new Project based on the NRF52820 chip. Now i am running into some compatability issues. I probably have to change some things in the flashplacement file. but im not shure.  


    Linking uart_pca10100e.elf
    Output/Release/Exe/uart_pca10100e.elf section `.nrf_queue' will not fit in region `UNPLACED_SECTIONS'
    region `UNPLACED_SECTIONS' overflowed by 20 bytes
    Output/uart_pca10100e Release/Obj/nrf_cli.o: in function `cmd_get':
    undefined reference to `__start_cli_sorted_cmd_ptrs'
    Output/uart_pca10100e Release/Obj/main.o:(.rodata.m_cli_uart_transport+0x0): undefined reference to `nrf_cli_uart_transport_api'
    Build failed

  • Hi

    The easiest way to make any project (I.E. the UART peripheral project) to run on an nRF52820 SoC, you should start out with the standard nRF52833 project (pca10100) and follow the "Transferring the project to nRF52820 hardware "recipe":

    1. Open the example project for your IDE.
    2. In the project settings, change to device "NordicSemiconductor->nRF52820_xxaa".
    3. In the C/C++ preprocessor settings, remove the defines "NRF52" and "NRF52833_XXAA".
    4. Add the preprocessor define "NRF52820_XXAA".
    5. In the linker script settings, adjust the linker script to match the maximum RAM and flash size of nRF52820.
      • ROM END: 0x3FFFF
      • RAM END: 0x20007FFF
    6. Remove the following files from the project: <compiler>_startup_nrf52833.s and system_nrf52833.c.
    7. Add the following files to the project: <compiler>_startup_nrf52820.s and system_nrf52820.c.

    Creating a new project from scratch will take a lot more time and be much more difficult than just modifying the existing nRF52833 project.

    Best regards,

    Simon

  • Bluetooth_Radio_Central_NRF52820.zip

    well I have worked trough all those steps, and i'm still getting those issues. I used the the UART nrf52833e project to get all the configurations right. Then I took all my NRF52833 Radio_test project files an added those to the NRF52820 project. I added all the headers and all the C includes. As far as I can tell are all necessary peripherals included in the NRF52820 project so it should work. But please see for yourself.

  • Hi

    When I tried compiling your project it seems you haven't included the bsp.h header file to your project. As the note under Transferring the project to nRF52820 hardware says "as part of this procedure, you must change the BSP to the one matching your custom board. Please see Using the SDK with other boards".

    Best regards,

    Simon

Related