From 4d60508ae5feffba7e7817d45494bcd6c8317d7f Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Fri, 10 Jan 2025 13:25:12 +0100 Subject: [PATCH] chore(ble): debug overlay for trezor-ble [no changelog] --- west/trezor/README.md | 5 +++++ west/trezor/trezor-ble/debug.conf | 7 ++++++- west/trezor/trezor-ble/prj.conf | 11 ++--------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/west/trezor/README.md b/west/trezor/README.md index bfa505e9ea6..8b29a220f78 100644 --- a/west/trezor/README.md +++ b/west/trezor/README.md @@ -64,6 +64,11 @@ cd trezor west build ./trezor-ble -b t3w1_revA_nrf52832 --sysbuild ``` +Debug builds can be built using the debug overlay configuration: +```sh +west build ./trezor-ble -b t3w1_revA_nrf52832 --sysbuild -- -DOVERLAY_CONFIG=debug.conf +``` + ### Flashing the Application Flash the compiled application onto the board: diff --git a/west/trezor/trezor-ble/debug.conf b/west/trezor/trezor-ble/debug.conf index 12992cefa00..09b655c3362 100644 --- a/west/trezor/trezor-ble/debug.conf +++ b/west/trezor/trezor-ble/debug.conf @@ -9,4 +9,9 @@ CONFIG_DEBUG_OPTIMIZATIONS=y # logging CONFIG_LOG=y -CONFIG_APP_LOG_LEVEL_DBG=y +CONFIG_RTT_CONSOLE=y +CONFIG_USE_SEGGER_RTT=y +CONFIG_LOG_BACKEND_RTT=y + + +CONFIG_ASSERT=y diff --git a/west/trezor/trezor-ble/prj.conf b/west/trezor/trezor-ble/prj.conf index 0ca0cf42838..edf785fb276 100644 --- a/west/trezor/trezor-ble/prj.conf +++ b/west/trezor/trezor-ble/prj.conf @@ -35,12 +35,11 @@ CONFIG_POWEROFF=y CONFIG_BT=y CONFIG_BT_PERIPHERAL=y -CONFIG_BT_DEVICE_NAME="TrezorZephyr" +CONFIG_BT_DEVICE_NAME="Trezor T3W1" CONFIG_BT_DEVICE_APPEARANCE=833 CONFIG_BT_MAX_CONN=1 CONFIG_BT_MAX_PAIRED=8 CONFIG_BT_SMP=y -# CONFIG_BT_SMP_APP_PAIRING_ACCEPT=y CONFIG_BT_SMP_ENFORCE_MITM=y CONFIG_BT_SMP_SC_ONLY=y CONFIG_BT_FILTER_ACCEPT_LIST=y @@ -49,14 +48,12 @@ CONFIG_BT_PRIVACY=y CONFIG_BT_TINYCRYPT_ECC=y CONFIG_BT_LL_SW_SPLIT=y -#CONFIG_BT_DEBUG_SMP=y #PHY update needed for updating PHY request CONFIG_BT_PHY_UPDATE=y CONFIG_BT_USER_PHY_UPDATE=y # HCI ACL buffers size -# BT_L2CAP_RX_MTU = CONFIG_BT_BUF_ACL_RX_SIZE - BT_L2CAP_HDR_SIZE CONFIG_BT_BUF_ACL_RX_SIZE=251 # L2CAP SDU/PDU TX MTU @@ -85,16 +82,12 @@ CONFIG_POLL=y # Config logger -CONFIG_LOG=y -CONFIG_RTT_CONSOLE=y +CONFIG_LOG=n CONFIG_UART_CONSOLE=n -CONFIG_USE_SEGGER_RTT=y -CONFIG_LOG_BACKEND_RTT=y CONFIG_LOG_BACKEND_UART=n CONFIG_LOG_PRINTK=n CONFIG_NANOPB=n -CONFIG_ASSERT=y # bootloader