Automatic variables initialization [CW7.3 for 56F8xxxxx]

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Automatic variables initialization [CW7.3 for 56F8xxxxx]

2,414件の閲覧回数
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!

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

777件の閲覧回数
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 件の賞賛
返信