[arm-gnu] Compiler versions other than 2009q3-68 all fail??

chen at chinstruments.com chen at chinstruments.com
Mon Feb 6 21:49:19 UTC 2012


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
<http://gcc.gnu.org/ml/gcc-help/2007-07/msg00097.html>

Serial port source code
<http://e2e.ti.com/support/embedded/starterware/f/790/t/160340.aspx#592941>




> 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
>> <http://e2e.ti.com/support/embedded/starterware/f/790/t/151682.aspx?PageIndex=2#584582>
>>
>> More on serial port regression
>> <http://e2e.ti.com/support/embedded/starterware/f/790/t/160340.aspx>
>>
>> Serial port only code (no USB)
>> <http://e2e.ti.com/support/embedded/starterware/f/790/t/151682.aspx#570450>
>> _______________________________________________
>> arm-gnu mailing list
>> arm-gnu at codesourcery.com
>> http://sourcerytools.com/cgi-bin/mailman/listinfo/arm-gnu
>
>
>




More information about the arm-gnu mailing list