This is the mail archive of the ecos-discuss@sourceware.org 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]
Other format: [Raw text]

Re: Eclipse / CDT without Makefile Project


John,

Thanks, now it is closer. I have provided the output showing the final failure:

/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld: cannot find crt0.o: No such file or directory
/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld: cannot find -lg
/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [Sources/hello.o] Error 1

07:56:20 Build Finished (took 929ms)

What is interesting is that even with the -L option, it does not show up in the compile output.

The rule it makes in the makefile is

hello_world: $(OBJS) $(USER_OBJS)
	@echo 'Building target: $@'
	@echo 'Invoking: Cross GCC Linker'
	arm-eabi-gcc -nostartfiles -nodefaultlibs -nostdlib -static -mcpu=cortex-m3 -mthumb -Wl,--gc-sections -Wl,-static -Wl,-n -g -v -nostdlib -L../../ecos/TWR-K60D100M_install/lib -T../../ecos/TWR-K60D100M_install/lib/target.ld -o "hello_world" $(OBJS) $(USER_OBJS) $(LIBS)
	@echo 'Finished building target: $@'
	@echo ' '

Somehow it does not get passed on to the linker. 

My goal is a simple free platform for my customers to start with. RedBoot, Eclipse, with GDB debugging from Eclipse. Then, they can try before buy, and if they want to use my embedded framework (may or may not end up GPL), they pay for commercial tools with all the wonderful stuff ;-)

But GDB command line is a non-starter for them. So the gap is too big.

I think in general, eCos would benefit from both a good low end tool chain that installs and just works on every platform, and many examples. This is where Freescale MQX does well. They have a free version of Eclipse/Compiler and many starter examples. But, they are very limited on number of platforms. Another problem for me.

Mike


Complete Output
------------------------

07:56:19 **** Incremental Build of configuration Debug for project hello_world ****
make all 
Building file: ../Sources/hello.c
Invoking: Cross GCC Compiler
arm-eabi-gcc -I/home/mike/Embedded/Freescale/ecos/TWR-K60D100M_install/include -O2 -g -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -v -ffunction-sections -fdata-sections -fno-exceptions -MMD -MP -MF"Sources/hello.d" -MT"Sources/hello.d" -o "Sources/hello.o" "../Sources/hello.c"
Using built-in specs.
COLLECT_GCC=arm-eabi-gcc
COLLECT_LTO_WRAPPER=/opt/ecos/gnutools/arm-eabi/libexec/gcc/arm-eabi/4.6.3/lto-wrapper
Target: arm-eabi
Configured with: ../../../../src/gcc-4.6.3/configure --target=arm-eabi --with-cpu=arm7tdmi --prefix=/opt/ecos/gnutools/arm-eabi --with-newlib --with-gnu-as --with-gnu-ld --with-gmp=/opt/gmp-4.3.2 --with-mpfr=/opt/mpfr-2.4.2 --with-mpc=/opt/mpc-0.8.2 --enable-languages=c,c++ --enable-threads --disable-hosted-libstdcxx --disable-__cxa_atexit --disable-libquadmath --disable-decimal-float -with-pkgversion='eCos GNU Tools 4.6.3-20120623' --with-bugurl=http://bugs.ecos.sourceware.org/
Thread model: single
gcc version 4.6.3 (eCos GNU Tools 4.6.3-20120623) 
COLLECT_GCC_OPTIONS='-I' '/home/mike/Embedded/Freescale/ecos/TWR-K60D100M_install/include' '-O2' '-g' '-Wall' '-Wpointer-arith' '-Wstrict-prototypes' '-Wundef' '-Wno-write-strings' '-mcpu=cortex-m3' '-mthumb' '-g' '-v' '-ffunction-sections' '-fdata-sections' '-fno-exceptions' '-MMD' '-MP' '-MF' 'Sources/hello.d' '-MT' 'Sources/hello.d' '-o' 'Sources/hello.o'
/opt/ecos/gnutools/arm-eabi/libexec/gcc/arm-eabi/4.6.3/cc1 -quiet -v -I /home/mike/Embedded/Freescale/ecos/TWR-K60D100M_install/include -imultilib thumb/thumb2 -MMD Sources/hello.d -MF Sources/hello.d -MP -MT Sources/hello.d -D__USES_INITFINI__ ../Sources/hello.c -quiet -dumpbase hello.c -mcpu=cortex-m3 -mthumb -auxbase hello -g -g -O2 -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Wno-write-strings -version -ffunction-sections -fdata-sections -fno-exceptions -o /tmp/ccPxGVxl.s
GNU C (eCos GNU Tools 4.6.3-20120623) version 4.6.3 (arm-eabi)
	compiled by GNU C version 3.4.6 20060404 (Red Hat 3.4.6-11), GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/sys-include"
