Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCUBoot: lpcxpresso55s69: compilation error #62545

Closed
butok opened this issue Sep 12, 2023 · 8 comments
Closed

MCUBoot: lpcxpresso55s69: compilation error #62545

butok opened this issue Sep 12, 2023 · 8 comments
Assignees
Labels
area: MCUBoot bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug

Comments

@butok
Copy link
Contributor

butok commented Sep 12, 2023

Describe the bug
Compilation of the bootloader\mcuboot\boot\zephyr MCUBoot bootloader raises a compilation error for lpcxpresso55s69_cpu0

To Reproduce
Steps to reproduce the behavior:

  1. Go to bootloader\mcuboot\boot\zephyr directory
  2. west build -p always -b lpcxpresso55s69_cpu0
  3. See assert error "Unsupported value for MCUBOOT_BOOT_MAX_ALIGN"

NOTE: Zephyr MCUBoot compilation guides:

Expected behavior
No errors.

Logs and console output

C:\_ddm\ZEPHYR\zephyr_vs\bootloader\mcuboot\boot\zephyr>west build -p always -b lpcxpresso55s69_cpu0
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr
-- CMake version: 3.26.4
-- Found Python3: C:/Python311/python.exe (found suitable version "3.11.4", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: C:/_ddm/ZEPHYR/zephyr_vs/zephyr/.cache
-- Zephyr version: 3.4.99 (C:/_ddm/ZEPHYR/zephyr_vs/zephyr)
-- Found west (found suitable version "1.1.0", minimum required is "0.14.0")
-- Board: lpcxpresso55s69_cpu0
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.1 (C:/_ddm/ZEPHYR/zephyr_latest/zephyr-sdk-0.16.1)
-- Found toolchain: zephyr 0.16.1 (C:/_ddm/ZEPHYR/zephyr_latest/zephyr-sdk-0.16.1)
-- Found Dtc: C:/Users/nxa12205/.mcuxpressotools/dtc-msys2/tools/usr/bin/dtc.exe (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found BOARD.dts: C:/_ddm/ZEPHYR/zephyr_vs/zephyr/boards/arm/lpcxpresso55s69/lpcxpresso55s69_cpu0.dts
-- Found devicetree overlay: C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/app.overlay
-- Generated zephyr.dts: C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/dts.cmake
Parsing C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration 'C:/_ddm/ZEPHYR/zephyr_vs/zephyr/boards/arm/lpcxpresso55s69/lpcxpresso55s69_cpu0_defconfig'
Merged configuration 'C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/prj.conf'
Configuration saved to 'C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/.config'
Kconfig header saved to 'C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/include/generated/autoconf.h'
-- Found GnuLd: c:/_ddm/zephyr/zephyr_latest/zephyr-sdk-0.16.1/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/_ddm/ZEPHYR/zephyr_latest/zephyr-sdk-0.16.1/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
Load components for LPC55S69:
driver_common component is included.
driver_reset component is included.
device_CMSIS component is included.
CMSIS_Include_core_cm component is included.
device_system component is included.
driver_lpc_gpio component is included.
driver_pint component is included.
driver_inputmux component is included.
driver_inputmux_connections component is included.
driver_flexcomm_usart component is included.
driver_flexcomm component is included.
driver_iap1 component is included.
driver_lpc_iocon component is included.
MCUBoot bootloader key file: C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/root-rsa-2048.pem
-- Configuring done (62.7s)
-- Generating done (0.9s)
-- Build files have been written to: C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build
-- west build: building application
[1/262] Generating include/generated/version.h
-- Zephyr version: 3.4.99 (C:/_ddm/ZEPHYR/zephyr_vs/zephyr), build: zephyr-v3.4.0-3537-g4129b10b6900
[41/262] Building C object CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj
FAILED: CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj
C:\_ddm\ZEPHYR\zephyr_latest\zephyr-sdk-0.16.1\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DCPU_LPC55S69JBD100_cm33_core0 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNDEBUG -DPICOLIBC_INTEGER_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/targets -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/include/generated -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/soc/arm/nxp_lpc/lpc55xxx -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/../../zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/.. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/include -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/include/platform -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/compiler -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/generate/zephyr -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/tools/acpiexec -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/tools/acpidump -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/cmsis/CMSIS/Core/Include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/cmsis/. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/devices/LPC55S69 -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/devices/LPC55S69/drivers -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/common -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/lpc_gpio -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/pint -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/inputmux -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/flexcomm -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/iap1 -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/lpc_iocon -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/hal_nxp/. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/crypto/mbedtls/include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/mbedtls/configs -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/mbedtls/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -fno-strict-aliasing -Og -imacros C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/_ddm/ZEPHYR/zephyr_latest/zephyr-sdk-0.16.1/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/_ddm/ZEPHYR/zephyr_vs/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs=WEST_TOPDIR -ffunction-sections -fdata-sections -mcmse --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj -MF CMakeFiles\app.dir\C_\_ddm\ZEPHYR\zephyr_vs\bootloader\mcuboot\boot\bootutil\src\tlv.c.obj.d -o CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj -c C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/tlv.c
In file included from C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include/bootutil/bootutil.h:33,
                 from C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/tlv.c:22:
C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include/bootutil/bootutil_public.h:88:1: error: static assertion failed: "Unsupported value for MCUBOOT_BOOT_MAX_ALIGN"
   88 | _Static_assert(MCUBOOT_BOOT_MAX_ALIGN >= 8 && MCUBOOT_BOOT_MAX_ALIGN <= 32,
      | ^~~~~~~~~~~~~~
[49/262] Building C object CMakeFiles/app.dir/main.c.obj
FAILED: CMakeFiles/app.dir/main.c.obj
C:\_ddm\ZEPHYR\zephyr_latest\zephyr-sdk-0.16.1\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DCPU_LPC55S69JBD100_cm33_core0 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNDEBUG -DPICOLIBC_INTEGER_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/targets -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/include/generated -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/soc/arm/nxp_lpc/lpc55xxx -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/../../zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/.. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/include -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/include/platform -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/compiler -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/generate/zephyr -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/tools/acpiexec -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/tools/acpidump -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/cmsis/CMSIS/Core/Include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/cmsis/. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/devices/LPC55S69 -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/devices/LPC55S69/drivers -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/common -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/lpc_gpio -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/pint -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/inputmux -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/flexcomm -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/iap1 -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/lpc_iocon -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/hal_nxp/. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/crypto/mbedtls/include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/mbedtls/configs -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/mbedtls/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -fno-strict-aliasing -Og -imacros C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/_ddm/ZEPHYR/zephyr_latest/zephyr-sdk-0.16.1/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/_ddm/ZEPHYR/zephyr_vs/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs=WEST_TOPDIR -ffunction-sections -fdata-sections -mcmse --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/main.c.obj -MF CMakeFiles\app.dir\main.c.obj.d -o CMakeFiles/app.dir/main.c.obj -c C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/main.c
In file included from C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include/bootutil/bootutil.h:33,
                 from C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/main.c:36:
C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include/bootutil/bootutil_public.h:88:1: error: static assertion failed: "Unsupported value for MCUBOOT_BOOT_MAX_ALIGN"
   88 | _Static_assert(MCUBOOT_BOOT_MAX_ALIGN >= 8 && MCUBOOT_BOOT_MAX_ALIGN <= 32,
      | ^~~~~~~~~~~~~~
[52/262] Building C object CMakeFiles/app.dir/C_/_ddm/ZEPH.../bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj
FAILED: CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj
C:\_ddm\ZEPHYR\zephyr_latest\zephyr-sdk-0.16.1\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DCPU_LPC55S69JBD100_cm33_core0 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNDEBUG -DPICOLIBC_INTEGER_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/targets -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/include/generated -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/soc/arm/nxp_lpc/lpc55xxx -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/../../zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/.. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/include -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/include/platform -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/compiler -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/generate/zephyr -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/tools/acpiexec -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/tools/acpidump -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/cmsis/CMSIS/Core/Include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/cmsis/. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/devices/LPC55S69 -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/devices/LPC55S69/drivers -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/common -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/lpc_gpio -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/pint -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/inputmux -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/flexcomm -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/iap1 -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/lpc_iocon -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/hal_nxp/. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/crypto/mbedtls/include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/mbedtls/configs -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/mbedtls/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -fno-strict-aliasing -Og -imacros C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/_ddm/ZEPHYR/zephyr_latest/zephyr-sdk-0.16.1/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/_ddm/ZEPHYR/zephyr_vs/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs=WEST_TOPDIR -ffunction-sections -fdata-sections -mcmse --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj -MF CMakeFiles\app.dir\C_\_ddm\ZEPHYR\zephyr_vs\bootloader\mcuboot\boot\bootutil\src\image_validate.c.obj.d -o CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj -c C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/image_validate.c
In file included from C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include/bootutil/bootutil.h:33,
                 from C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/bootutil_priv.h:37,
                 from C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/image_validate.c:57:
C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include/bootutil/bootutil_public.h:88:1: error: static assertion failed: "Unsupported value for MCUBOOT_BOOT_MAX_ALIGN"
   88 | _Static_assert(MCUBOOT_BOOT_MAX_ALIGN >= 8 && MCUBOOT_BOOT_MAX_ALIGN <= 32,
      | ^~~~~~~~~~~~~~
[53/262] Building C object CMakeFiles/app.dir/C_/_ddm/ZEPH...yr_vs/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj
FAILED: CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj
C:\_ddm\ZEPHYR\zephyr_latest\zephyr-sdk-0.16.1\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DCPU_LPC55S69JBD100_cm33_core0 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNDEBUG -DPICOLIBC_INTEGER_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/targets -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/include/generated -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/soc/arm/nxp_lpc/lpc55xxx -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/../../zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/.. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/include -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/include/platform -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/compiler -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/generate/zephyr -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/tools/acpiexec -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/tools/acpidump -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/cmsis/CMSIS/Core/Include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/cmsis/. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/devices/LPC55S69 -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/devices/LPC55S69/drivers -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/common -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/lpc_gpio -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/pint -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/inputmux -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/flexcomm -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/iap1 -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/lpc_iocon -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/hal_nxp/. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/crypto/mbedtls/include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/mbedtls/configs -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/mbedtls/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -fno-strict-aliasing -Og -imacros C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/_ddm/ZEPHYR/zephyr_latest/zephyr-sdk-0.16.1/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/_ddm/ZEPHYR/zephyr_vs/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs=WEST_TOPDIR -ffunction-sections -fdata-sections -mcmse --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj -MF CMakeFiles\app.dir\C_\_ddm\ZEPHYR\zephyr_vs\bootloader\mcuboot\boot\bootutil\src\image_rsa.c.obj.d -o CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj -c C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/image_rsa.c
In file included from C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include/bootutil/bootutil.h:33,
                 from C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/bootutil_priv.h:37,
                 from C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/image_rsa.c:33:
C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include/bootutil/bootutil_public.h:88:1: error: static assertion failed: "Unsupported value for MCUBOOT_BOOT_MAX_ALIGN"
   88 | _Static_assert(MCUBOOT_BOOT_MAX_ALIGN >= 8 && MCUBOOT_BOOT_MAX_ALIGN <= 32,
      | ^~~~~~~~~~~~~~
[54/262] Building C object CMakeFiles/app.dir/C_/_ddm/ZEPH...s/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
FAILED: CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
C:\_ddm\ZEPHYR\zephyr_latest\zephyr-sdk-0.16.1\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DCPU_LPC55S69JBD100_cm33_core0 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNDEBUG -DPICOLIBC_INTEGER_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/targets -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/include/generated -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/soc/arm/nxp_lpc/lpc55xxx -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/../../zephyr/include -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/.. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/include -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/include/platform -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/compiler -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/generate/zephyr -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/tools/acpiexec -IC:/_ddm/ZEPHYR/zephyr_vs/modules/lib/acpica/source/tools/acpidump -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/cmsis/CMSIS/Core/Include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/cmsis/. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/devices/LPC55S69 -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/devices/LPC55S69/drivers -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/common -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/lpc_gpio -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/pint -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/inputmux -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/flexcomm -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/iap1 -IC:/_ddm/ZEPHYR/zephyr_vs/modules/hal/nxp/mcux/mcux-sdk/drivers/lpc_iocon -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/hal_nxp/. -IC:/_ddm/ZEPHYR/zephyr_vs/modules/crypto/mbedtls/include -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/mbedtls/configs -IC:/_ddm/ZEPHYR/zephyr_vs/zephyr/modules/mbedtls/include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -fno-strict-aliasing -Og -imacros C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/_ddm/ZEPHYR/zephyr_latest/zephyr-sdk-0.16.1/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/_ddm/ZEPHYR/zephyr_vs/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/_ddm/ZEPHYR/zephyr_vs=WEST_TOPDIR -ffunction-sections -fdata-sections -mcmse --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj -MF CMakeFiles\app.dir\C_\_ddm\ZEPHYR\zephyr_vs\bootloader\mcuboot\boot\bootutil\src\bootutil_misc.c.obj.d -o CMakeFiles/app.dir/C_/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj -c C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c
In file included from C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include/bootutil/bootutil.h:33,
                 from C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c:36:
C:/_ddm/ZEPHYR/zephyr_vs/bootloader/mcuboot/boot/bootutil/include/bootutil/bootutil_public.h:88:1: error: static assertion failed: "Unsupported value for MCUBOOT_BOOT_MAX_ALIGN"
   88 | _Static_assert(MCUBOOT_BOOT_MAX_ALIGN >= 8 && MCUBOOT_BOOT_MAX_ALIGN <= 32,
      | ^~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\_ddm\ZEPHYR\zephyr_vs\bootloader\mcuboot\boot\zephyr\build'

Environment (please complete the following information):

  • OS: Windows
  • Toolchain: Zephyr SDK 0.16.1
  • Commit: 4129b10 Date: 9/12/2023

Additional information
Compiled the MCUBoot for the mimxrt685_evk_cm33 target without errors.
So this is the lpcxpresso55s69-specific issue.

@butok butok added bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP area: MCUBoot labels Sep 12, 2023
@DerekSnell
Copy link
Contributor

Hi @butok ,
This issue is due to a known limitation of MCUboot, documented at mcu-tools/mcuboot#713. Since this issue documented and tracked in the MCUboot project, you can close this issue here in the Zephyr project.

Best regards

@jhedberg jhedberg assigned dleach02 and butok and unassigned dleach02 Sep 12, 2023
@jhedberg jhedberg added the priority: low Low impact/importance bug label Sep 12, 2023
@butok
Copy link
Contributor Author

butok commented Sep 13, 2023

This is the known limitation of MCUBoot.

@butok butok closed this as completed Sep 13, 2023
@raveslave
Copy link

@butok did you work on a solution to this in your own fork?

@butok
Copy link
Contributor Author

butok commented Oct 24, 2023

@butok did you work on a solution to this in your own fork?

Yes.
Several PRs are still pending:

@raveslave
Copy link

thanks for info!
how about this one? mcu-tools/mcuboot#713

also curious if you can share NXP's long-term plan, is it SBL (https://github.com/nxp-mcuxpresso/sbl) or MCUBoot?

@butok
Copy link
Contributor Author

butok commented Nov 6, 2023

thanks for info! how about this one? mcu-tools/mcuboot#713

also curious if you can share NXP's long-term plan, is it SBL (https://github.com/nxp-mcuxpresso/sbl) or MCUBoot?

Now, Zephyr MCUBoot is functional for LPC55Sxx platforms.
Still TBD: LPC55S36 and LPC55S28.

After you build & flash MCUBoot and its Hello World application, in a serial terminal you should see:

*** Booting Zephyr OS build zephyr-v3.5.0-963-gd5a1a8bf04c9 ***
I: Starting bootloader
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x8000
I: Jumping to the first image slot
*** Booting Zephyr OS build zephyr-v3.5.0-963-gd5a1a8bf04c9 ***
Hello World from Zephyr on lpcxpresso55S69_cpu0!

NOTE:
In the application prj.conf add:

#For LPC
CONFIG_MCUBOOT_EXTRA_IMGTOOL_ARGS="--overwrite-only --align 8"

This is the place for a future improvement, to set application extra options based on the firmware update mode. Have to wait for next imgtool major release.

@raveslave
Copy link

thanks! is 512-byte writes, 512-byte erase supported?

in other words, should SBL be considered legacy?

@butok
Copy link
Contributor Author

butok commented Nov 7, 2023

thanks! is 512-byte writes, 512-byte erase supported?

It is supported for non-swap update modes (overwrite-only).

in other words, should SBL be considered legacy?

It is a different story.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: MCUBoot bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

5 participants