-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
Describe the bug
I enable the MCUBOOT_SERIAL option to enable serial recovery functionality, and the mcuboot project compiles unsuccessfully and outputs a failed message.
I have attached my configuration file for mcuboot
Regression
- This is a regression.
Steps to reproduce
No response
Relevant log output
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map C:/Users/dmkuzmin/zephyr/zephyr_workspace/rb-zephyr-workspace/build/mcuboot_a/zephyr/zephyr_pre0.map
cmd.exe /C "cd . && ccache D:\zephyr-sdk-0.17.4\xtensa-espressif_esp32s3_zephyr-elf\bin\xtensa-espressif_esp32s3_zephyr-elf-gcc.exe -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr\zephyr_pre0.elf zephyr/CMakeFiles/offsets.dir/./arch/xtensa/core/offsets/offsets.c.obj -T zephyr/linker_zephyr_pre0.cmd -Wl,-Map,C:/Users/dmkuzmin/zephyr/zephyr_workspace/rb-zephyr-workspace/build/mcuboot_a/zephyr/zephyr_pre0.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/xtensa/core/libarch__xtensa__core.a zephyr/lib/libc/picolibc/liblib__libc__picolibc.a zephyr/lib/libc/common/liblib__libc__common.a zephyr/drivers/interrupt_controller/libdrivers__interrupt_controller.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/flash/libdrivers__flash.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/timer/libdrivers__timer.a zephyr/drivers/watchdog/libdrivers__watchdog.a modules/mcuboot/libmcuboot_util.a modules/zcbor/libmodules__zcbor.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a -LC:/Users/dmkuzmin/zephyr/zephyr_workspace/rb-zephyr-workspace/build/mcuboot_a/zephyr zephyr/arch/common/libisr_tables.a -fuse-ld=bfd -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -Wl,-no-pie -specs=picolibc.specs -DPICOLIBC_MINIMAL_PRINTF_SCANF -lgcc -TC:/Users/dmkuzmin/zephyr/zephyr_workspace/modules/hal/espressif/zephyr/esp32s3/src/linker/esp32s3.rom.alias.ld -TC:/Users/dmkuzmin/zephyr/zephyr_workspace/modules/hal/espressif/zephyr/esp32s3/../../components/esp_rom/esp32s3/ld/esp32s3.rom.ld -TC:/Users/dmkuzmin/zephyr/zephyr_workspace/modules/hal/espressif/zephyr/esp32s3/../../components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld -TC:/Users/dmkuzmin/zephyr/zephyr_workspace/modules/hal/espressif/zephyr/esp32s3/../../components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld -TC:/Users/dmkuzmin/zephyr/zephyr_workspace/modules/hal/espressif/zephyr/esp32s3/../../components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld -TC:/Users/dmkuzmin/zephyr/zephyr_workspace/modules/hal/espressif/zephyr/esp32s3/../../components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld -TC:/Users/dmkuzmin/zephyr/zephyr_workspace/modules/hal/espressif/zephyr/esp32s3/../../components/soc/esp32s3/ld/esp32s3.peripherals.ld -Wl,--wrap=longjmp -L"d:/zephyr-sdk-0.17.4/xtensa-espressif_esp32s3_zephyr-elf/bin/../lib/gcc/xtensa-espressif_esp32s3_zephyr-elf/12.2.0" -lc -lgcc && cmd.exe /C "cd /D C:\Users\dmkuzmin\zephyr\zephyr_workspace\rb-zephyr-workspace\build\mcuboot_a\zephyr && "C:\Program Files\CMake\bin\cmake.exe" -E true""
d:/zephyr-sdk-0.17.4/xtensa-espressif_esp32s3_zephyr-elf/bin/../lib/gcc/xtensa-espressif_esp32s3_zephyr-elf/12.2.0/../../../../xtensa-espressif_esp32s3_zephyr-elf/bin/ld.bfd.exe: zephyr/libzephyr.a(esp_restart.c.obj):(.literal.esp_restart+0x4): undefined reference to `k_sched_lock'
d:/zephyr-sdk-0.17.4/xtensa-espressif_esp32s3_zephyr-elf/bin/../lib/gcc/xtensa-espressif_esp32s3_zephyr-elf/12.2.0/../../../../xtensa-espressif_esp32s3_zephyr-elf/bin/ld.bfd.exe: zephyr/libzephyr.a(esp_restart.c.obj): in function `esp_restart':
C:/Users/dmkuzmin/zephyr/zephyr_workspace/modules/hal/espressif/zephyr/common/esp_restart.c:108: undefined reference to `k_sched_lock'
d:/zephyr-sdk-0.17.4/xtensa-espressif_esp32s3_zephyr-elf/bin/../lib/gcc/xtensa-espressif_esp32s3_zephyr-elf/12.2.0/../../../../xtensa-espressif_esp32s3_zephyr-elf/bin/ld.bfd.exe: zephyr/libzephyr.a(boot_serial.c.obj):(.literal.boot_serial_start+0x8): undefined reference to `bootloader_wdt_feed'
d:/zephyr-sdk-0.17.4/xtensa-espressif_esp32s3_zephyr-elf/bin/../lib/gcc/xtensa-espressif_esp32s3_zephyr-elf/12.2.0/../../../../xtensa-espressif_esp32s3_zephyr-elf/bin/ld.bfd.exe: zephyr/libzephyr.a(boot_serial.c.obj): in function `boot_serial_read_console':
C:/Users/dmkuzmin/zephyr/zephyr_workspace/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c:695: undefined reference to `bootloader_wdt_feed'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Impact
Annoyance – Minor irritation; no significant impact on usability or functionality.
Environment
- Windows 10
- Zephyr SDK 0.17.4
- custom board ESP32-S3
- Zephyr RTOS Release 4.2.0
Additional Context
I noticed that the bootloader_wdt.c file is in the bootloader\mcuboot\boot\espressif\hal\src folder, which is used by ESP-IDF to build mcuboot, but not in the modules\hal\espressif\zephyr\port\boot and modules\hal\espressif\zephyr\port\bootloader folder, which uses zephyr to build mcuboot
I copied the file and added it to the source list, but there is still a problem with the k_sched_lock function.
I also needed to comment out the "zephyr, console" node additionally