Skip to content

Bootloader interface won't link with applications built with STM32CubeIDE 1.9.0 #4

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

Closed
firmwareguru opened this issue Sep 19, 2022 · 2 comments

Comments

@firmwareguru
Copy link
Contributor

Issue appears as linker error in following form during build:

...\ld.exe: cannot use executable file '...\stm32-secure-patching-bootloader-interface-gcc_xxxxx.o' as input to a link

Present in stm32-secure-patching-bootloader versions v1.2.0 and earlier.

@firmwareguru
Copy link
Contributor Author

This is not a bug in the stm32-secure-patching-bootloader, but an issue introduced with ld in binutils 2.36 included with the updated toolchain with STM32CubeIDE 1.9.0.

In detail, a check was added to the ld linker to reject input elf/object files that have the type attribute ET_EXEC. This check was added as a result of this issue. It must be noted that the standard .elf output for microcontroller/embedded systems projects (at least for ARM cortex-M) builds static "executables" with the ET_EXEC type set. This issue raises the possibility that there are use cases for linking with ET_EXEC type elf files.

@firmwareguru
Copy link
Contributor Author

Fixed release v1.3.0.

Solution is not to use linker at all. The Secure Engine callgate addresses are provided directly in the bootloader application linker file rather than through an object file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant