Generate.hex file

Hi all,
I wrote a code for STM32F103C8. I want to generate a . Hex file for proteus simulation I selected compilation in verbose output under preferences and I also selected the option to export binary option under sketch tab but the hex file was not generated for some reason and only the elf file was generated. On compiling multiple times also the same thing repeated. There was no compilation error and I also chose the board of the generic STM32F1XXX series. Can someone please help as to why the hex file is not being generated

A little outside my league and not familiar with your board but was a BIN file generated?

If yes, you can try to find a tool to convert it to HEX if that's the only thing that Proteus accepts.

Sure I will into that, the bin file was also generated

The STM32CubeProgrammer seems to be able to load and save firmware files in the following formats/extensions.

*.bin
*.binary (probably the same)
*.hex
*.srec
*.elf
*.out
*.axf
*.tsv

I used it once to convert from SREC to HEX and for the other formats other than bin I have never used those.

Worth a try, it's freeware.

Hi is there any video that you could recommend as I have not touched STM32CubeProgrammer at all, after downloading I cannot find the option to convert the file, I can upload the file. Also I do not have a board physically I need the hex file for digital simulation,

Too simple for a video.

You open the BIN file with the screen I already shared where you see a tab OPEN FILE

Then save as and give it a name like blablabla.hex

Thank you so much, after uploading the code a fatal error was given in proteus:
"Internal Exception: access violation in module "VSMEDIT.DLL" [00004A25]", is there any way to resolve this error as after clicking "ok" it just closes proteus.
image

No clue what Proteus is, but what I usually try is opening the ***.exe as administrator on my PC when I see "access violation". Sometimes that works.

A new violation error came, this time it was for IGC32.DLL
image

In your case I would have dumped Proteus and buy a Bluepill and an ST-Liink. Second example this week that there seems no 100% substitute for real hardware

I would look for a Proteus forum and ask the question there :wink:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.