From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22530 invoked by alias); 21 Dec 2012 07:03:44 -0000 Received: (qmail 22522 invoked by uid 22791); 21 Dec 2012 07:03:43 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from p02c11o149.mxlogic.net (HELO p02c11o149.mxlogic.net) (208.65.144.82) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 Dec 2012 07:03:34 +0000 Received: from unknown [12.218.215.72] (EHLO p02c11o149.mxlogic.net) by p02c11o149.mxlogic.net(mxl_mta-6.16.0-0) with ESMTP id 6c904d05.2aaabde02940.40341.00-572.68725.p02c11o149.mxlogic.net (envelope-from ); Fri, 21 Dec 2012 00:03:34 -0700 (MST) X-MXL-Hash: 50d409c6765c3dba-b9f7259d79fdc377ce53d1391108097338941c53 Received: from unknown [12.218.215.72] (EHLO smtpauth1.linear.com) by p02c11o149.mxlogic.net(mxl_mta-6.16.0-0) with ESMTP id 3c904d05.0.40328.00-367.68699.p02c11o149.mxlogic.net (envelope-from ); Fri, 21 Dec 2012 00:03:33 -0700 (MST) X-MXL-Hash: 50d409c55f8c4d9e-b58a3d80610da846e22e5692fe2e93cd09f3599a Received: from smtpauth1.linear.com (localhost [127.0.0.1]) by smtpauth1.linear.com (Postfix) with ESMTP id 9E1CE740A9; Thu, 20 Dec 2012 23:03:30 -0800 (PST) Received: from [192.168.0.119] (174-24-17-30.clsp.qwest.net [174.24.17.30]) by smtpauth1.linear.com (Postfix) with ESMTPSA id 544CA740A6; Thu, 20 Dec 2012 23:03:30 -0800 (PST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) From: Michael Jones In-Reply-To: <50D32FEE.8070309@dallaway.org.uk> Date: Fri, 21 Dec 2012 07:03:00 -0000 Cc: eCos Discussion Content-Transfer-Encoding: quoted-printable Message-Id: References: <50D2CCFE.4030800@dallaway.org.uk> <50D32FEE.8070309@dallaway.org.uk> To: John Dallaway X-AnalysisOut: [v=2.0 cv=YfYKEXtf c=1 sm=1 a=glloKNylpeYNumXQcclYyA==:17 a] X-AnalysisOut: [=_YBDr5jTXAcA:10 a=D2_GN2MmYMYA:10 a=BLceEmwcHowA:10 a=8nJ] X-AnalysisOut: [EP1OIZ-IA:10 a=MqDINYqSAAAA:8 a=b85RnLSK_MgA:10 a=B3H3McAP] X-AnalysisOut: [AAAA:8 a=CCpqsmhAAAAA:8 a=qGTKiuNuY4rBT2D4G78A:9 a=wPNLvfG] X-AnalysisOut: [TeEIA:10 a=YZsQyhDTmaVxeqoX:21 a=xb_S8DmfecZkF8z9:21] X-MAIL-FROM: X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Eclipse / CDT without Makefile Project X-SW-Source: 2012-12/txt/msg00046.txt.bz2 John, So now I am struggling getting GDB to work from Eclipse. It is actually a v= ery interesting problem. I can load my app from gdb on the command line and run it fine.=20 When I load the same app from Eclipse, I get a SIGTRAP at the the reset vec= tor. reset_vector: ldr sp,=3Dhal_startup_stack b hal_reset_vsr Stops at the ldr instruction no matter how many times I do a continue. This is the same problem I had when I was using Insight. That problem was f= inally diagnosed. When I compiled Insight, it replaced the arm-eabi-gdb fil= e, and when I reverted back to the one from the tool chain, the problem wen= t away. In this case, I am sure that Eclipse is using the same are-eabi-gdb because= I can do a "show version" in the Eclipse command window and get the same r= evision as the working command line. There appears to be something very subtle different. As an experiment, I se= lected my file and loaded my app from the eclipse command line so the GUI w= as eliminated. I get the same SIGTRAP. And after download, the memory segme= nts are all in the same place. Do you have any ideas on how to debug this kind of problem? Is it possible = that when I use commands like "load" and "cont" what is sent to RedBoot at = the other end is different? Could there be hidden communications that chang= e the mode of RedBoot? Could the memory contents after a load be different?= Could GDB in the Eclipse environment be inserting some kind of trap like a= break point that it is failing to remove when I type "cont"? I have to admit, I was not so surprised that a newer version of GDB mis-beh= aved, but I was really surprised that a working version of gdb running in E= clipse would not behave the same. Mike On Dec 20, 2012, at 8:34 AM, John Dallaway wrote: > Mike >=20 > On 20/12/12 15:15, Michael Jones wrote: >=20 >> Thanks, now it is closer. I have provided the output showing the final f= ailure: >>=20 >> /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 >>=20 >> 07:56:20 Build Finished (took 929ms) >>=20 >> What is interesting is that even with the -L option, it does not show up= in the compile output. >>=20 >> The rule it makes in the makefile is >>=20 >> hello_world: $(OBJS) $(USER_OBJS) >> @echo 'Building target: $@' >> @echo 'Invoking: Cross GCC Linker' >> arm-eabi-gcc -nostartfiles -nodefaultlibs -nostdlib -static -mcpu=3Dcor= tex-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 ' ' >>=20 >> Somehow it does not get passed on to the linker. >=20 > I believe your build is not getting as far as the above makefile rule. > You are missing the "-c" flag on your _compilation_ line, so GCC is > attempting to both compile and link (using a default linker script) the > first time it is invoked. >=20 > I hope this helps... >=20 > John Dallaway > eCos maintainer > http://www.dallaway.org.uk/john >=20 > --=20 > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss >=20 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss