MPC55xx Warning for Undefined Behavior

Joel Sherrill joel.sherrill at oarcorp.com
Mon Oct 13 20:36:57 UTC 2014


Following up on Gedare's comment.  I am fighting warnings
and there was one buried in the mass which we need help
running down. Peter has found an inconsistency in the
Freescale documentation which is reflected in the code which
in turn causes the warning in the code. Read the thread below
and help us find ground truth.

On 10/13/2014 3:19 PM, Gedare Bloom wrote:
> Joel, You may need to move this over to users at rtems.org to get some
> help from someone with the hardware.
>
> -Gedare
>
> On Mon, Oct 13, 2014 at 4:17 PM, Peter Dufault <dufault at hda.com> wrote:
>> On Oct 13, 2014, at 16:00 , Joel Sherrill <Joel.Sherrill at oarcorp.com> wrote:
>>
>>> On 10/13/2014 2:56 PM, Peter Dufault wrote:
>>>> On Oct 13, 2014, at 15:22 , Peter Dufault <dufault at hda.com> wrote:
>>>>
>>>>> This looks like an issue in the header.  I downloaded the MPC5674F Reference Manual and it does specify 479 interrupt request sources.  See table 9-2, INTC Memory Map
>>>>>
>>>>> Base + (0x0040–0x0219)  INTC_PSRn—INTC priority select registers 2 0–479
>>>> Last posting on this, because it's confused and I'll defer to someone with the hardware who can puzzle this out.
>>>>
>>>> The Freescale manual is inconsistent - there isn't space for 479 (1-byte) registers in the specified memory range 0x0040 through 0x0219 that I am quoting above.  That amount allows for the 474 registers in the Freescale header file and not the 479 in the RTEMS header file. So if I had to guess I'd guess the RTEMS header is wrong because someone read the Freescale manual and saw it clearly say there are 479 registers.
>>> That sounds enormously like a typo in the manual since the warning says
>>> 474u.
>>> The compiler is catching that there isn't enough space in that array.
>>>
>>> I am prone to change 479 to 474 as you suggested but I would like another
>>> opinion first.
>>>
>>> Thanks for tracking this one down.
>> It's more confusing than that.  There are hardware decimation filters E through H that show up in the Freescale manual with the assignment of numbers 476 through 479, so it could be the memory range in the document that's in error and not the count of interrupt sources.
>>
>> We'll leave it to the folk with the hardware.
>>
>>>> Peter
>>>> -----------------
>>>> Peter Dufault
>>>> HD Associates, Inc.      Software and System Engineering
>>>>
>>> --
>>> Joel Sherrill, Ph.D.             Director of Research & Development
>>> joel.sherrill at OARcorp.com        On-Line Applications Research
>>> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
>>> Support Available                (256) 722-9985
>>>
>> Peter
>> -----------------
>> Peter Dufault
>> HD Associates, Inc.      Software and System Engineering
>>
>> _______________________________________________
>> devel mailing list
>> devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the devel mailing list