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] |
Jens-Christian Lache wrote: > Hi! Do you know, what should I do if I want to use target > simulator in arm-elf-gdb debugger? > Normally I use have a monitor program, > which handles software traps. > Thatīs why the code crashes on the simulator. Hi Jean-Christian. To use the built-in gdb simulator for your arm-elf target, you have to remove all your environment, use the default starting files provided by gcc and newlib (crt0.o, crtbegin.o and crtend.o) and the simulator environment provided by gdb (the simulator library for your target). The main steps are : 1. Use the default crt0.o made by newlib (installed under "arm-elf/lib/" of your installation directory). 2. Use the default crtbegin.o and crtend.o made by gcc (installed under "lib/gcc-lib/arm-elf/2.95.2/" of your installation directory). 2. Use the default internal linker script of ld. 3. Link your program with libarm-elf-sim.a (delivered by GDB). 4. launch : arm-elf-gdb <your program>. 5. (gdb) target sim (gdb) load <your program> (gdb) run To compile and link an hello_world.c for your arm-elf target : arm-elf-gcc -g -c hello_world.c arm-elf-gcc -L<your installation directory>/lib -larm-elf-sim -g hello_world.o -o hello_world Remark : You did not have to build your cross tools with specific flags. Pierre. ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |