Skip to content

PSoC6: BUG leading to 95MB Image size #2313

@tomoveu

Description

@tomoveu

When building MCUboot for PSoC6 with WiFi stack enabled, I get a monstrous image size of 95 MegaBytes 🤯

Error: Image size (0x5fefeaa) + trailer (0x20) exceeds requested size 0x1a7000

I checked the output HEX file is about 2MB in size and the actual firmware size is about 700kB.

The bug feels similar to this MCUBoot bug on Nuttx apache/nuttx#14151 that was solved with these linker changes apache/nuttx#14563

What would be the psoc6 related fix for this bug?

Below is the psoc6 build output

[561/561] Linking, creating elf file build/BOOT/APP_CY8CKIT-062S2-AI/Debug/main_app.elf
/Applications/ModusToolbox/tools_3.4/gcc/bin/arm-none-eabi-objcopy -O ihex /Users/dimitomov/psoc62/MCUboot-Based_Basic_Bootloader/main_app/build/BOOT/APP_CY8CKIT-062S2-AI/Debug/main_app.elf /Users/dimitomov/psoc62/MCUboot-Based_Basic_Bootloader/main_app/build/BOOT/APP_CY8CKIT-062S2-AI/Debug/main_app.hex
cp -f ./build/BOOT/APP_CY8CKIT-062S2-AI/Debug/main_app.hex ./build/BOOT/APP_CY8CKIT-062S2-AI/Debug/main_app_raw.hex; rm -f ./build/BOOT/APP_CY8CKIT-062S2-AI/Debug/main_app.hex; /Applications/ModusToolbox/tools_3.4/gcc/bin/arm-none-eabi-objcopy --change-addresses=0 -O ihex ./build/BOOT/APP_CY8CKIT-062S2-AI/Debug/main_app.elf ./build/BOOT/APP_CY8CKIT-062S2-AI/Debug/main_app_unsigned.hex; ../../mtb_shared/core-make/release-v3.6.1/make/scripts/python3.bash ../../mtb_shared/mcuboot/v1.9.1-cypress/scripts/imgtool.py sign --header-size 0x400 --pad-header --align 8 -M 512 -v 1.0.0 -d "(1,1.0.0)" -S 0x1a7000 -R 0xff --overwrite-only -k ../keys/cypress-test-ec-p256.pem ./build/BOOT/APP_CY8CKIT-062S2-AI/Debug/main_app_unsigned.hex ./build/BOOT/APP_CY8CKIT-062S2-AI/Debug/main_app.hex;
Usage: imgtool.py sign [OPTIONS] INFILE OUTFILE
Try 'imgtool.py sign -h' for help.

Error: Image size (0x5fefeaa) + trailer (0x20) exceeds requested size 0x1a7000
make: *** [_mtb_build__legacy_project_postbuild] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions