nrf5340 ble full stack in network core

hello there was a problem configuring the project.

i want build uart central, peripheral project with rpc_host.

The uart peripheral project built fine with -DCONFIG_BT_RPC_STACK=y, but the uart central project failed to build even with DCONFIG_BT_RPC_STACK=y added.

Is there something wrong with this? Or is this not supported for all projects yet?

this is build error log.

it looks like flash memory overflow.

[278/291] Linking C static library zephyr\kernel\libkernel.a

[279/291] Linking C executable zephyr\zephyr_pre0.elf

FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map

cmd.exe /C "cd . && C:\Users\jaesun\Desktop\work\NORDIC\toolchains\v2.3.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe  -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf  && cmd.exe /C "cd /D C:\Users\jaesun\Desktop\work\NORDIC\ble_full_stack\central_uart\build\rpc_host\zephyr && C:\Users\jaesun\Desktop\work\NORDIC\toolchains\v2.3.0\opt\bin\cmake.exe -E echo ""

c:/users/jaesun/desktop/work/nordic/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr\zephyr_pre0.elf section `rodata' will not fit in region `FLASH'

c:/users/jaesun/desktop/work/nordic/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: region `FLASH' overflowed by 19289 bytes

collect2.exe: error: ld returned 1 exit status

ninja: build stopped: subcommand failed.

[6/286] Generating include/generated/version.h

-- Zephyr version: 3.2.99 (C:/Users/jaesun/Desktop/work/NORDIC/v2.3.0/zephyr), build: v3.2.99-ncs2

[271/286] Linking C executable zephyr\zephyr_pre0.elf

FAILED: modules/nrf/samples/rpc_host_subimage-prefix/src/rpc_host_subimage-stamp/rpc_host_subimage-build rpc_host/zephyr/zephyr.hex rpc_host/zephyr/zephyr.elf rpc_host/zephyr/merged_CPUNET.hex

cmd.exe /C "cd /D C:\Users\jaesun\Desktop\work\NORDIC\ble_full_stack\central_uart\build\rpc_host && C:\Users\jaesun\Desktop\work\NORDIC\toolchains\v2.3.0\opt\bin\cmake.exe --build . --"

[273/286] Generating dev_handles.c

ninja: build stopped: subcommand failed.

FATAL ERROR: command exited with status 1: 'c:\Users\jaesun\Desktop\work\NORDIC\toolchains\v2.3.0\opt\bin\cmake.EXE' --build 'c:\Users\jaesun\Desktop\work\NORDIC\ble_full_stack\central_uart\build'

*  The terminal process terminated with exit code: 1.

*  Terminal will be reused by tasks, press any key to close it.

Parents
  • i can't upload my log.

    An error occurred. Please try again or contact your administrator.

    this message shown

  • Hi,

    I have reproduced your issue with flash overflow. 

    I have successfully tested central_uart sample in NCS v2.3.0 with argument -DCONFIG_BT_RPC_STACK=y. The solution for me was to copy the content of prj.conf into rpc_host.conf and disable all options related to logging which are found under "# Config logger" in prj.conf (and rpc_host.conf). Could you please provide information if this works for you as well?

    Best regards,
    Dejan

  • i tried another way.

    this is my prj.conf.

    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=n
    CONFIG_BT_CENTRAL=y
    CONFIG_BT_OBSERVER=y
    CONFIG_BT_DEVICE_NAME="Zephyr"
    CONFIG_BT_SMP=y
    CONFIG_BT_GATT_CLIENT=y
    CONFIG_BT_GATT_DM=y
    CONFIG_HEAP_MEM_POOL_SIZE=2048
    # CONFIG_BT_DEBUG_LOG=y
    CONFIG_BT_GATT_DM_DATA_PRINT=y
    CONFIG_SETTINGS=y
    CONFIG_BT_SETTINGS=y
    CONFIG_NRF_RPC_THREAD_STACK_SIZE=2048
    

    it is compiled well.

    When I run an application, it starts infinitely.

    ble central not working.

    this is my ble central logs

    Starting nRF RPC bluetooth host
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    Starting nRF RPC bluetooth host
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    Starting nRF RPC bluetooth host
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    Starting nRF RPC bluetooth host
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    Starting nRF RPC bluetooth host
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    Starting nRF RPC bluetooth host
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    Starting nRF RPC bluetooth host
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    Starting nRF RPC bluetooth host
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    Starting nRF RPC bluetooth host
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    Starting nRF RPC bluetooth host
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    Starting nRF RPC bluetooth host
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    Starting nRF RPC bluetooth host

    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***

  • Hi,

    In my tests, I have seen the same error as you if I omit CONFIG_BT_PERIPHERAL=n. It seems that in your previous configuration (based on my previous reply), you forgot to include CONFIG_BT_PERIPHERAL=n. 
    Could you include this configuration option and try building again? Do you get the same result after programming the device?

    Best regards,
    Dejan

  • hello dejans.

    i add CONFIG_BT_PERIPHERAL=n

    CONFIG_BT_PERIPHERAL=n
    # Enable the UART driver
    CONFIG_UART_ASYNC_API=y
    CONFIG_NRFX_UARTE0=y
    CONFIG_SERIAL=y
    CONFIG_CONSOLE=y
    CONFIG_UART_CONSOLE=y
    
    # Enable the BLE stack with GATT Client configuration
    CONFIG_BT=y
    CONFIG_BT_CENTRAL=y
    CONFIG_BT_SMP=y
    CONFIG_BT_GATT_CLIENT=y
    
    # Enable the BLE modules from NCS
    CONFIG_BT_NUS_CLIENT=y
    CONFIG_BT_SCAN=y
    CONFIG_BT_SCAN_FILTER_ENABLE=y
    CONFIG_BT_SCAN_UUID_CNT=1
    CONFIG_BT_GATT_DM=y
    CONFIG_HEAP_MEM_POOL_SIZE=2048
    
    # This example requires more workqueue stack
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    # Enable bonding
    CONFIG_BT_SETTINGS=y
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_FLASH_MAP=y
    CONFIG_NVS=y
    CONFIG_SETTINGS=y
    
    # Config logger
    # CONFIG_LOG=y
    # CONFIG_USE_SEGGER_RTT=y
    # CONFIG_LOG_BACKEND_RTT=y
    # CONFIG_LOG_BACKEND_UART=n
    # CONFIG_LOG_PRINTK=n
    
    # CONFIG_ASSERT=y
    

    it compiled well.

    but run my application

    ble central device print this log infinitely. 

    it seem like ble central function not working

    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    *** Booting Zephyr OS build v3.2.99-ncs2 ***

  • Hi,

    I have tested central_uart sample (building for nrf5340dk_nrf5340_cpuapp) from VS Code with additional Cmake argument -DCONFIG_BT_RPC_STACK=y. I have successfully reproduced the issue with different rpc_host.conf configurations. We will discuss this internally. I will get back to you when I get new information related to your problem.

    Best regards,
    Dejan

  • Hi,

    I have reported the issue internally. I will get back to you when I get new information.

    Please note that due to vacations and reduced staffing, getting the reply might be delayed. Thank you for your patience and understanding.

    Best regards,
    Dejan

Reply Children
Related