This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building for custom 68k or ColdFire board without OS?


Mark Powell wrote:


Toralf Lund wrote:


Mark Powell wrote:

We use the development environment you are proposing and it works extremely well.


Sounds good.

Do you use the assembler at all? How well does it work?


Yes, but only for simple very low-level stuff.

Well, what we are doing is not wery advanced, either. The problem with the older revision of gas was that it wasn't quite able to parse our files as it was very picky about spacing etc., and some common constructs like 'equ' just weren't supported. (I tried to update it, but I soon got more untested changed than I liked...)


[ ... ]



So newlib, not glibc or similar, is the thing to use for embedded systems?


Yes, newlib has a much smaller footprint.

Size is a concern, of course...


There are other alternatives (uClibc for example) but I have found newlib perfectly adequate and simple enough to be mangeable.


I wrote some low-level routines (in C) that newlib calls to do serial port i/o to the UART



Would that be routines to read or write one character? I have those allready...


Actually I implemented it like a driver and provided open(), read(), write() and close() to call serio_open() etc in my UART code. Newlib has a library called libgloss which has these implemented for a few platforms. I used those as a starting point.

I see. Well, I guess I just need to have a look at this code.



Is that the application start up code that calls main()? If so I adapted one from libgloss.

Yes. It does some low level initialisation like setting up the stack pointer, then calls


bsr main


You can configure the tools to produce COFF or ELF. I use COFF with m68k toolset, mainly for historical reasons; but have switched to ELF for a new generation of h/w using PPC. Neither are particularly hard to deal with.

OK. I'll check out the docs for these formats.


- Toralf



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]