From jsujjavanich at syntech-fuelmaster.com Tue Sep 4 21:27:13 2007 From: jsujjavanich at syntech-fuelmaster.com (Jate Sujjavanich) Date: Tue, 4 Sep 2007 17:27:13 -0400 Subject: [coldfire-gnu-discuss] Usage of shared libraries In-Reply-To: <20070830202358.GK2415@lios> Message-ID: I attempted to create a shared library according to the new method on pg 11 of the guide. I believe that the endianness of the data_end and data_start in the flat_hdr is causing a large negative size (0xffffffe4 or something). So I abandoned that method and tried the old way. I've tried using the old/uClibc method to get this working. Unfortunately, I am getting an "Illegal Instruction" on the load of the flat file. Do you have a working example for a small "hello world" shared library using either the new or old method? Thanks. - Jate -----Original Message----- From: Carlos O'Donell [mailto:carlos at codesourcery.com] Sent: Thursday, August 30, 2007 4:24 PM To: Jate Sujjavanich Cc: coldfire-gnu-discuss at codesourcery.com Subject: Re: [coldfire-gnu-discuss] Usage of shared libraries On Thu, Aug 30, 2007 at 03:02:31PM -0400, Jate Sujjavanich wrote: > What I am trying to do now is create a "hello world" shared library. > Using options as recommended on uCdot.org creates a library of size > mshared-library-id * 16 MB. I am looking for the new recommended way > of creating one for this toolchain. The recommended way to create shared libraries for CodeSourcery's Sourcery G++ toolchains is documented in the "Getting Started" guide. More specifically Chpater 3, Section 2, "Shared Libraries" page 10. > I am also having some issues with an application that is threaded > using pthreads. It seems that the errno is not being passed from the > kernel to the uClibc side of the system call. In my case, the mkfifo > (mknod) does return a -1, but the errno on the application side is > always a 0. I have a feeling this may be fixed in the latest uClibc. Does anyone know? As far as I know this is not fixed in the latest uClibc. Please see Chapter 3, Section 2.4, "Symbol Binding." uClibc doesn't follow normal ELF symbol resolution and the threads errno cannot be updated. The simplest workaround is not to use shared libraries and pthreads. Cheers, Carlos. -- Carlos O'Donell CodeSourcery carlos at codesourcery.com (650) 331-3385 x716 ************************************************************************ ************ This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. ************************************************************************ ************ From nathan at codesourcery.com Wed Sep 5 08:56:12 2007 From: nathan at codesourcery.com (Nathan Sidwell) Date: Wed, 05 Sep 2007 09:56:12 +0100 Subject: [coldfire-gnu-discuss] Usage of shared libraries In-Reply-To: References: Message-ID: <46DE6F2C.3030709@codesourcery.com> Jate Sujjavanich wrote: > I attempted to create a shared library according to the new method on pg > 11 of the guide. I believe that the endianness of the data_end and > data_start in the flat_hdr is causing a large negative size (0xffffffe4 > or something). So I abandoned that method and tried the old way. > > I've tried using the old/uClibc method to get this working. > Unfortunately, I am getting an "Illegal Instruction" on the load of the > flat file. Do you have a working example for a small "hello world" > shared library using either the new or old method? Thanks. I'm sorry, we don't have a worked example available. We do use the scheme documented in the guide to build and test the shared libc provided in the distribution. nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery From Christof.Frey at varian.com Wed Sep 26 11:33:36 2007 From: Christof.Frey at varian.com (Christof Frey) Date: Wed, 26 Sep 2007 11:33:36 -0000 Subject: Problem with P&E ParallelPortCable - Sourcery g++ Lite 4.2-8 Message-ID: <7CDB5C938E142249AC05F6EF554DC766062E9385@EXCHANGEVS01.vms.ad.varian.com> I am working with the P&E parallel cable and have installed the supplied drivers from CodeSourcery. Unable to debug. Getting the following: C:\Projects\helloworld_mcf523x\src>m68k-elf-sprite -i CodeSourcery ColdFire Debug Sprite (Sourcery G++ Lite 4.2-8) pe: [speed=&memory-timeout=] P&E Adaptor pe://CycloneProMaxSerial:1 - COM1 : Serial Port 1 pe://ParallelPortCable:1 - LPT1 : Parallel Port 1 (Address $0378) ccs: [timeout=&speed=] CCS Adaptor ccs://$Host:$Port/$Chain_position - CCS address When I try to debug: C:\Projects\helloworld_mcf523x\src>m68k-elf-gdb hello.elf GNU gdb (Sourcery G++ Lite 4.2-8) 6.6.50.20070320-cvs Copyright (C) 2007 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i686-mingw32 --target=m68k-elf". For bug reporting instructions, please see: >. .. (gdb) (gdb) target remote | m68k-elf-sprite pe: m5235evb Remote debugging using | m68k-elf-sprite pe: m5235evb m68k-elf-sprite:Opening P&E CycloneProMaxSerial port 1 (COM1 : Serial Port 1) Ignoring packet error, continuing... warning: unrecognized item "timeout" in "qSupported" response Ignoring packet error, continuing... Why is the sprite trying to open the P&E CycloneProMaxSerial port 1 ? (instead of the known ParallelPort on address $0378) Additionally I get a dialog box indicating that there is a driver update for the CycloneProMaxSerial going on (and finally fails)!! so, trying to configure the correct adapter with the whole descriptor instead of just pe: (gdb) target remote | m68k-elf-sprite pe://ParallelPortCable m5235evb Remote debugging using | m68k-elf-sprite pe://ParallelPortCable m5235evb Ignoring packet error, continuing... warning: unrecognized item "timeout" in "qSupported" response Ignoring packet error, continuing... Ignoring packet error, continuing... Ignoring packet error, continuing... here things are getting even more wired. I get a dialog box saying "The instruction at "0x004037c5" referenced memory at "0x00000000". The memory could not be "read"." Looks like a null pointer access in the driver. Any ideas / suggestions welcome Christof -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathan at codesourcery.com Thu Sep 27 09:18:11 2007 From: nathan at codesourcery.com (Nathan Sidwell) Date: Thu, 27 Sep 2007 10:18:11 +0100 Subject: [coldfire-gnu-discuss] Problem with P&E ParallelPortCable - Sourcery g++ Lite 4.2-8 In-Reply-To: <7CDB5C938E142249AC05F6EF554DC766062E9385@EXCHANGEVS01.vms.ad.varian.com> References: <7CDB5C938E142249AC05F6EF554DC766062E9385@EXCHANGEVS01.vms.ad.varian.com> Message-ID: <46FB7553.7040708@codesourcery.com> Christof Frey wrote: > I am working with the P&E parallel cable and have installed the supplied > drivers from CodeSourcery. > Unable to debug. > Getting the following: > > C:\Projects\helloworld_mcf523x\src>m68k-elf-sprite -i > CodeSourcery ColdFire Debug Sprite (Sourcery G++ Lite 4.2-8) > pe: [speed=&memory-timeout=] P&E Adaptor > pe://CycloneProMaxSerial:1 - COM1 : Serial Port 1 > pe://ParallelPortCable:1 - LPT1 : Parallel Port 1 (Address $0378) This shows that the pe library has detected two P&E devices. You can use the URLs it lists to select devices unabiguously. > (gdb) target remote | m68k-elf-sprite pe: m5235evb > Remote debugging using | m68k-elf-sprite pe: m5235evb > m68k-elf-sprite:Opening P&E CycloneProMaxSerial port 1 (COM1 : Serial > Port 1) > Ignoring packet error, continuing... > warning: unrecognized item "timeout" in "qSupported" response > Ignoring packet error, continuing... > > Why is the sprite trying to open the P&E CycloneProMaxSerial port 1 ? > (instead of the known ParallelPort on address $0378) You've given the URL 'pe:', therefore the first reported p&e device that matches will be selected. As you can see from the above -i output, that will be the cyclonepromaxserial. Use 'pe://ParallelPortCable:1' to explicitly select your parallel port device. > Additionally I get a dialog box indicating that there is a driver update > for the CycloneProMaxSerial going on (and finally fails)!! Do you have a cyclonepromaxserial connected? > > so, trying to configure the correct adapter with the whole descriptor > instead of just pe: > > (gdb) target remote | m68k-elf-sprite pe://ParallelPortCable m5235evb > Remote debugging using | m68k-elf-sprite pe://ParallelPortCable m5235evb > Ignoring packet error, continuing... > warning: unrecognized item "timeout" in "qSupported" response > Ignoring packet error, continuing... > Ignoring packet error, continuing... > Ignoring packet error, continuing... Can you try with target remote | m68k-elf-sprite -v pe://ParallelPortCable m5235evb That will provide more logging information. nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery From Christof.Frey at varian.com Thu Sep 27 09:49:57 2007 From: Christof.Frey at varian.com (Christof Frey) Date: Thu, 27 Sep 2007 09:49:57 -0000 Subject: [coldfire-gnu-discuss] Problem with P&E ParallelPortCable - Sourcery g++ Lite 4.2-8 In-Reply-To: <46FB7553.7040708@codesourcery.com> References: <7CDB5C938E142249AC05F6EF554DC766062E9385@EXCHANGEVS01.vms.ad.varian.com> <46FB7553.7040708@codesourcery.com> Message-ID: <7CDB5C938E142249AC05F6EF554DC766062E9992@EXCHANGEVS01.vms.ad.varian.com> > -----Original Message----- > From: Nathan Sidwell [mailto:nathan at codesourcery.com] > Sent: Thursday, September 27, 2007 11:18 AM > To: Christof Frey > Cc: coldfire-gnu-discuss at codesourcery.com > Subject: Re: [coldfire-gnu-discuss] Problem with P&E > ParallelPortCable - Sourcery g++ Lite 4.2-8 > > Christof Frey wrote: > > I am working with the P&E parallel cable and have installed the > > supplied drivers from CodeSourcery. > > Unable to debug. > > Getting the following: > > > > C:\Projects\helloworld_mcf523x\src>m68k-elf-sprite -i CodeSourcery > > ColdFire Debug Sprite (Sourcery G++ Lite 4.2-8) > > pe: [speed=&memory-timeout=] P&E Adaptor > > pe://CycloneProMaxSerial:1 - COM1 : Serial Port 1 > > pe://ParallelPortCable:1 - LPT1 : Parallel Port 1 (Address $0378) > > This shows that the pe library has detected two P&E devices. > You can use the URLs it lists to select devices unabiguously. > > > (gdb) target remote | m68k-elf-sprite pe: m5235evb Remote debugging > > using | m68k-elf-sprite pe: m5235evb m68k-elf-sprite:Opening P&E > > CycloneProMaxSerial port 1 (COM1 : Serial Port 1) Ignoring packet > > error, continuing... > > warning: unrecognized item "timeout" in "qSupported" > response Ignoring > > packet error, continuing... > > > > Why is the sprite trying to open the P&E > CycloneProMaxSerial port 1 ? > > (instead of the known ParallelPort on address $0378) > > You've given the URL 'pe:', therefore the first reported p&e > device that matches will be selected. As you can see from > the above -i output, that will be the cyclonepromaxserial. > Use 'pe://ParallelPortCable:1' to explicitly select your > parallel port device. > > > Additionally I get a dialog box indicating that there is a driver > > update for the CycloneProMaxSerial going on (and finally fails)!! > > Do you have a cyclonepromaxserial connected? No, there is no connection at all on my COM1 port I have a Edgeport USB to 4x serial converter on a USB port connected for getting terminal output from the board. May this cause the trouble ? > > > > > so, trying to configure the correct adapter with the whole > descriptor > > instead of just pe: > > > > (gdb) target remote | m68k-elf-sprite > pe://ParallelPortCable m5235evb > > Remote debugging using | m68k-elf-sprite pe://ParallelPortCable > > m5235evb Ignoring packet error, continuing... > > warning: unrecognized item "timeout" in "qSupported" > response Ignoring > > packet error, continuing... > > Ignoring packet error, continuing... > > Ignoring packet error, continuing... > > Can you try with > target remote | m68k-elf-sprite -v pe://ParallelPortCable > m5235evb That will provide more logging information. > Did not get more logging information (as before): (gdb) target remote | m68k-elf-sprite -v pe://ParallelPortCable m5235evb Remote debugging using | m68k-elf-spm68k-elf-sprite:CodeSourcery ColdFire Debug Sprite (Sourcery G++ Lite 4.2-8) rite -v pe://ParallelPortCable m5235evb Ignoring packet error, continuing... warning: unrecognized item "timeout" in "qSupported" response Ignoring packet error, continuing... Ignoring packet error, continuing... Ignoring packet error, continuing... Get additionally a windows dialog box from application m68k-elf-sprite.exe: "The instruction at "0x004037c5" referenced memory at "0x00000000", the memory could not be "read". > nathan > -- > Nathan Sidwell :: http://www.codesourcery.com :: > CodeSourcery > > From Christof.Frey at varian.com Thu Sep 27 09:51:49 2007 From: Christof.Frey at varian.com (Christof Frey) Date: Thu, 27 Sep 2007 09:51:49 -0000 Subject: [coldfire-gnu-discuss] Problem with P&E ParallelPortCable - Sourcery g++ Lite 4.2-8 References: <7CDB5C938E142249AC05F6EF554DC766062E9385@EXCHANGEVS01.vms.ad.varian.com> <46FB7553.7040708@codesourcery.com> Message-ID: <7CDB5C938E142249AC05F6EF554DC766062E9997@EXCHANGEVS01.vms.ad.varian.com> > -----Original Message----- > From: Christof Frey > Sent: Thursday, September 27, 2007 11:50 AM > To: 'Nathan Sidwell' > Cc: coldfire-gnu-discuss at codesourcery.com > Subject: RE: [coldfire-gnu-discuss] Problem with P&E > ParallelPortCable - Sourcery g++ Lite 4.2-8 > > > > > -----Original Message----- > > From: Nathan Sidwell [mailto:nathan at codesourcery.com] > > Sent: Thursday, September 27, 2007 11:18 AM > > To: Christof Frey > > Cc: coldfire-gnu-discuss at codesourcery.com > > Subject: Re: [coldfire-gnu-discuss] Problem with P&E > ParallelPortCable > > - Sourcery g++ Lite 4.2-8 > > > > Christof Frey wrote: > > > I am working with the P&E parallel cable and have installed the > > > supplied drivers from CodeSourcery. > > > Unable to debug. > > > Getting the following: > > > > > > C:\Projects\helloworld_mcf523x\src>m68k-elf-sprite -i > CodeSourcery > > > ColdFire Debug Sprite (Sourcery G++ Lite 4.2-8) > > > pe: [speed=&memory-timeout=] P&E Adaptor > > > pe://CycloneProMaxSerial:1 - COM1 : Serial Port 1 > > > pe://ParallelPortCable:1 - LPT1 : Parallel Port 1 > (Address $0378) > > > > This shows that the pe library has detected two P&E devices. > > You can use the URLs it lists to select devices unabiguously. > > > > > (gdb) target remote | m68k-elf-sprite pe: m5235evb Remote > debugging > > > using | m68k-elf-sprite pe: m5235evb m68k-elf-sprite:Opening P&E > > > CycloneProMaxSerial port 1 (COM1 : Serial Port 1) Ignoring packet > > > error, continuing... > > > warning: unrecognized item "timeout" in "qSupported" > > response Ignoring > > > packet error, continuing... > > > > > > Why is the sprite trying to open the P&E > > CycloneProMaxSerial port 1 ? > > > (instead of the known ParallelPort on address $0378) > > > > You've given the URL 'pe:', therefore the first reported p&e device > > that matches will be selected. As you can see from the above -i > > output, that will be the cyclonepromaxserial. > > Use 'pe://ParallelPortCable:1' to explicitly select your > parallel port > > device. > > > > > Additionally I get a dialog box indicating that there is a driver > > > update for the CycloneProMaxSerial going on (and finally fails)!! > > > > Do you have a cyclonepromaxserial connected? > No, there is no connection at all on my COM1 port > > I have a Edgeport USB to 4x serial converter on a USB port > connected for getting terminal output from the board. May > this cause the trouble ? > > > > > > > > so, trying to configure the correct adapter with the whole > > descriptor > > > instead of just pe: > > > > > > (gdb) target remote | m68k-elf-sprite > > pe://ParallelPortCable m5235evb > > > Remote debugging using | m68k-elf-sprite pe://ParallelPortCable > > > m5235evb Ignoring packet error, continuing... > > > warning: unrecognized item "timeout" in "qSupported" > > response Ignoring > > > packet error, continuing... > > > Ignoring packet error, continuing... > > > Ignoring packet error, continuing... > > > > Can you try with > > target remote | m68k-elf-sprite -v > pe://ParallelPortCable m5235evb > > That will provide more logging information. > > > Did not get more logging information (as before): > > (gdb) target remote | m68k-elf-sprite -v > pe://ParallelPortCable m5235evb Remote debugging using | > m68k-elf-spm68k-elf-sprite:CodeSourcery ColdFire Debug Sprite > (Sourcery G++ Lite 4.2-8) rite -v pe://ParallelPortCable > m5235evb Ignoring packet error, continuing... > warning: unrecognized item "timeout" in "qSupported" response > Ignoring packet error, continuing... > Ignoring packet error, continuing... > Ignoring packet error, continuing... > Full log is actually: (gdb) target remote | m68k-elf-sprite -v pe://ParallelPortCable m5235evb Remote debugging using | m68k-elf-spm68k-elf-sprite:CodeSourcery ColdFire Debug Sprite (Sourcery G++ Lite 4.2-8) rite -v pe://ParallelPortCable m5235evb Ignoring packet error, continuing... warning: unrecognized item "timeout" in "qSupported" response Ignoring packet error, continuing... Ignoring packet error, continuing... Ignoring packet error, continuing... Malformed response to offset query, timeout (gdb) > Get additionally a windows dialog box from application > m68k-elf-sprite.exe: > > "The instruction at "0x004037c5" referenced memory at > "0x00000000", the memory could not be "read". > > > > nathan > > -- > > Nathan Sidwell :: http://www.codesourcery.com :: > > CodeSourcery > > > > From nathan at codesourcery.com Thu Sep 27 09:55:16 2007 From: nathan at codesourcery.com (Nathan Sidwell) Date: Thu, 27 Sep 2007 10:55:16 +0100 Subject: [coldfire-gnu-discuss] Problem with P&E ParallelPortCable - Sourcery g++ Lite 4.2-8 In-Reply-To: <7CDB5C938E142249AC05F6EF554DC766062E9992@EXCHANGEVS01.vms.ad.varian.com> References: <7CDB5C938E142249AC05F6EF554DC766062E9385@EXCHANGEVS01.vms.ad.varian.com> <46FB7553.7040708@codesourcery.com> <7CDB5C938E142249AC05F6EF554DC766062E9992@EXCHANGEVS01.vms.ad.varian.com> Message-ID: <46FB7E04.1000007@codesourcery.com> Christof Frey wrote: >>> Additionally I get a dialog box indicating that there is a driver >>> update for the CycloneProMaxSerial going on (and finally fails)!! >> Do you have a cyclonepromaxserial connected? > No, there is no connection at all on my COM1 port > > I have a Edgeport USB to 4x serial converter on a USB port connected for > getting terminal output from the board. May this cause the trouble ? I do not know why the P&E library is detecting something on COM1 then. It's possible that it is not possible to autodetect this device, so it is listed as present in order for you to be able to select it. > (gdb) target remote | m68k-elf-sprite -v pe://ParallelPortCable m5235evb > Remote debugging using | m68k-elf-spm68k-elf-sprite:CodeSourcery > ColdFire Debug > Get additionally a windows dialog box from application > m68k-elf-sprite.exe: > > "The instruction at "0x004037c5" referenced memory at "0x00000000", the > memory could not be "read". Ah, I think I recognize that. If so, it will be fixed in the Fall release, which will be released next week. nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery From dan at codesourcery.com Thu Sep 27 11:48:59 2007 From: dan at codesourcery.com (Daniel Jacobowitz) Date: Thu, 27 Sep 2007 07:48:59 -0400 Subject: [coldfire-gnu-discuss] Problem with P&E ParallelPortCable - Sourcery g++ Lite 4.2-8 In-Reply-To: <46FB7E04.1000007@codesourcery.com> References: <7CDB5C938E142249AC05F6EF554DC766062E9385@EXCHANGEVS01.vms.ad.varian.com> <46FB7553.7040708@codesourcery.com> <7CDB5C938E142249AC05F6EF554DC766062E9992@EXCHANGEVS01.vms.ad.varian.com> <46FB7E04.1000007@codesourcery.com> Message-ID: <20070927114856.GP12862@caradoc.them.org> On Thu, Sep 27, 2007 at 10:55:16AM +0100, Nathan Sidwell wrote: > >>> Additionally I get a dialog box indicating that there is a driver update for > >>> the CycloneProMaxSerial going on (and finally fails)!! > >> Do you have a cyclonepromaxserial connected? > > No, there is no connection at all on my COM1 port > > I have a Edgeport USB to 4x serial converter on a USB port connected for > > getting terminal output from the board. May this cause the trouble ? > > I do not know why the P&E library is detecting something on COM1 then. It's > possible that it is not possible to autodetect this device, so it is listed as > present in order for you to be able to select it. Yes, the serial and parallel devices are always listed. There's no way to detect them without writing to the respective ports, and that could be bad if something else was plugged in. -- Daniel Jacobowitz CodeSourcery