CONFIG_BT_DEBUG_LOG+CONFIG_DEBUG appears incompatible with the USB CDC console

I'm using the USB cdc console example(https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/subsys/usb/console) with nrf52840_dk and enabling the following 3 additional options:

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_DEBUG=y

This crashes shortly after boot.

Can be reproduced reliably. Disabling either CONFIG_BT_DEBUG_LOG or CONFIG_DEBUG makes it work, but I'd like to have debug logging at this stage.

Parents
  • One fix I've found is to set:
    CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=1000 
    So my guess is that some log buffer gets filled up and it causes a crash. Can you check what's going on?
    Also I'd appreciate tips on debugging something like this. I can use the debugger from VSCode+NRF connect and it does break on crashes, however I have not found a way to see where the crash happened.
    Thanks
Reply
  • One fix I've found is to set:
    CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=1000 
    So my guess is that some log buffer gets filled up and it causes a crash. Can you check what's going on?
    Also I'd appreciate tips on debugging something like this. I can use the debugger from VSCode+NRF connect and it does break on crashes, however I have not found a way to see where the crash happened.
    Thanks
Children
Related