Convert elf file into an srec file
I am using STM32CubeIDE, version 1.2.0.
I want to convert the elf file into an srec file with a particular format.
I have tried editing the command line in the Post-build steps to read:
arm-none-eabi-objcopy.exe -O srec —srec-len=28 —srec-forceS3 “$(BuildArtifactBaseName).elf�? “$(BuildArtifactBaseName).s19�?
A file is generated with the .s19 extension but the file contents are in the Intel hex format.
I have also tried to select the box in Tool Settings/ MCU Post build outputs window labeled “Convert to Motorola S-record�? and I get the same result. The generated file has the .srec extension but the format of the file is Intel hex.
Has anyone figured out the correct way to do this?
Thanks