By default, the executable file is in Common Object File Format (COFF). This is an industry-standard format for relocatable and executable object code. Using the object code utility program m1750-coff-objcopy, COFF files may be converted into other industry-standard formats, such as Intel Hex, and Motorola S Records.
The following example shows how we convert a COFF file to Intel Hex format.
$ m1750-coff-objcopy --output-target=ihex hello hello.ihex $
If you don't need the COFF file, then you can get the compiler to generate the Intel Hex file directly.
$ m1750-coff-gcc -O2 hello.c -o hello.ihex -oformat=ihex $ more hello.ihex :1400800085F0F7FFE5EE85108000832085008000B101F102CC :14009400750791010000A210A102F1027AFB850080004A023C :1400A80080008550800085600BC08135814093367EF00068A9 :1400BC0085000000851009D77EF000A5E5007EF000857FF0DC ...lots of output... $
We can run the Intel Hex file, as in the following example:
$ m1750-coff-run hello.ihex Hello world $
Or we can generate Motorola S Records, and run from there.
$ m1750-coff-gcc -O2 hello.c -o hello.sre -oformat=srec $ more hello.sre S00C000068656C6C6F2E73726567 S117008085F0F7FFE5EE85108000832085008000B101F102C8 S1170094750791010000A210A102F1027AFB850080004A0238 S11700A880008550800085600BC08135814093367EF00068A5 S11700BC85000000851009D77EF000A5E5007EF000857FF0D8 S11700D0B2F29FEE81EF85200BBA0A01860200007511803E36 ...lots of output... $ m1750-coff-run hello.sre Hello world $