This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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

Re: XScale Redboot C-runtime startup


>>>>> McAtee, Kip writes:

> Greetings-
> We're debugging on an XScale Cyclone board with Redboot.
> When I link my 'app' with:

> /usr/xscale-001130/H-i686-pc-cygwin/bin/xscale-elf-gcc -DDEBUG_PCI
> -DCYGPKG_IO_P CI_DEBUG -Wall -Wpointer-arith -Wstrict-prototypes
> -Winline -Wundef -Woverloaded -virtual -g -fno-rtti -fno-exceptions
> -fvtable-gc -finit-priority -mapcs-frame - I../rb/inc
> -L/usr/xscale-001130/H-i686-pc-cygwin/lib/gcc-lib/
>   xscale-elf/2.9-xscale-001130-specs=iq80310.specs
> ./objs/main.o
> -o objs/test

> and starting with a JTAG emulator from:

> a0020000 <start>:
> a0020000:	e3a0b000 	mov	r11, #0	; 0x0
> a0020004:	e3a07000 	mov	r7, #0	; 0x0
> a0020008:	ea002e75 	b	a002b9e4 <c_start>

> we find ourselves in bsp_trap, without calling main().

> Where is the source to the following C runtime startup routines?
> __do_global_ctors
> __gccmain
> c_start
> _bsp_trap

None of these are provided by RedBoot. They are part of the XScale
toolchain. __do_global_ctors and __gccmain are part of gcc. c_start
and _bsp_trap are part of the toolchain bsp. The early trap (SWI)
is used to get a shared data structure from RedBoot. Other traps
are used for program i/o, etc.

--Mark


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