Rebuild BSP with IAR error

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

Rebuild BSP with IAR error

Jump to solution
1,822 Views
GaQuay
Contributor I

Hi,

I am trying to rebuild the bsp using IAR v6.0 and the compiler generates these of errors.

 

Error[Pe144]: a value of type "int" cannot be used to initialize an entity of type "unsigned int const volatile *"

 

The error points to this code

 

static  uint32_t volatile * const pctl_ptr_arr[] = {
    &(PORTA_PCR(0)),
    &(PORTB_PCR(0)),
    &(PORTC_PCR(0)),
    &(PORTD_PCR(0)),
    &(PORTE_PCR(0))
};


I rebuilt the BSP on another machine (windows xp) and it compiled just fine.

 

Does any one have this same problem?

 

0 Kudos
1 Solution
1,084 Views
PetrM
Senior Contributor I

Hello,

 

I'm able to compile this with IAR 6.10.1:

 

 

static  uint32_t volatile * const pctl_ptr_arr[] = {
    &(PORTA_PCR(0)),
    &(PORTB_PCR(0)),
    &(PORTC_PCR(0)),
    &(PORTD_PCR(0)),
    &(PORTE_PCR(0))
};

 

 

uint32_t volatile * port;
port = pctl_ptr_arr[2];

 

 

Do your macros PORTx_PCR() resolve to uint32_t volatile type? Maybe they are not known and compiler assumes int...

 

Regards,

PetrM

 

View solution in original post

0 Kudos
4 Replies
1,085 Views
PetrM
Senior Contributor I

Hello,

 

I'm able to compile this with IAR 6.10.1:

 

 

static  uint32_t volatile * const pctl_ptr_arr[] = {
    &(PORTA_PCR(0)),
    &(PORTB_PCR(0)),
    &(PORTC_PCR(0)),
    &(PORTD_PCR(0)),
    &(PORTE_PCR(0))
};

 

 

uint32_t volatile * port;
port = pctl_ptr_arr[2];

 

 

Do your macros PORTx_PCR() resolve to uint32_t volatile type? Maybe they are not known and compiler assumes int...

 

Regards,

PetrM

 

0 Kudos
1,084 Views
GaQuay
Contributor I

Thank for the hint. I will try to look into it.  The message seems to point to what you suggested.

But just out of curiosity, I compiled this same piece of code using other machine, XP 32 bit, it works just fine.

Thanks I will post what I find out.

 

 

0 Kudos
1,084 Views
akvarel
Contributor I

I have IAR 6.20.2 and on that compiller I get an error:

Error[Pe144]: a value of type "int" cannot be used to initialize an entity of type "unsigned long volatile *" C:\Program Files\Freescale\Freescale MQX 3.7\mqx\source\io\lcd\lcd_twrk40x256.c 71 

The same for other 2 files from MQX. It is compiled just fine with IAR 6.20.1 and with CW10.1. Where can be the problem? How to fix it ?

0 Kudos
1,084 Views
anthony_huereca
NXP Employee
NXP Employee

There was a bug introduced in IAR 6.20.2. Download 6.20.3 and you should be good to go.

0 Kudos