cancel
Showing results for 
Search instead for 
Did you mean: 

Generate a 'released' version

SScot.3
Associate II

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.

12 REPLIES 12
TDK
Guru

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)" 

If you feel a post has answered your question, please click "Accept as Solution".
SScot.3
Associate II

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?

SScot.3
Associate II

Its like its waiting at a breakpoint.....

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?

TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".
Muhammed Güler
Senior III

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.

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.

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......

Yeah, it runs fine in debug, I just need it to run on its own!