Skip to content

Commit 5c877d5

Browse files
mbolivar-nordicnvlsianpu
authored andcommitted
zephyr: fix logging
The removal of CONFIG_BOOT_HAVE_LOGGING in 15aa6ef ("zephyr: remove BOOT_HAVE_LOGGING Kconfig option") missed some uses. In particular, the one in mcuboot_config.h that converts Kconfig options to MCUboot's platform-agnostic configuration macros. This broke logging even when the relevant Kconfig options were on. Fix things up by using CONFIG_LOG instead. Tested logging works again on nrf52840_pca10056. Build tested nrf51_pca10056 to make sure it still fits. The nrf52840_pca10059 build overflows flash by 0.16%, but that was a problem before 15aa6ef. Signed-off-by: Marti Bolivar <[email protected]>
1 parent aab2118 commit 5c877d5

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Due the small boot partition can't use logging and debug optimalization
2-
# out-off-the-box. For using these features need to increase boot partition via
3-
# zephyr DTS.
4-
CONFIG_BOOT_HAVE_LOGGING=n
1+
# Due the small boot partition, we can't enable logging or the debug
2+
# optimization level out off the box. You need to increase the boot
3+
# partition size with a zephyr DTS overlay to make MCUboot's debug
4+
# builds fit.
5+
CONFIG_LOG=n
56
CONFIG_SIZE_OPTIMIZATIONS=y

boot/zephyr/boards/nrf52840_pca10059.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The UART is used for Serial Recovery, so logging requires
22
# an RTT console, which is not available out of the box on this board.
33
# Disable logging.
4-
CONFIG_BOOT_HAVE_LOGGING=n
4+
CONFIG_LOG=n
55

66
# Serial
77
CONFIG_SERIAL=y

boot/zephyr/include/mcuboot_config/mcuboot_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#define MCUBOOT_OVERWRITE_ONLY_FAST
4545
#endif
4646

47-
#ifdef CONFIG_BOOT_HAVE_LOGGING
47+
#ifdef CONFIG_LOG
4848
#define MCUBOOT_HAVE_LOGGING 1
4949
#endif
5050

0 commit comments

Comments
 (0)