FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2009 Threads] Compiling ARM7_LPC2368_Eclipse demoPosted by Sergio Sider on March 2, 2009 Hi guys,
I am getting erros when I tried to compile the ARM7_LPC2368_Eclipse demo using arm-none-eabi (from Codesourcery). They appear to be "linker" related, because all the files compiled ok.
First one:
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/bin/ld.exe: error: no memory region specified for loadable section `.ARM.exidx'
I tried to solve it (or at least, make the code compile) adding the following lines to the lpc2368.ld file (I found googling around):
/* .ARM.exidx is sorted, so has to go in its own output section. */ __exidx_start = .; .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } >ram __exidx_end = .;
I have no idea if this is ok, but at least I dont get this error anymore...
But, now I got the following errors:
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-sbrkr.o): In function `_sbrk_r': sbrkr.c:(.text+0xc): undefined reference to `_sbrk' c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-writer.o): In function `_write_r': writer.c:(.text+0x10): undefined reference to `_write' c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-closer.o): In function `_close_r': closer.c:(.text+0xc): undefined reference to `_close' c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-fstatr.o): In function `_fstat_r': fstatr.c:(.text+0xe): undefined reference to `_fstat' c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-isattyr.o): In function `_isatty_r': isattyr.c:(.text+0xc): undefined reference to `_isatty' c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-lseekr.o): In function `_lseek_r': lseekr.c:(.text+0x10): undefined reference to `_lseek' c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/thumb\libc.a(lib_a-readr.o): In function `_read_r': readr.c:(.text+0x10): undefined reference to `_read'
I am guessing it´s library related because of printf or something like it... What do I have to include explicitely ?
On the error messages, there´s references to libc.a , I tried to explicitely define -lc (no result). However in the demo projetct there is no explicit referente to any library.
Any sugestions?
THanks! Sergio P. SIder
RE: Compiling ARM7_LPC2368_Eclipse demoPosted by Dave on March 3, 2009 Try compiling with Yagarto. See www.Yagarto.de.
RE: Compiling ARM7_LPC2368_Eclipse demoPosted by Bart De Boeck on March 3, 2009 Dear Sergio,
The Yagarto tools should do it. I have the lpc2368 Eclipse demo compiling with Eclipse (Europe) and Yagarto. Check the tutorial on http://www.freertos.org/Eclipse.html for installing/configuring Eclipse.
OpenOSD might be usefull: http://openocd.berlios.de/web/.
Have fun, Bart
RE: Compiling ARM7_LPC2368_Eclipse demoPosted by Sergio Sider on March 4, 2009 Thank you guys,
I will try it, although the link for download in sourceforge is broken (yagarto). I managed to download the file googling around, although it´s not too safe to do it...
Thanks again, Sergio P. Sider
RE: Compiling ARM7_LPC2368_Eclipse demoPosted by Lao lao on May 5, 2009 Hi all,
I have followed the instructions to install Eclipse for testing the ARM7_LPC2368_Eclipse demo. But I have problem with the project's compilation:
**** Build of configuration Default for project RTOSDemo ****
(Exec error:Launching failed)
I would like to know if I have to install some other additional tool or setting for compiling the project without error? Please help me. Thanks.
RE: Compiling ARM7_LPC2368_Eclipse demoPosted by Richard on May 5, 2009 Check that the GCC compiler is in your path.
Open a command prompt and type "arm-elf-gcc", you should get a message saying something like "no input file specified". If you get a message saying arm-elf-gcc is not a known program then you need to add the YAGARTO/bin directory to your PATH environment variable.
Next in the command prompt try typing "make". Does it recognise that command?
Regards.
RE: Compiling ARM7_LPC2368_Eclipse demoPosted by Lao lao on May 5, 2009 Hi Richard,
It means that I have to install YAGATO as well? Anything else? Now I've just installed and configured Eclipse on my PC.
RE: Compiling ARM7_LPC2368_Eclipse demoPosted by Dave on May 5, 2009 Read the following page - http://www.freertos.org/portlpc2368_Eclipse.html
RE: Compiling ARM7_LPC2368_Eclipse demoPosted by Lao lao on May 6, 2009 Thanks Dave, I can now launch the yagarto tool but still have problem with the compilation:
**** Build of configuration Default for project RTOSDemo ****
make all arm-elf-gcc -c -g -O1 -Tlpc2368.ld -I . -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer -mthumb-interwork -mthumb main.c -o main.o process_begin: CreateProcess(NULL, arm-elf-gcc -c -g -O1 -Tlpc2368.ld -I . -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute((packed)) -D ALIGN_STRUCT_END=__attribute((aligned(4))) -fomit-frame-pointer -mthumb-interwork -mthumb main.c -o main.o, ...) failed. make (e=2): The system cannot find the file specified.
make: *** [main.o] Error 2
What is the solution?
RE: Compiling ARM7_LPC2368_Eclipse demoPosted by Lao lao on May 6, 2009 Now I can pass this step but still error 'cause some functions are not supported. Here some what I have from the output windows: ... c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.3.3/../../../../arm-elf/lib/thumb/interwork\libg.a(lib_a-freer.o): In function `_malloc_trim_r': C:\msys\1.0\home\yagarto\newlib-build\arm-elf\thumb\interwork\newlib\libc\stdlib/../../../../../../../newlib-1.17.0/newlib/libc/stdlib/mallocr.c:3326: undefined reference to `_sbrk_r' C:\msys\1.0\home\yagarto\newlib-build\arm-elf\thumb\interwork\newlib\libc\stdlib/../../../../../../../newlib-1.17.0/newlib/libc/stdlib/mallocr.c:3335: undefined reference to `_sbrk_r' C:\msys\1.0\home\yagarto\newlib-build\arm-elf\thumb\interwork\newlib\libc\stdlib/../../../../../../../newlib-1.17.0/newlib/libc/stdlib/mallocr.c:3340: undefined reference to `_sbrk_r' c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.3.3/../../../../arm-elf/lib/thumb/interwork\libg.a(lib_a-mallocr.o): In function `malloc_extend_top': C:\msys\1.0\home\yagarto\newlib-build\arm-elf\thumb\interwork\newlib\libc\stdlib/../../../../../../../newlib-1.17.0/newlib/libc/stdlib/mallocr.c:2160: undefined reference to `_sbrk_r' C:\msys\1.0\home\yagarto\newlib-build\arm-elf\thumb\interwork\newlib\libc\stdlib/../../../../../../../newlib-1.17.0/newlib/libc/stdlib/mallocr.c:2197: undefined reference to `_sbrk_r' c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.3.3/../../../../arm-elf/lib/thumb/interwork\libg.a(lib_a-makebuf.o): In function `__smakebuf_r': C:\msys\1.0\home\yagarto\newlib-build\arm-elf\thumb\interwork\newlib\libc\stdio/../../../../../../../newlib-1.17.0/newlib/libc/stdio/makebuf.c:59: undefined reference to `_fstat_r' C:\msys\1.0\home\yagarto\newlib-build\arm-elf\thumb\interwork\newlib\libc\stdio/../../../../../../../newlib-1.17.0/newlib/libc/stdio/makebuf.c:110: undefined reference to `_isatty_r' c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.3.3/../../../../arm-elf/lib/thumb/interwork\libg.a(lib_a-stdio.o): In function `__sclose': C:\msys\1.0\home\yagarto\newlib-build\arm-elf\thumb\interwork\newlib\libc\stdio/../../../../../../../newlib-1.17.0/newlib/libc/stdio/stdio.c:124: undefined reference to `_close_r' c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.3.3/../../../../arm-elf/lib/thumb/interwork\libg.a(lib_a-stdio.o): In function `__sseek': C:\msys\1.0\home\yagarto\newlib-build\arm-elf\thumb\interwork\newlib\libc\stdio/../../../../../../../newlib-1.17.0/newlib/libc/stdio/stdio.c:106: undefined reference to `_lseek_r' c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.3.3/../../../../arm-elf/lib/thumb/interwork\libg.a(lib_a-stdio.o): In function `__swrite': C:\msys\1.0\home\yagarto\newlib-build\arm-elf\thumb\interwork\newlib\libc\stdio/../../../../../../../newlib-1.17.0/newlib/libc/stdio/stdio.c:78: undefined reference to `_lseek_r' C:\msys\1.0\home\yagarto\newlib-build\arm-elf\thumb\interwork\newlib\libc\stdio/../../../../../../../newlib-1.17.0/newlib/libc/stdio/stdio.c:86: undefined reference to `_write_r' c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.3.3/../../../../arm-elf/lib/thumb/interwork\libg.a(lib_a-stdio.o): In function `__sread': C:\msys\1.0\home\yagarto\newlib-build\arm-elf\thumb\interwork\newlib\libc\stdio/../../../../../../../newlib-1.17.0/newlib/libc/stdio/stdio.c:48: undefined reference to `_read_r' collect2: ld returned 1 exit status make: *** [RTOSDemo.elf] Error 1
Any idea?
RE: Compiling ARM7_LPC2368_Eclipse demoPosted by jengoreda on August 13, 2009 Hi all, i am facing this problem as well. i am using codesourcery 2009q1-161-arm-none-eabi- with eclipse Galileo. is there any update version of the demo code could be compiled by codesourcery 2009q1-161-arm-none-eabi- with eclipse Galileo?
Thanks very much.
please update me: jengoreda@gmail.com
RE: Compiling ARM7_LPC2368_Eclipse demoPosted by eduardo on August 14, 2009 Lao, you can fix it providin a syscalls.c file. That is because new newlib. Take a look at yagarto web site. They provide an example.
RE: Compiling ARM7_LPC2368_Eclipse demoPosted by eduardo on August 14, 2009 Let me help a little bit more. If you are using newlib 1.17, just create a file called syscalls.c like http://www.yagarto.de/download/yagarto/syscalls.c and compile together.
There is more information on http://www.yagarto.de/howto/yagarto1/yagarto_newlib.txt .
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|