Automatic variables initialization [CW7.3 for 56F8xxxxx]

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatic variables initialization [CW7.3 for 56F8xxxxx]

1,922 Views
Eugenio
Contributor I

I have developed an application for MC56F8346 hybrid controller with CW7.0 with no problem. Later I've updated to CW7.3 to handle a brand new USB-TAP OnCE emulator, and the application stopped working properly.

Compiling it with CW7.0 everything works fine, while compiling *the same code* with CW7.3 it hangs... I found a different behaviour handling automatic variables. This code:

void dummy_function (void)

{ unsigned char array[3]={0x00, 0x01, 0x02};

if (array[0]==0x00&&array[1]==0x01&&array[2]==0x02)

printf("\nOk!");

else

printf("\nArray not init");

return;

}

returns "Ok" if compiled with rel 7.0, and "Array not init" with rel 7.3

Is this a bug? Someone reported a similar problem in thread "Defining a temporary array on stack". Quite funny!

Labels (1)
Tags (1)
0 Kudos
1 Reply

285 Views
CompilerGuru
NXP Employee
NXP Employee
I shortly checked the "Defining a temporary array on stack" thread and found that this has definitely nothing to do with your issue. This thread was about the HC12 and yours is about the 56F8xxxxx. Both compilers are from Freescale, but they have a completely separate history, so I can really exclude any relations between the two issues.
I also had the chance to day (I dont have a 56F8xxxxx installation on my PC) to compile your snippet on a upcoming CW 8.0 candidate and it worked fine, both with and without optimizations.
I would think it best to issue a service request just as
CrasyCat suggested on the other thread.

Copied from this thread:
>Use following URL:
>http://www.freescale.com/webapp/sps/site/homepage.jsp?nodeId=054670&tid=FSH
>then click on "Submit a service Request".

>Make sure you attach a reproducible case and indicate which
>version of the tools you are using and which compiler options
>you are using.

Daniel
0 Kudos