ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
/tmp/cckwpwwe.o(.text+0x36): In function `delay':
: undefined reference to `at91_pio_read'
/tmp/cckwpwwe.o(.text+0x5a): In function `delay':
: undefined reference to `at91_pio_read'
/tmp/cckwpwwe.o(.text+0x70): In function `delay':
: undefined reference to `at91_pio_read'
/tmp/cckwpwwe.o(.text+0x90): In function `delay':
: undefined reference to `PIO_DESC'
/tmp/cckwpwwe.o(.text+0xa8): In function `main':
: undefined reference to `at91_pio_open'
/tmp/cckwpwwe.o(.text+0xb8): In function `main':
: undefined reference to `at91_pio_open'
/tmp/cckwpwwe.o(.text+0xc4): In function `main':
: undefined reference to `at91_pio_write'
/tmp/cckwpwwe.o(.text+0xd4): In function `main':
: undefined reference to `at91_pio_write'
/tmp/cckwpwwe.o(.text+0xe4): In function `main':
: undefined reference to `at91_pio_write'
/tmp/cckwpwwe.o(.text+0xf4): In function `main':
: undefined reference to `at91_pio_write'
/tmp/cckwpwwe.o(.text+0x104): In function `main':
: undefined reference to `at91_pio_write'
/tmp/cckwpwwe.o(.text+0x114): more undefined references to `at91_pio_write' foll ow
/tmp/cckwpwwe.o(.text+0x128): In function `main':
: undefined reference to `PIO_DESC'
collect2: ld returned 1 exit status
led_blink is a sample file from the CD
software/ is the directory where all the headers from the CD are.
I can connect to angel(on board) with gdb:
Code:
arm-elf-gdb
(gdb) tar rdi s=/dev/ttyS0
But what do these options like rdi and s and -mthumb actually mean? what other options are there?
I'm not familiar with system you are using, or the specifics of the GCC compiler, but those error messages seem to be telling you that you either have:
1) some undefined environment variables which might point to include files ? PIO_DESC or otherwise...
also
2) double check your use of the gcc command line and options... it's been a while since I used cc or gcc... if I remember correctly, you are intending to default compile and link.
The switches i used just define the target processor/instruction set and the include path. i dont know what other switches i could use. when i run arm-elf-gcc --help. it just gives the standard gcc help. there are no arm-elf specifics.
If it's not too big. You want to look for the symbol PIO_DESC and figure out if it is defined in one of your include files or should be in your environment variables.
ok, i posted, but no replies...yet(its been a week or something).
ive had a look through the files supplied. cant find anything.
is it possible that it is part of a C library, and i am supposed to include that in my command line args for arm-elf-gcc? if arm-elf-gcc is using the standard c library, i can understand why this is happening.
What file extension would a C library be likely to have? .c .o .h?
also, is there a generic naming convention for c libraries like elflib.o or arm.c or something?
it's just that i have no idea where to look, and there are loads of files in the software/ dir.
i would be quite content using assembly rather than c(at first), but i cant find any ASM tutorials for AT91 ARM7TDMI stuff on the www.
i just wanna make it do something!
how about
target rdi=/dev/ttyS0
i can see it tells gdb that the board is at ttyS0, but what does rdi mean? and what other switches are there that i could use? what do they do? where can i find out???
/root/gnuarm-3.4.3/bin/../lib/gcc/arm-elf/3.4.3/../../../../arm-elf/bin/ld: cannot find -llib_r40807.o
collect2: ld returned 1 exit status
ive looked around and have noticed that the common solution to this is to cut off the '.o' extension and the lib part at the beginning. ive tried these things, but they dont do anything.
Give me a little background on this system. Do you have access to the man page for the cc compiler for it?
It might simplify things if you study the man page for the cc compiler and then setup your compilation in 2 steps:
1) compile your source code (led-blink.c) to an object file
cc -c led-blink.c (will produce led-blink.o I think)
2) link led-blink.o with your object libraries
cc <executable name~ led-blink > led-blink.o library.o
You can usually set various option switches to debug and give you more information about compilation and linking errors. compilation errors are likely to be due to undefined symbols or syntax errors. link errors will result if your program object is trying to use functions which aren't defined (because you haven't found the right object libraries to link with it).
There are various tools for snooping around and finding functions in libraries, so if you find a directory with a bunch of .o files, I would start there. /usr/lib might be a good place to start.
Good luck. Sorry I can't be more help. I still can't find a gcc.man page, and I am busy trying to get a Linux distribution installed on a nice Dell notebook that I have which is crippled by Windows Vista at present.
thanks, i was misusing the L command.
i have another more well defined problem:
according to:
Code:
file lib_pio.o
the libraries are AOF object files.
gcc gives an error saying it is an unrecognized format. arm-elf-gcc only supports ELF objects, i presume.
is there a way i can convert them?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.