Project doesn't generate .bin file
After upgrading to STM32CubeMX 4.26 I found, that System Workbench project generated by CubeMX, doesn’t produce .bin file during build. Output directory contains .elf and .hex file. In previous versions there was also .bin file. Probably this is some STM32CubeMX problem. However, having such STM32 Workbench project, I want to know, how it works.
In old version the following information was printed during build:
arm-none-eabi-objcopy -O binary “rcu.elf” “rcu.bin”
Now it prints:
arm-none-eabi-objcopy -O ihex “rcu.elf” “rcu.hex”
I have two questions:
1. How does it work when I press Run or Debug button? Does it burn huge .elf file to the device flash memory? For the same project, bin file size is 90 KB, elf file size is 2900 KB.
2. How to change the project settings, to produce .bin file?
Update. To produce .bin file, I need to change the project by the following way:
Project - Properties - C++ Build - Settings - Buidl Steps - Post-build steps. Replace:
arm-none-eabi-objcopy -O ihex “${BuildArtifactFileBaseName}.elf” “${BuildArtifactFileBaseName}.hex” && arm-none-eabi-size “${BuildArtifactFileName}”
with:
arm-none-eabi-objcopy -O ihex “${BuildArtifactFileBaseName}.elf” “${BuildArtifactFileBaseName}.hex” && arm-none-eabi-size “${BuildArtifactFileName}” && arm-none-eabi-objcopy -O binary “${BuildArtifactFileBaseName}.elf” “${BuildArtifactFileBaseName}.bin”
So, I need an answer to the question #1: how does it work internally, when I press Run or Debug button? Maybe it produces .bin file on the fly and burns it to device?