[comp.sys.amiga] ROM based 68000 cross developement

hutch@net1.ucsd.edu (Jim Hutchison) (09/05/88)

< Amiga cross development to ROM/RAM based 68000 >

I am currently working at a company which makes heavy use of
co-processor boards for parallel implementation of algorithms.

In a nut shell, part of the work for an application is done in the
main "general" purpose processor, and the rest of the work is done
on programmable peripherals which have down and dirty access to bits
of custom logic and high speed external devices.

Our new line of co-processors is 680x0 based, and the cross developement
is done on a PC under DS-DOS.  Why a PC?  Because we have them already.
I do not want to work under MS-DOS any more than I have to.  I would like
to work on an Amiga.  

I am thus in search of a cross compiler/assembler/linker which generate
68000 code and is based on the Amiga.  Also any information on
hardware simulators for the Amiga would be greatly appreciated (Our
hardware engineers are also interested in doing design simulation).

Thanks.
-
/*    Jim Hutchison   		UUCP:	{dcdwest,ucbvax}!cs!net1!hutch
		    		ARPA:	JHutchison@ucsd.edu		*/

knurlin@trwspf.TRW.COM (Scott Karlin) (09/06/88)

In article <1124@ucsd.EDU> hutch@net1.UUCP (Jim Hutchison) writes:
>I am in search of a cross compiler/assembler/linker which generate
>68000 code and is based on the Amiga.
You can use standard Amiga C compilers, 68000 assemblers, and BLINK
to generate code that will run on the 68000.  I have built several
680x0 projects using the Amiga to develop code.  (Including an
8-node hypercube with 10 MHz 68010's with the Amiga as a front end.)
Since the executable code for the Amiga is relocatable, I have written
a little program to convert Amiga executable files to Motorola S
format. (You need to give the absolute addresses of the CODE, DATA,
and BSS sections.)  There are some rules that you must live with
like:  You can't link with the supplied libraries; you need to write
your own versions of scanf, printf, etc.  If the code is to be
placed in ROM, you cannot initialize variables that you plan on
changing.  External and static variables will not be initialized
to zero.
The bottom line:  you can use the development tools you [probably]
already have, if you are willing to live with some rules.
Best of Luck.
-Scott


-- 
-- Scott Karlin
   TRW, Bldg O2-1761, One Space Park, Redondo Beach, CA 90278
   BIX:     sckarlin
   USENET:  knurlin@trwspf.trw.com     Phone:  (213) 535-1708
            {sdcrdcf, scgvaxd, ucbvax}!trwrb!trwspf!knurlin

ericb@athertn.Atherton.COM (Eric Black) (09/07/88)

In article <814@trwspf.TRW.COM> knurlin@trwspf.UUCP (Scott Karlin) writes:
>In article <1124@ucsd.EDU> hutch@net1.UUCP (Jim Hutchison) writes:
>>I am in search of a cross compiler/assembler/linker which generate
>>68000 code and is based on the Amiga.
>You can use standard Amiga C compilers, 68000 assemblers, and BLINK
>to generate code that will run on the 68000.  I have built several
>680x0 projects using the Amiga to develop code.  (Including an
>8-node hypercube with 10 MHz 68010's with the Amiga as a front end.)
>Since the executable code for the Amiga is relocatable, I have written
>a little program to convert Amiga executable files to Motorola S
>format. (You need to give the absolute addresses of the CODE, DATA,
>and BSS sections.)  There are some rules that you must live with
>like:  You can't link with the supplied libraries; you need to write
>your own versions of scanf, printf, etc.  If the code is to be
>placed in ROM, you cannot initialize variables that you plan on
>changing.  External and static variables will not be initialized
>to zero.
>The bottom line:  you can use the development tools you [probably]
>already have, if you are willing to live with some rules.

A couple of years ago I wrote such a tool, called "unhunk".  It is
available on Fish Disk #26.  It translates Amiga-format executable
files into something which resembles UNIX "a.out" format, performing
relocation into code, data, and bss segments as it goes.  Included
with it is a separate program which takes this output file and
generates Motorola S-records for downloading to a test machine or to
a PROM programmer.

The tricky part about cross-development is living within the rules,
such as Scott stated above.  You probably are well aware of the
difference between ROM and RAM, and the need to explicitly initialize
RAM and not rely on the compiler/linker/loader to do it for you
(e.g. initialized static variables are a definite no-no).  But part
of programming in a higher-level language, even C, is taking advantage
of the runtime support.  The hardest part about this is knowing
what runtime library routines are "safe" to call, that is, which ones
do not make any hidden calls to the operating system.  Things like
strcmp() and strcpy() are fine, things like open() and AllocMem()
obviously are not, but there are many between those extremes.  If the
compiler's documentation doesn't tell you what you need to know,
the compiler vendor's support people should be able to.  If all else
fails, disassemble the library functions of interest (for Lattice you
can use OMD, for Manx you can use SDB, for either you can link the
routine into a program and use MetaScope; there was even a 68K disassembler
floating around on the net, and it might be on a Fish disk).

I found the Amiga with either native Manx or Lattice C compiler for
cross-development of embedded 68K code highly preferable to the
Motorola Exor-MACS development system -- but I guess that's no strong
praise :-)   A multiple-window multi-tasking development environment
is quite nice to have.

>Best of Luck.
>-Scott

Yes, indeed!
-- 
Eric Black	"Garbage in, Gospel out"
Atherton Technology, 1333 Bordeaux Dr., Sunnyvale, CA, 94089
   UUCP:	{sun,decwrl,hpda,pyramid}!athertn!ericb
   Domainist:	ericb@Atherton.COM