How to generate a raw C program with xxx-rtems-gcc?

Fabrício de Novaes Kucinskis fabricio at dea.inpe.br
Thu Dec 22 18:44:26 UTC 2005


Hi all,


First of all, I'm sorry for asking so many questions in the last few days.
It's because I was just setting up my development environment in the free
time (or better said, my "idle" time), and now I'm starting to work with
RTEMS in full-time.

I hope I'll soon stop to ask, and start to answer here in the list ;)

Well, let's go: Is it still possible to compile raw C applications (without
RTEMS libs) using xxxx-rtems-gcc?

I have some applications which I created to test my development board (an
ERC32 from Tharsys) and compiled under sparc-rtems-gcc from RTEMS-4.0.0.

I updated to RTEMS-4.6.4, created some RTEMS applications with success, and
tried to run these raw C ERC32 apps, but when loading them with gdb I got
the error "memory access error while loading".

I tried to recompile the source code and got the message "cannot find symbol
_start". Then I pointed to the "linkcmds" file using the -T switch and the
program was compiled with no warnings or errors.

But when I load and run the application nothing happens; the program I'm
using is just a HelloWorld, and it just finishes doing nothing. I inserted
breakpoints in main() and in the ERC32 initial address (0x2000000), but none
of then is reached.

Am I doing something - or everything - wrong? How can I compile a "raw C"
app with sparc-rtems-gcc from RTEMS 4.6.4?

Thanks in advance,


Fabrício de Novaes Kucinskis - DEA / INPE
-----------------------------------------
Divisão de Eletrônica Aeroespacial
Instituto Nacional de Pesquisas Espaciais




More information about the users mailing list