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: RedBoot? (ARM newlib build)


Bill Gatliff wrote:

Toralf:


Actually, arm-elf newlib assumes ARM's toolchain (esp. the Angel monitor/debugger), which works using SWIs. The following procedure, which I excerpted from one of my training manuals (and I think it's on my website somewhere), rebuilds newlib without SWIs. Please pardon the reformatting, it looks much better in PDF. :^)

Ah. Yes. Now I see. I got confused by the fact that I have redboot-crt0.o, redboot.ld etc. Those are from libgloss, though, not newlib/libc. I'm now building with the attached patch applied...


It is still not clear to me exactly how the correct startup file is found, though. The linker scripts included for ARM have no STARTUP() directive. But now that I think about it, I remember that I had to comment out the one found in the example files when creating the script for my m68k setup (i.e. I don't use one there, either.)


As to your second question, don't port anything you don't need.

Yes. That's probably a good principle. It's not quite clear to me if the unwanted parts of RedBoot actually involve extra poriting work, though. (It could be that those sections are platform independent, and based on certain "core" components that will have to be ported anyway.)




Regards,


b.g.



- Toralf
--- ./newlib-1.11.0/newlib/libc/sys/arm/crt0.S.nomonARM	2003-12-11 09:43:34.000000000 +0100
+++ ./newlib-1.11.0/newlib/libc/sys/arm/crt0.S	2003-12-11 09:44:58.000000000 +0100
@@ -233,7 +233,7 @@
 #ifdef __pe__
 	.word	0x800000
 #else
-/*	.word	0x80000	*/		/* Top of RAM on the PIE board.  */
+	.word	_stack
 #endif
 #endif
 #endif
--- ./newlib-1.11.0/newlib/configure.host.nomonARM	2003-12-11 09:41:11.000000000 +0100
+++ ./newlib-1.11.0/newlib/configure.host	2003-12-11 09:42:06.000000000 +0100
@@ -462,7 +462,7 @@
 # to create the program's environment.
 # See also thumb below.
 #	newlib_cflags="${newlib_cflags} -DARM_RDP_MONITOR"
-	newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
+#	newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
 	;;
   avr*)
 	newlib_cflags="${newlib_cflags} -DNO_EXEC -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"

------
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]