2.4. Generating PROM Programming Files

By default, the executable file is in Common Object File Format (COFF). Using the object code utility program m1750-coff-objcopy, COFF files may be converted into several other industry-standard formats, such as ELF, 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 linker to generate the Intel Hex file directly. Note that the Intel Hex file contains no debug information, so if you expect to use the debugger, you should generate the COFF file too.

$ m1750-coff-gnatmake -f hello -largs -Wl,-oformat=ihex
$ more hello
:1000000085108000853005268520806AB1219313F4
:100010008530806A910300008513000185208112DC
:10002000B123931385F0F7FFE5EE8500680090009B
...lots of output...

We can run the Intel Hex file, as in the following example:

$ m1750-coff-run hello
Hello world

Or we can generate Motorola S Records, and run from there. Note that we use the option -f to force a rebuild.

$ m1750-coff-gnatmake -f hello.adb -largs -Wl,-oformat=srec
$ more hello
S008000068656C6C6FE3
S113000085108000853005268520806AB1219313F0
S11300108530806A910300008513000185208112D8
S1130020B123931385F0F7FFE5EE85006800900097
S113003080AE70F001CC0000000000000000000061
S1130040806A8000806E80038072800680768009DA
S1130050807A800C807E800F80828021808680243C
...lots of output...
$ m1750-coff-run hello
Hello world