External Flash loader problem when compiling with vscode + CMake
I am using STM32CubeMX 6.16.1 to generate project with external Flash loader for STM32N6. When I generate for STM32CubeIDE and build the extmemloader then STM32CubeProgrammer can parse it (the .elf renamed to .stldr). But when I generate CMake project and build with vscode (with STM32 extensions) then STM32CubeProgrammer fails to parse. Compiler/linker removes the StorageInfo structure from output completely. I fooled it to keep it. Now it doesn't fail immediately, but still can't parse any info either.
Here's the CubeProgrammer EL list view. First is vscode built loader, second is Eclipse built:
![]()
I compared the ELF files, Map files, compiler and linker flags. There are plenty of differences and I haven't figured out what exactly causes it. I changed the flags but nothing helped. I noticed vscode uses GCC 14 and STM32CubeIDE uses GCC 13 but tricking vscode to use GCC 13 didn't solve it either.
