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]

Hello? World?


Howdy all,

I'm having some wierdness with my attempts to build a hello world program.


-----

[nclarey@nclarey hello-arm]$ make
arm-elf-gcc -mcpu=strongarm1100 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef 
-Woverloaded-virtual -g -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc 
-finit-priority -D__ECOS -fsigned-char  -I/home/nclarey/src/ecos-devel/kernel-build/install/include  -I. 
-c hello.c -o hello.o
hello.c: In function `main':
hello.c:5: warning: implicit declaration of function `printf'
arm-elf-gcc -Wl,--gc-sections -Wl,-static -Wl,-N -g  
-L/home/nclarey/src/ecos-devel/kernel-build/install/lib -nostdlib -nostartfiles -Ttarget.ld hello.o -o 
hello
[nclarey@nclarey hello-arm]$ ls -al
total 659
drwxr-x---    2 nclarey  nclarey      1024 Jun 19 10:27 .
drwxr-x---    8 nclarey  nclarey      1024 Jun 18 13:01 ..
-rw-r-----    1 nclarey  nclarey       979 Jun 18 13:40 Makefile
-rwxr-x---    1 nclarey  nclarey    663741 Jun 19 10:27 hello
-rw-r-----    1 nclarey  nclarey       123 Jun 18 15:01 hello.c
-rw-r-----    1 nclarey  nclarey      1992 Jun 19 10:27 hello.o
[nclarey@nclarey hello-arm]$ arm-elf-gdb hello
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(gdb) tar rem /dev/ttyS0
Remote debugging using /dev/ttyS0
0x50046f84 in ?? ()
(gdb) load
Loading section .rom_vectors, size 0x40 lma 0xc0000000
Loading section .text, size 0x5d08 lma 0xc0000040
Loading section .rodata, size 0x374 lma 0xc0005d48
Loading section .data, size 0x488 lma 0xc00060bc
Start address 0xc0000040 , load size 25924
Transfer rate: 25924 bits/sec, 294 bytes/write.
(gdb) cont
Continuing.



Interrupted while waiting for the program.
Give up (and stop debugging it)? (y or n) y
(gdb) quit

-----

Attached is the makefile and the .c file. You'll obviously have to adjust
it to suit your environment, but is there something obvious I'm doing wrong?
The test programs (bin_sem0, for instance) seem to work fine.

See ya,

Nick

-- 
Nick Clarey, System Architect        | "Sometimes when you fill a vacuum,
3G LAB                               |  it still sucks."  - Rob Pike
ph 44-1223-478900 fax 44-1223-478901 |

hello-arm.tar.gz


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