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?
Solved! Go to Solution.
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
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
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.
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 ?
There was a bug introduced in IAR 6.20.2. Download 6.20.3 and you should be good to go.