I'm running cmake on VSCode. I'm trying to set it up to invoke a custom script I wrote to flash the executable into my target mcu.
I'm reading about CROSSCOMPILING_EMULATOR, CMAKE_CROSSCOMPILING_EMULATOR and CMAKE_CROSSCOMPILING but I can't find an example of how to use them properly.
The main issue is that after the building is complete cmake is trying to run the *.elf file.
How can I flash the binary after building?
COMMANDclauses of CMake commands likeadd_testoradd_custom_command. VariableCMAKE_CROSSCOMPILING_EMULATORis additionally used intry_compile. In VSCode you need to specify command line to be used as "run" action. In that command line you could do whatever you want: run your script, pass it parameters, etc. See also stackoverflow.com/questions/49583381/…