gcc m68k versus mc8k-palmos

Hi,

I need an m68k crosscompiler for cygwin. I see binaries for gcc-m68k-palmos (prc-tools). Will this work (no palmos on my target platform)?

If not, does anyone know where I can get a cygwin binary for gcc-m68k? Googling only turned up one web page and it was out of data. :( Many thanks!

Jim

Reply to
Jim
Loading thread data ...

I recently went thru the pain of setting this up. My steps...

(1) Download cygwin environment (from

formatting link
free-lets you run Unix (2) Download PALM-5.3-SDK (from
formatting link
free-has includes for C source (3) Download prc-tools (from prc-tools.sourceforge.net) free-tailors cygwin environment to generate m68k code using m68k-palmos-gcc

Hope this helps

Reply to
Timothy R Oltrogge

Go to

formatting link
. There is a link for a patched version of gcc for coldfire. The compiler can be configured to generate code for the m68k including support for the "interrupt" attribute. Only source is available, but it builds without problems under cygwin.

Regards Anton Erasmus

Reply to
Anton Erasmus

It should, maybe it is pre-selected to generate DragonBall code. But with -m68000 (both compiler and linker) it should be possible.

Also you might need to use -nostartfiles for linking and provide your own linker script as the default might be taylored for PalmOS.

--
42Bastian
Do not email to bastian42@yahoo.com, it's a spam-only account :-)
 Click to see the full signature
Reply to
42Bastian Schick

Since you are not using palmos, it's probably best to avoid their binaries.

I think the most common source for modern binaries of gcc-m68k these days is from ucLinux:

formatting link

There are also pre-build binaries for RTEMS, and many suppliers of ColdFire/68k cards have binaries for downloading.

You can build it yourself easily enough:

formatting link

You can also buy ready-made setups with everything you need - for example, Cybertec has a kit for around $140 at

formatting link

Reply to
David

Thanks everyone for your responses! I already have cygwin, I just wanted to avoid building the binaries. I'm on Win98 at home and I read in newsgroups cygwin can be a little touchy with that OS.

As for using coldfire gcc, I think I should avoid that. Coldfire has some unique instructions (floating point, multiply-accumulate, etc.) that aren't compatible with my target micro (Dragonball).

Let me be more specific about my query concerning prc-tools. There's a patch for gcc. I looked at the .diff file (first time I've seen one) and I saw something for PIC. That doesn't matter too much for me. But, isn't that a gcc option anyways? I also saw stuff about r9. The rest I couldn't understand. I did see an option getting added for

-palmos, so as 42Bastian implied, the -m68k optiion is still supported, so it should work.

I was all set to try the prc-tools first, but now I remember: libc. Prc-tools isn't built with newlib, but with libc oriented towards PalmOs. Shoot. I guess I'll build a cross compiler.

David, thanks much for the davehylands link! I hadn't seen that one. I'll try that script for building. Although at work we pay for precompiled gcc, I'm too cheap to lay out that money for a home project :). Also, the binaries we purchased were a real pain to install and work correctly (took DAYS) and would only work on WinNT and above.

Jim

Reply to
Jim

Yes, building the gcc toolset from source under Win98/cygwin rarely works. I have managed it once or twice, but under W2K or WXP you have a much higher chance that it will work.

The gcc for Coldfire is the same gcc as for m68k. You just need to specifify the exact variant you are using. e.g -m68060 for the

68060. The instructions the compiler emits are specific to the variant chosen. [Snipped]

Regards Anton Erasmus

Reply to
Anton Erasmus

Just a followup. I failed building gcc under cygwin & win98. Got some error about vfork and "unable to get resource". A google search said it was a common error & no workaround.

So, I built the tool on my linux box. It built ok, but I see the following error in the gcc-newlib-install.log:

for file in ./m68k-elf/bits/stdc++.h.gch/*; do \ /usr/bin/install -c -m 644 $file /usr/local/m68k/include/c++/3.4.3/./m68k-elf/bits/stdc++.h.gch; done /usr/bin/install: ./m68k-elf/bits/stdc++.h.gch/*: No such file or directory

Googling says it's precompiled header stuff, so I don't think that'll affect me much, if any. I'll write a small program and check the assembler & bin files.

Mogens: yes I plan to make a rommable version of the binary.

Anton: thanks for suggesting the -m68k option. I had assumed the coldfire version only supported coldfire, and nothing else (no cpu options).

Well, thanks again for your inputs!

Jim

Reply to
Jim

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.