Hex generating Posted by mclapd on 2015-08-07 04:02 Hi Everyone, How can I generate Hex file on SW4STM? I can just get elf and bin format. Is there any converting tools? Thanks
Posted by mikkl on 2016-03-10 20:25 I found the answer on my own: Need to open project properties -> C/C++ Build -> Settings. On Build Steps tab there's a post-build steps. Need to add this to the end or middle: && arm-none-eabi-objcopy -O ihex "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}.hex" && && is a separator.
Posted by Jurist88 on 2017-09-21 10:37 Hi, I've tried to change Build Settings like stated here (and also like stated there - http://www.openstm32.org/forumthread4783 ) but I get error and debug output like : make --no-print-directory post-build Generating binary and Printing size information: arm-none-eabi-objcopy -O binary “SBT2SLV01_fw.elf” “SBT2SLV01_fw.bin” arm-none-eabi-objcopy: '“SBT2SLV01_fw.elf”': No such file make1: *** post-build Error 1 make: *** SBT2SLV01_fw.elf Error 2 anybody managed to solve this issue?
Posted by tang on 2017-09-22 16:31 Hi, If you did copy/paste the command from the post, the double-quote might have the wrong format (different ASCII characters). Please manually erase then rewrite them. I think it would solve the issue, Regards, Kevin.
Posted by Jurist88 on 2017-09-26 10:41 Hi Kevin, Yes, you were absolutely right! that was the root of the problem. Thank you very much!
Posted by hh on 2017-12-03 02:57 I my case, I wanted SREC output, so this post helped a lot. I have one thing to add - noted above by Kevin also - the forum software on this site changes the quote characters! If you are cutting and pasting be aware of that - compare "this" to "this" and note the substitution of curly quotes in the first for the straight quotes in the second which is in "monospace font/code sample" quoting - see help. This should work: arm-none-eabi-objcopy -O binary "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}.bin" && arm-none-eabi-objcopy --output-target=srec "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}.srec" && arm-none-eabi-size "${BuildArtifactFileName}" so you can also do arm-none-eabi-objcopy --info to see the supported output formats for your platform. (edit to acknowledge Kevin and to add output format example)
Posted by HABOT on 2018-02-04 16:11 Hello guys, I was also struggling with the HEX generation as well but at the end I've discovered that I don't have to do any extra thing since the file is generated automatically! The only thing I needed to do is refreshing the project. After that the binary file just appeared 😉
Posted by avinashmali090@gmail.com on 2018-09-07 12:58 I am using ac6 IDE, in that for generating hex file I follow the steps C/C++ Build -> Settings. but after clicking on setting whole software will crash and continuously buffering.I also try to update the ac6, it will display message no update was found. how to solve this issue
Posted by stephen_newvistas on 2019-07-10 19:09 This link answers the question and uses built in functionality of CubeIDE (Eclipses) https://community.st.com/s/question/0D50X0000AlgEerSQE/how-to-generate-bin-file-after-building-with-cubeide