CodeWarrior MCU 11.1 Qorivva Compiler Bug

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

CodeWarrior MCU 11.1 Qorivva Compiler Bug

1,472 Views
bkiss
Contributor I

I'm dealing with a compiler bug after update to MCU 11.1.

>internal compiler error (report to <cw_bug@freescale.com>)
>while executing in file 'Coloring.c' line: 690
>(compiling 'HVDEV_initialize' in 'HVDEV.c')

Looks like other NXP compilers have the same issue.

S12 CW11 internal compiler error - report to cw_bug@freescale.com  

I found a workaround, deleted one code line, and got the MOT file built.

It's OTOH generated code, so manually editing it is not a long term option.

When can we expect update of our compiler?

I'm using MPC5643L.

Freescale C/C++ Compiler for Embedded PowerPC.
Copyright(C) 2017, Freescale Semiconductor, Inc.
All rights reserved.
Version 4.3 build 317
Runtime Built: Oct 25 2018 22:51:23

Labels (1)
0 Kudos
3 Replies

1,313 Views
mikedoidge
NXP Employee
NXP Employee

Hello bkiss@xaltenergy.com‌,

I checked with our compiler experts on this. In reference to the other thread you listed:

There's an error your program, which by definition of the C language standard, would cause undefined behavior of the compiler. Typically, undefined behavior would mean undefined at runtime, but the compiler protected the user against unpredictable runtime behavior by just exiting with an internal error.

Std_ReturnType Mcu_InitClock( void )
{
uint16 u16FRef, u16FVco;
uint8 u8SynDiv, u8RefFrq, u8VcoFrq, u8RefDiv;
uint8 u8Tmp, u8CpmuRefDivReg, u8CpmuSynrReg;
boolean bFound;

Mcu_InitClock is declared and defined with return type Std_ReturnType.
The function does not return a value:

CPMUHTCTL = 0x00U;

CPMUVREGCTL = 0x01U;
// #endif
}

This is an error in the program.

So this may apply to your issue as well.

Best Regards,

Mike

0 Kudos

1,313 Views
velvetcanyion
Contributor I

thanks for taking the time to explain.

0 Kudos

1,313 Views
bkiss
Contributor I

We checked our code, the case mentioned doesn't seem to apply.

Code is INIT functions generated my MATLAB. 

Variables initialized to zeros, mostly.

Functions are all void foo_init(void) types.

I only have to comment out one line, something like "var = 0", and I get a binary.

Previous version of the compiler compiled this code without issues, and it passed unit test.

0 Kudos