bmd-studio / stm32-for-vscode

STM32 extension for working with STM32 and CubeMX in VSCode
MIT License
195 stars 27 forks source link

.elf generated by STM32-For-VSCode much smaller than STM32CubeIDE #163

Closed tomqhoang closed 9 months ago

tomqhoang commented 9 months ago

Hi, not sure if this is so much an issue with the extension, but I just wanted some feedback on how to debug this. Normally, I do not have an issue with compiling and flashing new projects, but for this project, I needed to work from someone else's codebase.

However, I have been running into an issue where the produced .elf by the VScode isn't produced correctly (and is much smaller).

VSCode: text data bss dec hex filename 88 8 13856 13952 3680 build/HS.elf

STM32CubeIDE: text data bss dec hex filename 144176 2572 91208 237956 3a184 HS.elf

Has anyone run into this issue before? Or should I just create a new project and import all of their files one by one?

tomqhoang commented 9 months ago

Hi, sorry for the issue. I did figure it out - the original Makefile produced by STM32CubeIDE did not properly include the startup file from the right directory. I included the proper path, and now the file sizes are what I expect.