🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52944

Re: ROMming gcc 2.1 code

#52944
From: John Clark
Date: Thu, 23 Apr 1992 00:52
36 lines
2028 bytes
In article <1992Apr22.033448.13051@csn.org> craig@teal.csn.org (Craig H. Anderson) writes:
+
+I am considering using gcc 2.1 for cross compiling to an
+embedded processor.  I'd like to hear some reports from
+others doing this.
+
+Craig H. Anderson
+craig@csn.org

My experience with gcc, m68k, and ROM'ed applications has been good.
There are a few considerations though. The most problematic is the
usual 'UN*X' model (or any OS which loads from disk to ram), is the
initialization of the DATA area which is considered to be ram by the
program. BSS can simply be cleared, but the initialized data must
be 'inited' by the rom start up routine.

One way to do this is to use the 'gnu' ld linker to create the
application. Then write a a.out to S-record or equivalent for prom
programing. The ld program puts the initialized data in a determined
way relative to the text portion. The rom startup can then access
the initial data to copy it to ram.

The other major area of 'ROM'ed' problems is in the lack of a 'libc'
equivalent. With the 'glibc' one can extract and modify the usual
I/O routines like printf, etc. so they will run in the embedded
environment.

The 'gdb' tool has the ability to do 'remote' debugging over a
serial line or ethernet, so one can write a primative debugging
monitor to then debug applications on the embedded system.


-- 

John Clark
jclark@ucsd.edu
Technical Details
Message-ID: <31970@sdcc12.ucsd.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!usc!noiro.oac.uci.edu!network.ucsd.edu!sdcc12!sdcc3!jclark
References: <1992Apr22.033448.13051@csn.org>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,f0a8b6f929c1f0bb
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-04-22 17:52:20 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!usc!noiro.oac.uci.edu!network.ucsd.edu!sdcc12!sdcc3!jclark
From: jclark@sdcc3.ucsd.edu (John Clark)
Newsgroups: gnu.gcc.help
Subject: Re: ROMming gcc 2.1 code
Message-ID: <31970@sdcc12.ucsd.edu>
Date: 23 Apr 92 00:52:20 GMT
References: <1992Apr22.033448.13051@csn.org>
Sender: news@sdcc12.ucsd.edu
Organization: University of California, San Diego
Lines: 36
Nntp-Posting-Host: sdcc3.ucsd.edu