Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » ARM Projects Beginner Questions
ARM Projects Beginner Questions [message #789971] Fri, 03 February 2012 16:31 Go to next message
Vahid AA is currently offline Vahid AAFriend
Messages: 1
Registered: February 2012
Junior Member
Dear Friends
I'm beginner in ARM Projects development, and I wanted to start with run a simple "Hello world" on my OK6410 Board. My board processor is ARM 1176jzf-s.
I used Eclipse CDT and installed Sourcery_CodeBench_Lite_for_ARM_EABI on windows 7 platform and add GNU ARM Eclipse Plug-in.
my program:
#include "stdio.h"

int main(void) {
printf("Hello world !\n");
return 0;
}


When I wants to build my hello world project I get these errors:

**** Build of configuration Debug for project helloarm ****

cs-make all
Building target: helloarm.elf
Invoking: ARM Sourcery Windows GCC C Linker
arm-none-eabi-gcc -Wl,-Map,helloarm.map -mcpu=arm1176jzf-s -mthumb -g3 -o "helloarm.elf" ./hello.o
cygwin warning:
MS-DOS style path detected: D:\workspace\helloarm\Debug
Preferred POSIX equivalent is: /cygdrive/d/workspace/helloarm/Debug
CYGWIN environment variable option "nodosfilewarning" turns off this warning.

c:/codesourcery/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol _start; defaulting to 0000800c
c:/codesourcery/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text+0xc): undefined reference to `_sbrk'
c:/codesourcery/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text+0x10): undefined reference to `_write'
c:/codesourcery/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-closer.o): In function `_close_r':
closer.c:(.text+0xc): undefined reference to `_close'
c:/codesourcery/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.c:(.text+0xe): undefined reference to `_fstat'
c:/codesourcery/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.c:(.text+0xc): undefined reference to `_isatty'
c:/codesourcery/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.c:(.text+0x10): undefined reference to `_lseek'
c:/codesourcery/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-readr.o): In function `_read_r':
readr.c:(.text+0x10): undefined reference to `_read'
collect2: ld returned 1 exit status
cs-make: *** [helloarm.elf] Error 1

**** Build Finished ****


I think these errors related to linker but I cannot find the solution could you please help me?!
thanks
Re: ARM Projects Beginner Questions [message #803525 is a reply to message #789971] Tue, 21 February 2012 13:01 Go to previous message
Hard Maker is currently offline Hard MakerFriend
Messages: 4
Registered: February 2012
Junior Member
Hi,
The problem is you need to add the implementation of "syscalls". When use printf function (as others library functions), newlib call low level functions called "syscalls", this functions do architecture specific task. Think this: if you have 2 boards, one using a text lcd display and the other with graphical display is not the same send text for each one. Syscalls port hight level functions to work with diferent hardware. To know how you can write this functions, read the "newlib manual", chapter 12 (syscalls).
Good luck
Previous Topic:How to add my toolchain (compiler)
Next Topic:Documentation for integrating new compiler/debugger into CDT
Goto Forum:
  


Current Time: Tue Apr 23 07:45:02 GMT 2024

Powered by FUDForum. Page generated in 0.03062 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top