avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] possible optimize bugg


From: Erik Christiansen
Subject: Re: [avr-gcc-list] possible optimize bugg
Date: Tue, 16 Jan 2018 14:59:16 +1100
User-agent: Mutt/1.8.0 (2017-02-23)

Reply-To: address@hidden

On 16.01.18 01:17, georg chambert wrote:
> 
> msg_on[0] = 0b10001000; // address
> 
> msg_on[1] = 0b00000000; // PWZS Tmmm : (?) mmm = cool 
> 
> msg_on[2] = 0b10000100; // tttt,vvvv ; 23c , high vent 
> 
> msg_on[3] = 0b11000000; // pppp, 0 ; parity
> 
> -----  etc for 6 more messages ----

...

> if (msg_nbr == 0) for (i=0;i<4;i++) seq[i] = msg_off[i]; // load a selected 
> message to send (off)

No information provided on msg_off, so no diagnosis possible.

> //if (msg_nbr == 1) for (i=0;i<4;i++) seq[i] = msg_on[i]; //

This is the only line which addresses the msg_on array.

> //if (msg_nbr == 2) for (i=0;i<4;i++) seq[i] = msg_on26[i]; // 
> 
> //if (msg_nbr == 3) for (i=0;i<4;i++) seq[i] = msg_on1[i]; //
> 
> //if (msg_nbr == 4) for (i=0;i<4;i++) seq[i] = msg_on2[i];
> 
> //if (msg_nbr == 5) for (i=0;i<4;i++) seq[i] = msg_on3[i]; 
> 
> if (msg_nbr == 6) for (i=0;i<4;i++) seq[i] = msg_on4[i]; 

No information provided on msg_on4, a different array, so no diagnosis possible.

> When I comment out the inbetween statements the last one for 6, works,
> else the data in seq array is not what  I just put the msg_on4 just
> before.

You might try: $ nm yourfile.elf | grep msg_on
then compare the values for msg_on and msg_on4.
If you have made them the same address, in a way not shown, then the
same data could be expected, if I understand what you're trying to do.

Erik




reply via email to

[Prev in Thread] Current Thread [Next in Thread]