Skip to content

Commit 9eb7970

Browse files
committed
Changes to get bootloader logs
1 parent 20fbb83 commit 9eb7970

5 files changed

Lines changed: 21 additions & 13 deletions

File tree

app/prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CONFIG_EVENTFD=y
1818
CONFIG_UART_CONSOLE=y
1919
CONFIG_LOG_BACKEND_UART=y
2020
# Logging does not start until activated via AT#XLOG=1 and is deactivated with AT#XLOG=0.
21-
CONFIG_LOG_BACKEND_UART_AUTOSTART=n
21+
CONFIG_LOG_BACKEND_UART_AUTOSTART=y
2222

2323
# Disable Segger RTT logging by default.
2424
CONFIG_USE_SEGGER_RTT=n

app/sysbuild.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ SB_CONFIG_BOOTLOADER_MCUBOOT=y
88

99
SB_CONFIG_SECURE_BOOT_NUM_VER_COUNTER_SLOTS=40
1010

11-
# Provide the keys to enable updating MCUboot bootloader.
12-
#SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="/home/user/ncs/_keys/mcuboot_priv.pem"
13-
#SB_CONFIG_SECURE_BOOT_SIGNING_KEY_FILE="/home/user/ncs/_keys/nsib_priv.pem"
11+
# Provide the keys to enable updating B1.
12+
SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="/home/mal6/ncs/_keys/mcuboot_priv.pem"
13+
SB_CONFIG_SECURE_BOOT_SIGNING_KEY_FILE="/home/mal6/ncs/_keys/nsib_priv.pem"

app/sysbuild/b0/prj.conf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@ CONFIG_NRF_RTC_TIMER=n
3333
# Serial Modem specific changes:
3434
# Disable logging so that Ready-message is the first one in startup.
3535
CONFIG_LOG=n
36-
CONFIG_CONSOLE=n
37-
CONFIG_UART_CONSOLE=n
36+
CONFIG_CONSOLE=y
37+
CONFIG_UART_CONSOLE=y
38+
39+
# Follow the DTS partition layout.
40+
CONFIG_USE_DT_CODE_PARTITION=y

app/sysbuild/mcuboot/app.overlay

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,11 @@
77
/ {
88
chosen {
99
zephyr,code-partition = &boot_partition;
10+
zephyr,console = &uart1;
1011
};
1112
};
13+
14+
&uart1 {
15+
current-speed = <1000000>;
16+
status = "okay";
17+
};

app/sysbuild/mcuboot/prj.conf

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,21 @@ CONFIG_FPROTECT=y
2525
# CONFIG_I2C is not set
2626

2727
CONFIG_LOG=y
28-
CONFIG_LOG_MODE_MINIMAL=y
28+
CONFIG_LOG_MODE_IMMEDIATE=y
2929
### Ensure Zephyr logging changes don't use more resources
30-
CONFIG_LOG_DEFAULT_LEVEL=0
31-
### Use info log level by default
32-
CONFIG_MCUBOOT_LOG_LEVEL_INF=y
30+
CONFIG_LOG_DEFAULT_LEVEL=3
31+
### Use debug log level for mcuboot traces
32+
CONFIG_MCUBOOT_LOG_LEVEL_DBG=y
3333
### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
3434
CONFIG_CBPRINTF_NANO=y
3535
CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0
3636

3737
### Serial Modem
38-
# Do not use UART, for power saving
38+
# Enable UART for mcuboot traces
3939
CONFIG_CONSOLE=y
4040
CONFIG_MCUBOOT_SERIAL=n
4141
CONFIG_BOOT_SERIAL_UART=n
42-
CONFIG_UART_CONSOLE=n
43-
CONFIG_LOG_BACKEND_UART=n
42+
CONFIG_UART_CONSOLE=y
4443
CONFIG_CONSOLE_HANDLER=n
4544

4645
# Enable software downgrade prevention for the application.

0 commit comments

Comments
 (0)