2021-12-01 11:43 AM
OK, OK, OK, this is a REALLY dumb question but for the life of me I cannot find out WHERE you turn your hard-earned project with all its bells and whistles into a RELEASED file to download into the proc??!!??
I know this will come back as an easy thing, but google searches show all manner of things for debugging (quite helpful) and the whole environment is great - I now want to turn this project into a file to download into this nice little bit of plastic.......
I will flog myself after getting this to work as it will be no doubt super easy - if you know where to look......
-signed Stupid.
2021-12-01 11:53 AM
Building will create an ELF file which can be uploaded to the processor via STM32CubeProgrammer or similar.
The ELF file is located within the build directory, typically in "Debug" or "Release" based on your selected build configuration.
Build configuration can be changed in Project -> Build Configurations -> Set Active.
You can also generate a HEX file which serves the same purpose. People typically provide HEX files rather than ELF, as it only includes the binary code.
Project -> Properties -> C/C++ Build: Settings -> Tools Settings : MCU Post build outputs: "Convert to Intel Hex file (-O ihex)"
2021-12-01 12:02 PM
Thanks TDK.
I build the project with the 'hammer' and select 'release' and then hit the 'play' button? after making sure the file is selected? The file selected has debug in it (not sure if I did that or not).
I then remove the USB cable which supplies power and plug back in and it does not respond as it should if the program had been programmed into the proc.
What am I missing?
2021-12-01 12:04 PM
Its like its waiting at a breakpoint.....
2021-12-01 01:22 PM
Have you successfully built "Debug" or other configuration, and run it on your board?
Or it is the first time you're trying to run the project?
2021-12-01 01:31 PM
Connect with STM32CubeProgrammer and examine the contents of the flash. If it matches what's in your HEX file, it programmed successfully.
If the real question is "why doesn't my program work?" then perhaps that is what you need to address. Debug the program, step through and see what happens, where it is stuck, etc. "My program doesn't work" isn't very descriptive, just means you likely have a bug somewhere that you need to fix.
2021-12-01 10:59 PM
I had Keil projects that didn't run in debug mode without hitting the start button more than once. Since I couldn't find where I broke it, I finished the project and created a new project and moved it into it.
2021-12-02 09:17 AM
Pavel-
It is a 'finished' project. All debugged and working they way I want it to. I just can't figure out how to get the CubeIDE to download the finished HEX or ELF file into the proc using the ST-Link.
2021-12-02 09:19 AM
Sorry for the confusion; the project works fine. I am through with the debug part and just need to figure out how to get the compiled file into the proc using the ST-Link. I no longer need the ST-Link for debug - just how to use it to get the finished file into the proc so it will run on its own without the IDE.
A simple need but I cannot figure it out......
2021-12-02 09:20 AM
Yeah, it runs fine in debug, I just need it to run on its own!