newbie question gnu gcc H8/300

Hello,

this is the first time I'm using the gcc for H8300 and I have the following question: Can anyone tell me the steps how I compile a simple C-File for the H8300 CPU after this I want to program a flash with the binary.

Thank you very much, for your help

bye

martin

Reply to
Martin Sauer
Loading thread data ...

What sorts of problems are you having? I've only used the gcc for it once, and don't remember details except that it wasn't that difficult once you've got the cross compiler installed and your paths set. If you need s-record format for flash, then the objcopy utility will do that for you.

For some pointers, check out the Lego Mindstorm's pages, since that uses the H8/300. In particular, look at:

formatting link
and
formatting link
These use the gcc cross compiler, and have makefiles nearly ready to go. They don't have prebuilt cross compilers, but instructions are in the second link.

--
Darin Johnson
    Caution! Under no circumstances confuse the mesh with the
 Click to see the full signature
Reply to
Darin Johnson

h8300-elf-gcc -Wall -c foo.c

Then you'll have to link it and probably convert it to motorola SREC format.

$ man ld $ man objcopy

Also, start reading here:

formatting link

And here is an excellent source for toolchains:

formatting link

--
Grant Edwards                   grante             Yow!  Psychoanalysis?? I
                                  at               thought this was a nude
 Click to see the full signature
Reply to
Grant Edwards

Probabaly I found a docu or manual with a step-by-step sample.

Grant Edwards schrieb:

Reply to
Martin Sauer

The first step is to get HEW and install gcc within it :) Then everything becomes simple. Assuming you are using Windows of course...

Reply to
Grzegorz Mazur

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.