From chen at chinstruments.com Thu Feb 2 20:20:46 2012 From: chen at chinstruments.com (chen at chinstruments.com) Date: Thu, 02 Feb 2012 14:20:46 -0600 Subject: [arm-gnu] Compiler versions other than 2009q3-68 all fail?? Message-ID: <20120202142046.14743drh9ln0vz8k@chinstruments.com> I have code (linked below) that only runs correctly when compiled only with arm-none-eabi version 2009q3-68; the application fails when compiled with _both newer and older versions_ of arm-none-eabi. The problems were observed on TI's AM1707 EVM Rev. H (ARM926EJ-S core). The code is a bare metal application that runs the EVM board as a generic USB bulk device, with console output via serial port interrupts. Using the same code and EVM board, different behavior is obtained when using different compiler versions (no internal compiler errors for any version): _Older CodeSourcery versions_ (2009q1-161 and older, through 2008) * Everything works fine when run from debugger, but... * USB enumeration fails, but only when application is flashed to the board _Newer CodeSourcery versions_ (2010q1-188 to 2011.09-69) * Serial port outputs as gibberish via interrupts (both from debugger and when flashed) * USB enumeration fails (both from debugger and when flashed) _CodeSourcery G++ Lite version 2009q3-68_ * Everything works correctly! * Serial port output works correctly (both from debugger and when flashed) * USB enumeration and data transfer work correctly (both from debugger and when flashed) Source code + makefile + long description More on serial port regression Serial port only code (no USB) -------------- next part -------------- An HTML attachment was scrubbed... URL: From chen at chinstruments.com Fri Feb 3 01:50:14 2012 From: chen at chinstruments.com (chen at chinstruments.com) Date: Thu, 2 Feb 2012 19:50:14 -0600 Subject: [arm-gnu] Compiler versions other than 2009q3-68 all fail?? Message-ID: resend as plain text (no html or attachment) ---------------------------- Original Message ---------------------------- Subject: Compiler versions other than 2009q3-68 all fail?? Date: Thu, February 2, 2012 2:20 pm To: arm-gnu at codesourcery.com -------------------------------------------------------------------------- I have code (linked below) that only runs correctly when compiled only with arm-none-eabi version 2009q3-68; the application fails when compiled with *both newer and older versions* of arm-none-eabi. The problems were observed on TI's AM1707 EVM Rev. H (ARM926EJ-S core). The code is a bare metal application that runs the EVM board as a generic USB bulk device, with console output via serial port interrupts. Using the same code and EVM board, different behavior is obtained when using different compiler versions (no internal compiler errors for any version): Older CodeSourcery versions (2009q1-161 and older, through 2008) --------------------------- * Everything works fine when run from debugger, but... * USB enumeration fails, but only when application is flashed to the board Newer CodeSourcery versions (2010q1-188 to 2011.09-69) --------------------------- * Serial port outputs as gibberish via interrupts (both from debugger and when flashed) * USB enumeration fails (both from debugger and when flashed) CodeSourcery G++ Lite version 2009q3-68 --------------------------------------- * Everything works correctly! * Serial port output works correctly (both from debugger and when flashed) * USB enumeration and data transfer work correctly (both from debugger and when flashed) Source code + makefile + long description More on serial port regression Serial port only code (no USB) From chen at chinstruments.com Fri Feb 3 15:25:56 2012 From: chen at chinstruments.com (chen at chinstruments.com) Date: Fri, 3 Feb 2012 09:25:56 -0600 Subject: [arm-gnu] (no subject) Message-ID: <385dc3c78d3cfeb44ce49de2d813426d.squirrel@chinstruments.com> resend again as plain text (no html or attachment) ---------------------------- Original Message ---------------------------- Subject: Compiler versions other than 2009q3-68 all fail?? Date: Thu, February 2, 2012 2:20 pm To: arm-gnu at codesourcery.com -------------------------------------------------------------------------- I have code (linked below) that only runs correctly when compiled only with arm-none-eabi version 2009q3-68; the application fails when compiled with *both newer and older versions* of arm-none-eabi. The problems were observed on TI's AM1707 EVM Rev. H (ARM926EJ-S core). The code is a bare metal application that runs the EVM board as a generic USB bulk device, with console output via serial port interrupts. Using the same code and EVM board, different behavior is obtained when using different compiler versions (no internal compiler errors for any version): Older CodeSourcery versions (2009q1-161 and older, through 2008) --------------------------- * Everything works fine when run from debugger, but... * USB enumeration fails, but only when application is flashed to the board Newer CodeSourcery versions (2010q1-188 to 2011.09-69) --------------------------- * Serial port outputs as gibberish via interrupts (both from debugger and when flashed) * USB enumeration fails (both from debugger and when flashed) CodeSourcery G++ Lite version 2009q3-68 --------------------------------------- * Everything works correctly! * Serial port output works correctly (both from debugger and when flashed) * USB enumeration and data transfer work correctly (both from debugger - Hide quoted text - and when flashed) Source code + makefile + long description More on serial port regression Serial port only code (no USB) From sposelenov at emcraft.com Sat Feb 4 09:08:52 2012 From: sposelenov at emcraft.com (Sergei Poselenov) Date: Sat, 04 Feb 2012 13:08:52 +0400 Subject: [arm-gnu] Compiler versions other than 2009q3-68 all fail?? In-Reply-To: References: Message-ID: <1328346533.2107.18.camel@mehome> Hi Chen, Generally, such regression suggests some problems in the code (btw - please consider to reduce the whole project to some easily-read example which causes regression. It will help you to point down the problem). I'd suggest the following: - Add "-Wall" to the compiler CFLAGS (if not already added) and address all warnings. - Check that all references to the hardware registers in the source code are not optimized out by the compiler (use "volatile" where appropriate). - Check/compare the actual code generated by the toolchain (use "arm-non-eabi-objdump -d"). Regards, Sergei On Thu, 2012-02-02 at 19:50 -0600, chen at chinstruments.com wrote: > resend as plain text (no html or attachment) > > ---------------------------- Original Message ---------------------------- > Subject: Compiler versions other than 2009q3-68 all fail?? > Date: Thu, February 2, 2012 2:20 pm > To: arm-gnu at codesourcery.com > -------------------------------------------------------------------------- > > I have code (linked below) that only runs correctly when compiled only > with arm-none-eabi version 2009q3-68; the application fails when compiled > with *both newer and older versions* of arm-none-eabi. > > The problems were observed on TI's AM1707 EVM Rev. H (ARM926EJ-S core). > The code is a bare metal application that runs the EVM board as a generic > USB bulk device, with console output via serial port interrupts. Using > the same code and EVM board, different behavior is obtained when using > different compiler versions (no internal compiler errors for any version): > > Older CodeSourcery versions (2009q1-161 and older, through 2008) > --------------------------- > * Everything works fine when run from debugger, but... > * USB enumeration fails, but only when application is flashed to the board > > > Newer CodeSourcery versions (2010q1-188 to 2011.09-69) > --------------------------- > * Serial port outputs as gibberish via interrupts (both from debugger > and when flashed) > * USB enumeration fails (both from debugger and when flashed) > > > CodeSourcery G++ Lite version 2009q3-68 > --------------------------------------- > * Everything works correctly! > > * Serial port output works correctly (both from debugger and when flashed) > * USB enumeration and data transfer work correctly (both from debugger > and when flashed) > > > Source code + makefile + long description > > > More on serial port regression > > > Serial port only code (no USB) > > _______________________________________________ > arm-gnu mailing list > arm-gnu at codesourcery.com > http://sourcerytools.com/cgi-bin/mailman/listinfo/arm-gnu From chen at chinstruments.com Mon Feb 6 21:49:19 2012 From: chen at chinstruments.com (chen at chinstruments.com) Date: Mon, 6 Feb 2012 15:49:19 -0600 Subject: [arm-gnu] Compiler versions other than 2009q3-68 all fail?? In-Reply-To: <1328346533.2107.18.camel@mehome> References: <1328346533.2107.18.camel@mehome> Message-ID: <91dca237a43f1b99699ae67dc5460e41.squirrel@chinstruments.com> Hello, Sergei, Thank you for the helpful tips, and sorry for not providing a concise example! I did not write the code myself; I was only porting it to an unsupported processor. Stepping through the disassembly for the simpler serial port application revealed the need for an additional compiler flag: -fno-zero-initialized-in-bss Adding this flag resolved the "regressions" in both the serial port and the USB applications when compiled with 2011.09. This flag was not required for 2009q3, which apparently was more lenient. Older compiler versions were not tested. Best, Jonathan Reference Serial port source code > Hi Chen, > > Generally, such regression suggests some problems in the code (btw - > please consider to reduce the whole project to some easily-read example > which causes regression. It will help you to point down the problem). > > I'd suggest the following: > - Add "-Wall" to the compiler CFLAGS (if not already added) and address > all warnings. > - Check that all references to the hardware registers in the source > code are not optimized out by the compiler (use "volatile" where > appropriate). > - Check/compare the actual code generated by the toolchain (use > "arm-non-eabi-objdump -d"). > > Regards, > Sergei > > On Thu, 2012-02-02 at 19:50 -0600, chen at chinstruments.com wrote: >> resend as plain text (no html or attachment) >> >> ---------------------------- Original Message >> ---------------------------- >> Subject: Compiler versions other than 2009q3-68 all fail?? >> Date: Thu, February 2, 2012 2:20 pm >> To: arm-gnu at codesourcery.com >> -------------------------------------------------------------------------- >> >> I have code (linked below) that only runs correctly when compiled only >> with arm-none-eabi version 2009q3-68; the application fails when >> compiled >> with *both newer and older versions* of arm-none-eabi. >> >> The problems were observed on TI's AM1707 EVM Rev. H (ARM926EJ-S core). >> The code is a bare metal application that runs the EVM board as a >> generic >> USB bulk device, with console output via serial port interrupts. Using >> the same code and EVM board, different behavior is obtained when using >> different compiler versions (no internal compiler errors for any >> version): >> >> Older CodeSourcery versions (2009q1-161 and older, through 2008) >> --------------------------- >> * Everything works fine when run from debugger, but... >> * USB enumeration fails, but only when application is flashed to the >> board >> >> >> Newer CodeSourcery versions (2010q1-188 to 2011.09-69) >> --------------------------- >> * Serial port outputs as gibberish via interrupts (both from debugger >> and when flashed) >> * USB enumeration fails (both from debugger and when flashed) >> >> >> CodeSourcery G++ Lite version 2009q3-68 >> --------------------------------------- >> * Everything works correctly! >> >> * Serial port output works correctly (both from debugger and when >> flashed) >> * USB enumeration and data transfer work correctly (both from >> debugger >> and when flashed) >> >> >> Source code + makefile + long description >> >> >> More on serial port regression >> >> >> Serial port only code (no USB) >> >> _______________________________________________ >> arm-gnu mailing list >> arm-gnu at codesourcery.com >> http://sourcerytools.com/cgi-bin/mailman/listinfo/arm-gnu > > >