#include "..." search starts here:
#include <...> search starts here:
/home/mike/Embedded/Freescale/ecos/TWR-K60D100M_install/include
/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/include
/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/include-fixed
/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/include
End of search list.
GNU C (eCos GNU Tools 4.6.3-20120623) version 4.6.3 (arm-eabi)
	compiled by GNU C version 3.4.6 20060404 (Red Hat 3.4.6-11), GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1070891678fd12e4083fdb528309ae62
COLLECT_GCC_OPTIONS='-I' '/home/mike/Embedded/Freescale/ecos/TWR-K60D100M_install/include' '-O2' '-g' '-Wall' '-Wpointer-arith' '-Wstrict-prototypes' '-Wundef' '-Wno-write-strings' '-mcpu=cortex-m3' '-mthumb' '-g' '-v' '-ffunction-sections' '-fdata-sections' '-fno-exceptions' '-MMD' '-MP' '-MF' 'Sources/hello.d' '-MT' 'Sources/hello.d' '-o' 'Sources/hello.o'
/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/as -v -I /home/mike/Embedded/Freescale/ecos/TWR-K60D100M_install/include -mcpu=cortex-m3 -meabi=5 -o /tmp/ccMUDB6x.o /tmp/ccPxGVxl.s
GNU assembler version 2.22 (arm-eabi) using BFD version (eCos GNU Tools 4.6.3-20120623) 2.22
COMPILER_PATH=/opt/ecos/gnutools/arm-eabi/libexec/gcc/arm-eabi/4.6.3/:/opt/ecos/gnutools/arm-eabi/libexec/gcc/arm-eabi/4.6.3/:/opt/ecos/gnutools/arm-eabi/libexec/gcc/arm-eabi/:/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/:/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/:/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/
LIBRARY_PATH=/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/thumb/thumb2/:/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/lib/thumb/thumb2/:/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/:/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/lib/
COLLECT_GCC_OPTIONS='-I' '/home/mike/Embedded/Freescale/ecos/TWR-K60D100M_install/include' '-O2' '-g' '-Wall' '-Wpointer-arith' '-Wstrict-prototypes' '-Wundef' '-Wno-write-strings' '-mcpu=cortex-m3' '-mthumb' '-g' '-v' '-ffunction-sections' '-fdata-sections' '-fno-exceptions' '-MMD' '-MP' '-MF' 'Sources/hello.d' '-MT' 'Sources/hello.d' '-o' 'Sources/hello.o'
/opt/ecos/gnutools/arm-eabi/libexec/gcc/arm-eabi/4.6.3/collect2 -X -o Sources/hello.o /opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/thumb/thumb2/crti.o /opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/thumb/thumb2/crtbegin.o crt0.o -L/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/thumb/thumb2 -L/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/lib/thumb/thumb2 -L/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3 -L/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/lib /tmp/ccMUDB6x.o --start-group -lgcc -lg -lc --end-group /opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/thumb/thumb2/crtend.o /opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/thumb/thumb2/crtn.o
/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld: cannot find crt0.o: No such file or directory
/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld: cannot find -lg
/opt/ecos/gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/../../../../arm-eabi/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [Sources/hello.o] Error 1

07:56:20 Build Finished (took 929ms)


On Dec 20, 2012, at 1:31 AM, John Dallaway <john@dallaway.org.uk> wrote:

> Mike
> 
> On 20/12/12 07:44, Michael Jones wrote:
> 
>> I have been trying to make an Eclipse/CDT (Juno) project for eCos, but not a
>> Makefile project. Mainly so that it can navigate to h files, and try to see
>> if it will drive GDB.
>> 
>> Eclipse seems to ignore linker options and do its own thing. For example, for
>> the linker I have:
>> 
>> -mcpu=cortex-m3 -mthumb -Wl,--gc-sections -Wl,-static -Wl,-n -g -v -nostdlib -T../../ecos/TWR-K60D100M_install/lib/target.ld
>> 
>> But, it appears that some options, like -T are ignored. And the linker tries
>> to link in crt0.o, even if I set the compile options to not include startup
>> files.
> 
> You are missing the -L linker option specifying the library search path
> (location of libtarget.a). Try modifying your command line as follows:
> 
>> -mcpu=cortex-m3 -mthumb -Wl,--gc-sections -Wl,-static -Wl,-n -g -v -nostdlib -L../../ecos/TWR-K60D100M_install/lib -Ttarget.ld
> 
> I hope this helps...
> 
> John Dallaway
> eCos maintainer
> http://www.dallaway.org.uk/john
> 
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> 


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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