From maxim at codesourcery.com Fri May 7 15:43:21 2010 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Fri, 07 May 2010 19:43:21 +0400 Subject: 2010Q1 Release Available Message-ID: <4BE43519.7020105@codesourcery.com> CodeSourcery is pleased to announce the availability of the 2010Q1 Sourcery G++ Lite Edition release for ColdFire processors. This is available for download from: http://www.codesourcery.com/sgpp/lite/coldfire Some of the new features in this release include: * Support for Windows? 7 host systems * Board support packages for Freescale's M52277EVB and M5475EVB boards * Update to version 7.0.50 of the GNU Debugger (GDB) and version 2.11 of EGLIBC Enjoy! -- Maxim Kuvyrkov CodeSourcery maxim at codesourcery.com (650) 331-3385 x724 From GSKARPATHIOTAKIS at tycoint.com Wed May 12 13:50:44 2010 From: GSKARPATHIOTAKIS at tycoint.com (SKARPATHIOTAKIS, GEORGE) Date: Wed, 12 May 2010 09:50:44 -0400 Subject: Problem compiling U-Boot with Codesourcery 4.4-54/4.4-217 Message-ID: <63056535ADCF774B87D41A999D9A7F2B16518D51@BCT1E2K301.americas.tsp.ad> Hi, I've tried both the new 4.4 toolchain for coldfire GNU/Linux (4.4-54 & 4.4-217) in building my embedded system via LTIB, but when it came to rebuilding U-Boot it complained about this line in common/main.c: inline show_boot_progress (int val) __attribute__((weak, alias("__show_boot_progress"))); Stating that it cannot be weak. Of course I've tried removing the weak and/or the inline keyword, but then my u-boot does not function properly. I've also noticed that on other forums that this issue is known about gcc 4.4 and why many are sticking with 4.3. I would like to know if anyone here has had the same problem, and if this issue is being looked at? GS -------------- next part -------------- An HTML attachment was scrubbed... URL: From maxim at codesourcery.com Fri May 14 10:42:35 2010 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Fri, 14 May 2010 14:42:35 +0400 Subject: [coldfire-gnu-discuss] Problem compiling U-Boot with Codesourcery 4.4-54/4.4-217 In-Reply-To: <63056535ADCF774B87D41A999D9A7F2B16518D51@BCT1E2K301.americas.tsp.ad> References: <63056535ADCF774B87D41A999D9A7F2B16518D51@BCT1E2K301.americas.tsp.ad> Message-ID: <4BED291B.7070508@codesourcery.com> On 5/12/10 5:50 PM, SKARPATHIOTAKIS, GEORGE wrote: > Hi, > > I?ve tried both the new 4.4 toolchain for coldfire GNU/Linux (4.4-54 & > 4.4-217) in building my embedded system via LTIB, but when it came to > rebuilding U-Boot it complained about this line in common/main.c: > > *inline* show_boot_progress (int val) __attribute__((*weak*, > alias("__show_boot_progress"))); > > Stating that it cannot be weak. Of course I?ve tried removing the weak > and/or the inline keyword, but then my u-boot does not function > properly. I?ve also noticed that on other forums that this issue is > known about gcc 4.4 and why many are sticking with 4.3. You need to provide the exact error message the compiler outputs. A preprocessed source and the compilation line also makes it easier to understand what the problem is. Regards, -- Maxim Kuvyrkov CodeSourcery maxim at codesourcery.com (650) 331-3385 x724 From luigi.mantellini at idf-hit.com Fri May 14 13:08:21 2010 From: luigi.mantellini at idf-hit.com (Luigi 'Comio' Mantellini) Date: Fri, 14 May 2010 15:08:21 +0200 Subject: NPTL on 547x cpus Message-ID: <201005141508.26421.luigi.mantellini@idf-hit.com> Hi List, I'm working with 547x based board and a 2.6.25 kernel (from freescale and patched to cover my hw). I'm still using the "old" 4.3 toolchain in order to see the pthread working. Now, I'm interested to use the last 4.4-217 in order to use the nptl implementation, but unfortunately the pthread seems to be broken. Using a debugger it seems that some register is lost in the thread switching... but I haven't detailed information (for ttm reason I cannot spend too much time on this debug). Has anyone used and tested the 4.4-x toolchains? I would like to have feedback from cf developers Best regards, luigi -- Luigi 'Comio' Mantellini R&D - Software Industrie Dial Face S.p.A. Via Canzo, 4 20068 Peschiera Borromeo (MI) Italy Tel.: +39 02 5167 2813 Fax: +39 02 5167 2459 E-mail: luigi.mantellini at idf-hit.com Website: http://www.idf-hit.com Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie. Rispetta l'ambiente. Non stampare questa mail se non ? realmente necessario. This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorized. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks. Help the environment. Please do not print this email unless it is absolutely necessary. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From maxim at codesourcery.com Fri May 14 13:20:49 2010 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Fri, 14 May 2010 17:20:49 +0400 Subject: [coldfire-gnu-discuss] NPTL on 547x cpus In-Reply-To: <201005141508.26421.luigi.mantellini@idf-hit.com> References: <201005141508.26421.luigi.mantellini@idf-hit.com> Message-ID: <4BED4E31.2010101@codesourcery.com> On 5/14/10 5:08 PM, Luigi 'Comio' Mantellini wrote: > Now, I'm interested to use the last 4.4-217 in order to use the nptl > implementation, but unfortunately the pthread seems to be broken. What do you mean by "broken"? Did you apply the kernel patch that the Getting Started Guide mentions? To add NPTL support to current ColdFire kernels one needs to apply one of the patches linked in this knowledge base entry: https://support.codesourcery.com/GNUToolchain/kbentry52 . ... > Has anyone used and tested the 4.4-x toolchains? I would like to have feedback > from cf developers We at CodeSourcery run thousands, if not not millions, tests for each release. Testing of 4.4-217 release included GLIBC testsuite which has many tests for libpthread. -- Maxim Kuvyrkov CodeSourcery maxim at codesourcery.com (650) 331-3385 x724 From Ken.Wong at christiedigital.com Fri May 14 13:30:02 2010 From: Ken.Wong at christiedigital.com (Wong, Ken) Date: Fri, 14 May 2010 09:30:02 -0400 Subject: [coldfire-gnu-discuss] NPTL on 547x cpus In-Reply-To: <4BED4E31.2010101@codesourcery.com> References: <201005141508.26421.luigi.mantellini@idf-hit.com> <4BED4E31.2010101@codesourcery.com> Message-ID: <0384B41A03232C45B676D09A0173AB1E785D63@cdskitexg01.cds.int> We tried the 4.4 toolchain briefly using the 2.6.25 kernel from Freescale. We followed the instructions in the getting started guide and was able to patch the kernel without issue. Using the new 4.4 toolchain, our threads seemed to consume much more CPU time than if we compiled using the old 4.3 toolchain. We're currently still using the 4.3 toolchain with the Linux 2.6.25 kernel until we find some more time in our schedule to do the switch over. Aside from the unexplained jump in processor usage, our ~2 week evaluation didn't uncover any bugs with the 4.4 toolchain related to NPTL. -----Original Message----- From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] Sent: Friday, May 14, 2010 9:21 AM To: Luigi 'Comio' Mantellini Cc: coldfire-gnu-discuss at codesourcery.com Subject: Re: [coldfire-gnu-discuss] NPTL on 547x cpus On 5/14/10 5:08 PM, Luigi 'Comio' Mantellini wrote: > Now, I'm interested to use the last 4.4-217 in order to use the nptl > implementation, but unfortunately the pthread seems to be broken. What do you mean by "broken"? Did you apply the kernel patch that the Getting Started Guide mentions? To add NPTL support to current ColdFire kernels one needs to apply one of the patches linked in this knowledge base entry: https://support.codesourcery.com/GNUToolchain/kbentry52 . ... > Has anyone used and tested the 4.4-x toolchains? I would like to have feedback > from cf developers We at CodeSourcery run thousands, if not not millions, tests for each release. Testing of 4.4-217 release included GLIBC testsuite which has many tests for libpthread. -- Maxim Kuvyrkov CodeSourcery maxim at codesourcery.com (650) 331-3385 x724 From luigi.mantellini at idf-hit.com Fri May 14 13:39:05 2010 From: luigi.mantellini at idf-hit.com (Luigi 'Comio' Mantellini) Date: Fri, 14 May 2010 15:39:05 +0200 Subject: [coldfire-gnu-discuss] NPTL on 547x cpus In-Reply-To: <4BED4E31.2010101@codesourcery.com> References: <201005141508.26421.luigi.mantellini@idf-hit.com> <4BED4E31.2010101@codesourcery.com> Message-ID: <201005141539.11283.luigi.mantellini@idf-hit.com> venerd? 14 maggio 2010 15:20 Maxim Kuvyrkov ha scritto: > On 5/14/10 5:08 PM, Luigi 'Comio' Mantellini wrote: > > Now, I'm interested to use the last 4.4-217 in order to use the nptl > > implementation, but unfortunately the pthread seems to be broken. > > What do you mean by "broken"? I have an heavy threaded application that uses mutexes, semaphores. The code generated by compiler, keeps some constants (for optimization reason) in registers, then are used in a infinite loop. Using the lauterbach debugger, I noticed that the registers are not correctly restored returning by signal. CONST1=... CONST2=... for (;;) { <---------- interrupted by signal ----------> use CONST1 use CONST2 ... } I'm sorry but I cannot provide a better description now because I haven't access to debug facilities for the next days. > > Did you apply the kernel patch that the Getting Started Guide mentions? > I applied the requested patch for the 4.4-217 and kernel 2.6.25 > To add NPTL support to current ColdFire kernels one needs to apply one > of the patches linked in this knowledge base entry: > https://support.codesourcery.com/GNUToolchain/kbentry52 . > > ... > > > Has anyone used and tested the 4.4-x toolchains? I would like to have > > feedback from cf developers > > We at CodeSourcery run thousands, if not not millions, tests for each > release. Testing of 4.4-217 release included GLIBC testsuite which has > many tests for libpthread. I know the CS releases high quality toolchains. I'm supposing that somethins is wrong in my kernel (I started with the 2.6.10 and I ported by hand to 2.6.23 and .25). I can provide my patchset for the kernel if you are interested. best regards, luigi -- Luigi 'Comio' Mantellini R&D - Software Industrie Dial Face S.p.A. Via Canzo, 4 20068 Peschiera Borromeo (MI) Italy Tel.: +39 02 5167 2813 Fax: +39 02 5167 2459 E-mail: luigi.mantellini at idf-hit.com Website: http://www.idf-hit.com Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie. Rispetta l'ambiente. Non stampare questa mail se non ? realmente necessario. This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorized. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks. Help the environment. Please do not print this email unless it is absolutely necessary. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From luigi.mantellini at idf-hit.com Fri May 14 13:40:43 2010 From: luigi.mantellini at idf-hit.com (Luigi 'Comio' Mantellini) Date: Fri, 14 May 2010 15:40:43 +0200 Subject: [coldfire-gnu-discuss] NPTL on 547x cpus In-Reply-To: <0384B41A03232C45B676D09A0173AB1E785D63@cdskitexg01.cds.int> References: <201005141508.26421.luigi.mantellini@idf-hit.com> <4BED4E31.2010101@codesourcery.com> <0384B41A03232C45B676D09A0173AB1E785D63@cdskitexg01.cds.int> Message-ID: <201005141540.44435.luigi.mantellini@idf-hit.com> Thank you for your feedback. best regards, luigi venerd? 14 maggio 2010 15:30 "Wong, Ken" ha scritto: > We tried the 4.4 toolchain briefly using the 2.6.25 kernel from Freescale. > We followed the instructions in the getting started guide and was able to > patch the kernel without issue. > > Using the new 4.4 toolchain, our threads seemed to consume much more CPU > time than if we compiled using the old 4.3 toolchain. We're currently > still using the 4.3 toolchain with the Linux 2.6.25 kernel until we find > some more time in our schedule to do the switch over. > > Aside from the unexplained jump in processor usage, our ~2 week evaluation > didn't uncover any bugs with the 4.4 toolchain related to NPTL. > > -----Original Message----- > From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] > Sent: Friday, May 14, 2010 9:21 AM > To: Luigi 'Comio' Mantellini > Cc: coldfire-gnu-discuss at codesourcery.com > Subject: Re: [coldfire-gnu-discuss] NPTL on 547x cpus > > On 5/14/10 5:08 PM, Luigi 'Comio' Mantellini wrote: > > Now, I'm interested to use the last 4.4-217 in order to use the nptl > > implementation, but unfortunately the pthread seems to be broken. > > What do you mean by "broken"? > > Did you apply the kernel patch that the Getting Started Guide mentions? > > To add NPTL support to current ColdFire kernels one needs to apply one > of the patches linked in this knowledge base entry: > https://support.codesourcery.com/GNUToolchain/kbentry52 . > > ... > > > Has anyone used and tested the 4.4-x toolchains? I would like to have > > feedback from cf developers > > We at CodeSourcery run thousands, if not not millions, tests for each > release. Testing of 4.4-217 release included GLIBC testsuite which has > many tests for libpthread. -- Luigi 'Comio' Mantellini R&D - Software Industrie Dial Face S.p.A. Via Canzo, 4 20068 Peschiera Borromeo (MI) Italy Tel.: +39 02 5167 2813 Fax: +39 02 5167 2459 E-mail: luigi.mantellini at idf-hit.com Website: http://www.idf-hit.com Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie. Rispetta l'ambiente. Non stampare questa mail se non ? realmente necessario. This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorized. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks. Help the environment. Please do not print this email unless it is absolutely necessary. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: idf_logo.png Type: image/png Size: 8922 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From maxim at codesourcery.com Fri May 14 19:37:48 2010 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Fri, 14 May 2010 23:37:48 +0400 Subject: [coldfire-gnu-discuss] NPTL on 547x cpus In-Reply-To: <0384B41A03232C45B676D09A0173AB1E785D63@cdskitexg01.cds.int> References: <201005141508.26421.luigi.mantellini@idf-hit.com> <4BED4E31.2010101@codesourcery.com> <0384B41A03232C45B676D09A0173AB1E785D63@cdskitexg01.cds.int> Message-ID: <4BEDA68C.8080706@codesourcery.com> On 5/14/10 5:30 PM, Wong, Ken wrote: ... > Aside from the unexplained jump in processor usage, our ~2 week > evaluation didn't uncover any bugs with the 4.4 toolchain related to > NPTL. I have a guess about the jump in processor usage on thread-heavy applications. Thread-local storage (TLS) and NPTL on ColdFire requires kernel support, e.g., to implement atomic compare-and-exchange operation. This support can be delivered to applications and libraries via kernel system calls or via kernel vDSO. The main difference between system calls and calls to vDSO is that the latter does not involve context switching, so it is substantially faster. From user-space perspective, kernel vDSO acts just like a shared library. Unfortunately, vDSO support for ColdFire kernel was not finished, so current ColdFire kernels do not provide it. Hence the libpthread and other EGLIBC libraries fallback to system call interface to get required functionality. -- Maxim Kuvyrkov CodeSourcery maxim at codesourcery.com (650) 331-3385 x724 From luigi.mantellini at idf-hit.com Sat May 15 11:42:49 2010 From: luigi.mantellini at idf-hit.com (Luigi 'Comio' Mantellini) Date: Sat, 15 May 2010 13:42:49 +0200 Subject: [coldfire-gnu-discuss] NPTL on 547x cpus In-Reply-To: <0384B41A03232C45B676D09A0173AB1E785D63@cdskitexg01.cds.int> References: <201005141508.26421.luigi.mantellini@idf-hit.com> <4BED4E31.2010101@codesourcery.com> <0384B41A03232C45B676D09A0173AB1E785D63@cdskitexg01.cds.int> Message-ID: <201005151342.56160.luigi.mantellini@idf-hit.com> FYI, I posted my complete source tree on github: http://github.com/comio/linux-2.6.25-cf547x/tree/2.6.25-cf547x We worked on cache handling and fec. I hope that freescale wakes up and continues the kernel development... ciao luigi venerd? 14 maggio 2010 15:30 "Wong, Ken" ha scritto: > We tried the 4.4 toolchain briefly using the 2.6.25 kernel from Freescale. > We followed the instructions in the getting started guide and was able to > patch the kernel without issue. > > Using the new 4.4 toolchain, our threads seemed to consume much more CPU > time than if we compiled using the old 4.3 toolchain. We're currently > still using the 4.3 toolchain with the Linux 2.6.25 kernel until we find > some more time in our schedule to do the switch over. > > Aside from the unexplained jump in processor usage, our ~2 week evaluation > didn't uncover any bugs with the 4.4 toolchain related to NPTL. > > -----Original Message----- > From: Maxim Kuvyrkov [mailto:maxim at codesourcery.com] > Sent: Friday, May 14, 2010 9:21 AM > To: Luigi 'Comio' Mantellini > Cc: coldfire-gnu-discuss at codesourcery.com > Subject: Re: [coldfire-gnu-discuss] NPTL on 547x cpus > > On 5/14/10 5:08 PM, Luigi 'Comio' Mantellini wrote: > > Now, I'm interested to use the last 4.4-217 in order to use the nptl > > implementation, but unfortunately the pthread seems to be broken. > > What do you mean by "broken"? > > Did you apply the kernel patch that the Getting Started Guide mentions? > > To add NPTL support to current ColdFire kernels one needs to apply one > of the patches linked in this knowledge base entry: > https://support.codesourcery.com/GNUToolchain/kbentry52 . > > ... > > > Has anyone used and tested the 4.4-x toolchains? I would like to have > > feedback from cf developers > > We at CodeSourcery run thousands, if not not millions, tests for each > release. Testing of 4.4-217 release included GLIBC testsuite which has > many tests for libpthread. -- Luigi 'Comio' Mantellini R&D - Software Industrie Dial Face S.p.A. Via Canzo, 4 20068 Peschiera Borromeo (MI) Italy Tel.: +39 02 5167 2813 Fax: +39 02 5167 2459 E-mail: luigi.mantellini at idf-hit.com Website: http://www.idf-hit.com Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie. Rispetta l'ambiente. Non stampare questa mail se non ? realmente necessario. This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorized. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks. Help the environment. Please do not print this email unless it is absolutely necessary. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: idf_logo.png Type: image/png Size: 8922 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From groleo at gmail.com Mon May 17 14:16:18 2010 From: groleo at gmail.com (Groleo Marius) Date: Mon, 17 May 2010 17:16:18 +0300 Subject: How to activate TLB mapping on m548x ? Message-ID: Hi, I'm trying to activate the TLB mapping in the m548x linux kernel with the following patch arch/m68k/coldfire/head.S ==================== /* ACR0 - System Registers * 0xF000 0000 ACR_BA Base Address * 0x000F 0000 ACR_ADMSK Address Mask * 0x0000 8000 ACR_E Enable the ACR bits * 0x0000 2000 ACR_S=1 Dont care accesses are supervisor-only * 0x0000 0000 ACR_AMM Address mode mask * 0x0000 0040 ACR_CM=2 Cache-inhibited, precise * 0x0000 0008 ACR_SP Supervisor only * ----------- * 0xF00F A048 */ #define ACR0_DEFAULT #0xF00FA048 /* System Regs */ #define ACR1_DEFAULT #0x000FA028 /* SDRAM data chache copy-back */ #define ACR2_DEFAULT #0x00000000 /* Not mapped */ #define ACR3_DEFAULT #0x000FA028 /* SDRAM code cache copy-back */ just before activating the MMU, a TLB zone is created, using 1MB pages, the maximum size Coldfire can support. /* create 8MB dma memory mirror TLB mapping */ mmu_map (CONFIG_DMA_BASE + 0*1024*1024), (CONFIG_SDRAM_BASE + 0*1024*1024), 0, 0, \ MMUTR_SG, MMUDR_SZ1M, MMUDR_DNCP, MMUDR_SP, MMUDR_R, \ MMUDR_W, 0, MMUDR_LK, %d0 Q: Is it O.K. that the mmu_page is MMUDR_DNCP and the ACR is data chache copy-back ? include/asm-m68k/cf_pgalloc.h ======================= -struct page *page = alloc_pages(GFP_DMA|__GFP_REPEAT, 0); +struct page *page = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); Q: Is it O.K. to replace GFP_DMA with GFP_KERNEL ? I think it's not since the kernel will not allocate new PTE entries in the zone created in head.S. I tried this instead: +struct page *page = alloc_pages(GFP_DMA|GFP_KERNEL|__GFP_REPEAT, 0); but the board hanged, and this made me think of a cache de-synchronization. Can anyone please help ? Freescale doesn't show any willingness in offering support. Many thanks -- Regards! http://groleo.wordpress.com -------------- next part -------------- A non-text attachment was scrubbed... Name: 1257329293_cfV4e-enable-memory-cache.patch Type: text/x-diff Size: 13637 bytes Desc: not available URL: From mrharryg at gmail.com Tue May 18 04:53:01 2010 From: mrharryg at gmail.com (Harry Gunnarsson) Date: Mon, 17 May 2010 21:53:01 -0700 Subject: m5272, gdb/gdbserver and uClinux/pthreads... again Message-ID: Hi, Back in march 8th I inquired about pthread debugging under uClinux using gdbserver and Maxim and I had a brief discussion on the topic(you could look up the thread on codesourcery website). I believe his stance was that it should work. I tested again using the brand new 4.4-216, but I am still unsuccessful debugging pthread apps under uclinux. Recap; this used to work using uclinux 2007 and CodeSourcery 4.2. Now with newer kernel/distro and newer toolchain, it doesn't work; once doing 'target remote' from host, gdbserver bails out. Also, debugging non-threaded apps works perfectly. BTW, I am using the uClinux distro from uclinux.org. Some other postings on the mailing lists got me wondered; - Is there anything in the kernel configuration that is required for debugging pthreads? Does anyone had any success doing this kind of debugging? Thanks in advance, Harry -------------- next part -------------- An HTML attachment was scrubbed... URL: From maxim at codesourcery.com Tue May 18 14:44:16 2010 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Tue, 18 May 2010 18:44:16 +0400 Subject: [coldfire-gnu-discuss] m5272, gdb/gdbserver and uClinux/pthreads... again In-Reply-To: References: Message-ID: <4BF2A7C0.1040601@codesourcery.com> On 5/18/10 8:53 AM, Harry Gunnarsson wrote: > Hi, > Back in march 8th I inquired about pthread debugging under uClinux using > gdbserver and Maxim and I had a brief discussion on the topic(you could > look up the thread on codesourcery website). I believe his stance was > that it should work. I tested again using the brand new 4.4-216, but I > am still unsuccessful debugging pthread apps under uclinux. > Recap; this used to work using uclinux 2007 and CodeSourcery 4.2. Now > with newer kernel/distro and newer toolchain, it doesn't work; once > doing 'target remote' from host, gdbserver bails out. Also, debugging > non-threaded apps works perfectly. > > BTW, I am using the uClinux distro from uclinux.org . FWIW, we test our toolchains against LTIB rootfs. > > Some other postings on the mailing lists got me wondered; > - Is there anything in the kernel configuration that is required for > debugging pthreads? > > Does anyone had any success doing this kind of debugging? Can you provide a simple testcase that uses pthreads and debugging which does not work? Thank you, -- Maxim Kuvyrkov CodeSourcery maxim at codesourcery.com (650) 331-3385 x724 From mrharryg at gmail.com Tue May 18 15:37:35 2010 From: mrharryg at gmail.com (Harry Gunnarsson) Date: Tue, 18 May 2010 08:37:35 -0700 Subject: [coldfire-gnu-discuss] m5272, gdb/gdbserver and uClinux/pthreads... again In-Reply-To: <4BF2A7C0.1040601@codesourcery.com> References: <4BF2A7C0.1040601@codesourcery.com> Message-ID: Thanks for the reply, I haven't been able to find a uClinux distro on freescale website. Would you by any chance have a link to that LTIB? Example: I attached a very simple app that uses pthreads. I compile this with '-mcpu=5272 -g3 -pthread' and link this to 'jth' I pick up 'gdbserver' from freescale-coldfire-4.4//m68k-uclinux/libc/m5206e/usr/lib. And I copy them to jffs2 file system on the board. Now I simply run it like: > ./gdbserver :5555 ./jth And from host I connect with (with gdb from same compiler as used above compiling the source) $ m68k-uclinux-gdb jth.gdb .. target remote IP:5555 Now the instance I connect, the gdbserver bails out saying that it couldn't find 'inferior'. I believe this is a thread thing. I can however: - debug a non thread program with the above scheme - without the debugger, run 'jth' correctly Let me know if I can provide further details about the test case Harry On Tue, May 18, 2010 at 7:44 AM, Maxim Kuvyrkov wrote: > On 5/18/10 8:53 AM, Harry Gunnarsson wrote: > >> Hi, >> Back in march 8th I inquired about pthread debugging under uClinux using >> gdbserver and Maxim and I had a brief discussion on the topic(you could >> look up the thread on codesourcery website). I believe his stance was >> that it should work. I tested again using the brand new 4.4-216, but I >> am still unsuccessful debugging pthread apps under uclinux. >> Recap; this used to work using uclinux 2007 and CodeSourcery 4.2. Now >> with newer kernel/distro and newer toolchain, it doesn't work; once >> doing 'target remote' from host, gdbserver bails out. Also, debugging >> non-threaded apps works perfectly. >> >> BTW, I am using the uClinux distro from uclinux.org . >> > > FWIW, we test our toolchains against LTIB rootfs. > > > >> Some other postings on the mailing lists got me wondered; >> - Is there anything in the kernel configuration that is required for >> debugging pthreads? >> >> Does anyone had any success doing this kind of debugging? >> > > Can you provide a simple testcase that uses pthreads and debugging which > does not work? > > Thank you, > > -- > Maxim Kuvyrkov > CodeSourcery > maxim at codesourcery.com > (650) 331-3385 x724 > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: join.c Type: text/x-csrc Size: 875 bytes Desc: not available URL: From list_ob at gmx.net Thu May 20 18:38:06 2010 From: list_ob at gmx.net (Oliver Betz) Date: Thu, 20 May 2010 20:38:06 +0200 Subject: __ctype_ptr__ in .data (RAM)? Message-ID: <4BF5818E.29872.B623EF67@list_ob.gmx.net> Hello All, (Sourcery G++ Lite 4.4-52) version 4.4.1 (m68k-elf) Is there a special reason to have __ctype_ptr__ in .data? BTW, regarding this line in ctype.h: extern __IMPORT _CONST char *__ctype_ptr__; Is "__IMPORT" defined anywhere else than in config.h? TIA, Oliver -- Oliver Betz, Muenchen