-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
Describe the bug
Following the smp_svr sample readme and building for serial with the command below, the app does not print to the debug console, and the mcumgr client is not able to connect over serial.
west build -b frdm_rw612 samples/subsys/mgmt/mcumgr/smp_svr --sysbuild --pristine -- -DEXTRA_CONF_FILE="serial.conf;fs.conf;shell-mgmt.conf"
The issue is a conflict between the shell and log settings. The issue is present in release v4.3.0 and latest main at ab09c94 . I have tested on 3 boards and see the same issue:
- frdm_rw612
- frdm_mcxn947
- mimxrt1060_evk@C
I found some options below that workaround this issue. But since the current readme steps and CONF files for serial do not work, what is the best solution?
Regression
- This is a regression.
Steps to reproduce
Build with the command above and flash to the board. MCUboot prints as expected. But when the app executes, we do not see the boot banner, log messages, or shell prompt in the debug console:
*** Booting MCUboot v2.2.0-225-gc11e845e2483 ***
*** Using Zephyr OS build v4.3.0-1686-gab09c94377c5 ***
I: Starting bootloader
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x1
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x20000
I: Image version: v0.0.0
I: Jumping to the first image slot
Disconnecting the terminal, the mcumgr client also fails to communicate through the serial port and times out:
$ mcumgr -c COMPORT image list
Error: NMP timeout
Relevant log output
Impact
Functional Limitation – Some features not working as expected, but system usable.
Environment
No response
Additional Context
Here are some workarounds that aviod the serial issues.
One option is to disable CONFIG_SHELL=n in shell-mgmt.conf. The app logs to the console as expected, but this gives up the shell functions.
*** Booting MCUboot v2.2.0-225-gc11e845e2483 ***
*** Using Zephyr OS build v4.3.0-1686-gab09c94377c5 ***
I: Starting bootloader
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x1
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x20000
I: Image version: v0.0.0
I: Jumping to the first image slot
*** Booting Zephyr OS build v4.3.0-1686-gab09c94377c5 ***
[00:00:00.150,251] <inf> littlefs: LittleFS version 2.11, disk version 2.1
[00:00:00.153,117] <inf> littlefs: FS at w25q512jvfiq@0:0x620000 is 14816 0x100e
[00:00:00.153,120] <inf> littlefs: partition sizes: rd 16 ; pr 16 ; ca 64 ; la 2
[00:00:00.153,370] <inf> smp_sample: build time: Dec 4 2025 16:18:01
And the mcumgr commands work through serial:
$ mcumgr -c COMPORT image list
Images:
image=0 slot=0
version: 0.0.0
bootable: true
flags: active confirmed
hash: 6fae54061fc0bbae0a72bc9fe9320d05b117dd28622356e2850f154db4b025b4
Split status: N/A (0)
Another option is to make these Log changes:
CONFIG_LOG_PRINTK=n
CONFIG_LOG_MODE_IMMEDIATE=y