What modifications are needed to run the example code for Nordic 52832 on 52833?

as show:What modifications are needed to run the example code ble_multilink_central for Nordic 52832 on 52833? Please provide a detailed explanation

  • Hi,

    Based on the example name I assume you are using then nRF5 SDK? If so, which toolchain/IDE are you using?

    If you are using Segger Embedded Studio (which I would recomend), the simplest is to open the .emProject file in a text exitor and search for a few terms. I would recomend starting with the nRF52840 example project to avoid confusion as several files for the nrF52832 just use "nrf52" for historic reasons. But, if you start with the nRF52840 projectyou can do the following:

    • search and repalce "nRF52840" with nRF52833". Note that this is case sensitive and the sarch and replace may not handle that so you may want to check each one yourself.
    • Replace nRF52840_xxAA with nRF52833_xxAA and nRF52840_XXAA with nRF52833_XXAA (used two places with different case, and in the latter case the case matters as it is a preprocessor define)
    • Replace 
    • Update the sized under linker_section_placement_macros to reflect the memory of the nRF53833. It would be something like this (some application specific adjustments may be needed:  linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x40000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x8000;FLASH_START=0x27000;FLASH_SIZE=0x19000;RAM_START=0x20002ae8;RAM_SIZE=0x5518"

    You can of course also do the changes in the Segger Embedded Studio GUI, but that will be more error prone and take more time.

  • I am using Keil software to run the example code of 52832 or 52840 (preferably 52832) on the 52833 chip. How should I modify this?

  • Now I am using the example code of sdk17.1.0 s32. After opening it with Keil, I found that it is the example code of 52832. I changed the device to nRF52833_xxAA, but after recompiling, there are still the following issues and it cannot run properly on 52833. What else do I need to do?

    Rebuild started: Project: ble_app_multilink_central_pca10040_s132
    *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
    Rebuild target 'nrf52832_xxaa'
    Note: source file 'RTE\Device\nRF52833_xxAA\system_nrf52.c' - object file renamed from '.\_build\system_nrf52.o' to '.\_build\system_nrf52_1.o'.

  • hi 

    I also tried using Segger Embedded Studio as you suggested and changed 52840 to 52833; But I encountered the following issue during compilation

    Building 'ble_app_multilink_central_pca10100_s140' from solution 'ble_app_multilink_central_pca10100_s140' in configuration 'Debug'
    Compiling 'main.c'
    Compiling 'boards.c'
    Compiling 'bsp.c'
    Compiling 'bsp_btn_ble.c'
    Assembling 'ses_startup_nrf52833.s'
    Assembling 'ses_startup_nrf_common.s'
    Compiling 'system_nrf52833.c'
    Compiling 'ble_advdata.c'
    Compiling 'ble_advertising.c'
    Compiling 'ble_conn_state.c'
    Compiling 'ble_db_discovery.c'
    Compiling 'ble_srv_common.c'
    Compiling 'nrf_ble_gatt.c'
    Compiling 'nrf_ble_gq.c'
    Compiling 'nrf_ble_scan.c'
    Compiling 'ble_lbs_c.c'
    Compiling 'nrf_drv_clock.c'
    Compiling 'nrf_drv_uart.c'
    Compiling 'nrfx_atomic.c'
    Compiling 'nrfx_clock.c'
    Compiling 'nrfx_gpiote.c'
    Compiling 'nrfx_prs.c'
    Compiling 'nrfx_uart.c'
    Compiling 'nrfx_uarte.c'
    Compiling 'app_button.c'
    Compiling 'app_error.c'
    Compiling 'app_error_handler_gcc.c'
    Compiling 'app_error_weak.c'
    Compiling 'app_scheduler.c'
    Compiling 'app_timer2.c'
    Compiling 'app_util_platform.c'
    Compiling 'drv_rtc.c'
    Compiling 'hardfault_implementation.c'
    Compiling 'nrf_assert.c'
    Compiling 'nrf_atfifo.c'
    Compiling 'nrf_atflags.c'
    Compiling 'nrf_atomic.c'
    Compiling 'nrf_balloc.c'
    Compiling 'nrf_fprintf.c'
    Compiling 'nrf_fprintf_format.c'
    Compiling 'nrf_memobj.c'
    Compiling 'nrf_pwr_mgmt.c'
    Compiling 'nrf_queue.c'
    Compiling 'nrf_ringbuf.c'
    Compiling 'nrf_section_iter.c'
    Compiling 'nrf_sortlist.c'
    Compiling 'nrf_strerror.c'
    Compiling 'nrf_log_backend_rtt.c'
    Compiling 'nrf_log_backend_serial.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 'SEGGER_RTT.c'
    Compiling 'SEGGER_RTT_printf.c'
    Compiling 'nrf_sdh.c'
    Compiling 'nrf_sdh_ble.c'
    Compiling 'nrf_sdh_soc.c'
    Assembling 'thumb_crt0.s'
    Compiling 'utf.c'
    Generating linker script 'ble_app_multilink_central_pca10100_s140.ld'
    Linking 'ble_app_multilink_central_pca10100_s140.elf'
    .reserved_ram is too large to fit in RAM1 memory segment
    .data_run is too large to fit in RAM1 memory segment
    .bss is too large to fit in RAM1 memory segment
    section .heap overlaps absolute placed section .stack
    section .reserved_ram VMA wraps around address space
    section .stack VMA [20006000,20007fff] overlaps section .reserved_ram VMA [20000000,00022ae7]
    Build failed, exit status 0x1
    Build failed


    Could you please help me solve this? Also, if I use Keil, it would be more convenient for such changes compared to Egger Embedded Studio?

  • Hi,

    With Keil it is easier to change the files in the GUI. But you need to do essentially the same things (change chip variant, change defines, remove startup files etc related to the old chip and add files related to the new chip, and adjust memory start addresses and sizes). It is a good idea to compare with an exmaple project for nRF52833 (there are some of those in the SDK), as it is easy to miss somethings.

    Regardign the error, it looks to me like you hav emade a lot of changes but not cleaned the build folder? When you do big changes, you need to clean all before doing a re-build. If it still fails (and after you have updated everythign as outlined), can you share the full log? (You can also change the project so that I can have a look on my end.)

Related