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]

Stand-alone program


Hi everyone,

	I have successfully installed ecos and all the binutils, gcc and 
gdb stuff for the arm-elf target. How strange it may sounds, I just 
want to know how I can compile a simple application, not using any 
built-in libraries of gcc. I mean, I want to create my own crt.s (C 
runtime startup) assembly file, and then call my main function from 
this crt.s file.

	My crt.s assembly file assembles great with arm-elf-as, but I 
have a small error when compiling my main.c file (the main function of 
which do nothing but return a success exit code):

command used:
	arm-elf-gcc -c -Wa,-marm7tdmi,-mapcs-32 main.c -o main.o
output:
	main.o: In function `main':
	main.o(.text+0xc): undefined reference to `__gccmain'


	Hugo Villeneuve

--------------------------------------
  Hugo Villeneuve
  Hardware/Firmware Developer
  SoftAcoustik Inc.

  (418) 521-1515
  hvilleneuve@softacoustik.com
  http://www.softacoustik.com
-------------------------------------- 



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