I have a project containing a bootloader and application target. Both targets are added in CMAKE using add_bsp_based_executable()
For both targets I add these flags:
GENERATE_BIN
GENERATE_HEX
When I build at the solution or CMake project level it will produce a .bin and .hex for both targets.
If I right click on the specific bsp_exe target in the solution explorer and click “build target(s)” it will not produce a .bin or .hex file. I would expect that when I build each target individually that these files are also produced, however that is not the case.
This causes issues for me because of post-build actions that depend on these files being created. The post build actions will run regardless of the two methods above used to build. However, when you build the specific target the .hex and .bin files will be outdated or missing.