No BLE possible with CONFIG_NO_OPTIMIZATIONS=y for a nRF5340 project

Dear Support-Team,

 I have checked that now back and forth: When I add 

CONFIG_NO_OPTIMIZATIONS=y
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=8192

in my prj.conf and build with sysbuild, flashing the merged_CPUNET.hex and merged.hex to the application core, the application hangs in bt_init().

When I remove these settings and build and flash everything again, the application starts.

Do you have an explanation for this?

Best regards

Stefan

Parents
  • You can reproduce that by using the nrf/samples/bluetooth/peripheral_cts_client sample, building it with "west build -p -b nrf5340dk/nrf5340/cpuapp/ns":
    The sample as it is works, when I add "CONFIG_NO_OPTIMIZATIONS=y" to the prj.conf the firmware will not return from

    "err = bt_enable(NULL);"

    For both cases I use "nrfutil device program --firmware nrf\samples\bluetooth\peripheral_cts_client\build\merged_CPUNET.hex --options verify=VERIFY_READ,chip_erase_mode=ERASE_CTRL_AP --core=network" and JLink and with the Cortex-M plugin for the application core

Reply
  • You can reproduce that by using the nrf/samples/bluetooth/peripheral_cts_client sample, building it with "west build -p -b nrf5340dk/nrf5340/cpuapp/ns":
    The sample as it is works, when I add "CONFIG_NO_OPTIMIZATIONS=y" to the prj.conf the firmware will not return from

    "err = bt_enable(NULL);"

    For both cases I use "nrfutil device program --firmware nrf\samples\bluetooth\peripheral_cts_client\build\merged_CPUNET.hex --options verify=VERIFY_READ,chip_erase_mode=ERASE_CTRL_AP --core=network" and JLink and with the Cortex-M plugin for the application core

Children
Related