[ previous ] [ Abstract ] [ Copyright Notice ] [ Contents ]

Free H8 development environment under Linux
Chapter 5 Executing your own code


5.1 h8comm : H8 flash memory writing tool

h8comm is a flash memory writing tool. Refer the h8comm manual.


5.2 Executing sample source

romsmpl.bin in h8comm distribution is a sample program binary. It sends "Hello, world" to the serial line, and blinks I/O port B.

To load it in ROM and execute it, use h8comm with the following options.

     h8comm romsmpl.bin

It will output messages received from H8 to stdout.


5.3 Make binary image from C sources

To make binary image from C sources, make COFF image first.

     h8300-hms-gcc -O -mh -mrelax -T /usr/local/lib/h8comm/h8ram.x
     -nostartfiles /usr/local/lib/h8comm/h8crt0.o sample.c -o sample

will make COFF file sample. -T option specifies linker script file, and h8ram.x may be used for bootstrap programs, and h8rom.x may be used for programs in ROM.

Next, objcopy converts COFF file to raw binary file.

     h8300-hms-objcopy -O binary -R .stack sample sample.bin

sample.bin created by this command is used by h8comm.


[ previous ] [ Abstract ] [ Copyright Notice ] [ Contents ]
Free H8 development environment under Linux
version 1.0, 24 Nov 1999
Muneyuki IWATA kp9m-iwt@asahi-net.or.jp