yolco
Member level 2
After developing a new firmware (main and libraries) with CCS for my CC2538, all errors are debugged, and now, device is working fine.
As from CCS I can not flash the firmware permanently, I'm working with IAR to develop this action.
On IAR, I have created the workspace, the project and included all libraries and files needed to compile the firmware. But, compilation fails due to incompatible types errors.
Which is the root cause of these errors?
Maybe, any option of the compiler? Do I need to add any file? Or prototype on the code?
KR!
- - - Updated - - -
At second error the code is wrong. I missmatch at copy time.
Please find here the code for Pe513:
uint8_t xlo;
...
accData[i++] = (xlo | (xhi << 8));
As from CCS I can not flash the firmware permanently, I'm working with IAR to develop this action.
On IAR, I have created the workspace, the project and included all libraries and files needed to compile the firmware. But, compilation fails due to incompatible types errors.
- Error[Pe144]: a value of type "int" cannot be used to initialize an entity of type "signed short *"
int16_t *accData[3] = malloc(sizeof(int16_t));
- Error[Pe513]: a value of type "int" cannot be assigned to an entity of type "signed short *"
int16_t *accData[3] = malloc(sizeof(int16_t));
- Error[Pe120]: return value type ("signed short **") does not match the function type ("signed short*")
int16_t * lsm303d_readAccData(void)
{
{
int16_t *accData[3] = malloc(sizeof(int16_t));
...
return accData;
}...
return accData;
Which is the root cause of these errors?
Maybe, any option of the compiler? Do I need to add any file? Or prototype on the code?
KR!
- - - Updated - - -
At second error the code is wrong. I missmatch at copy time.
Please find here the code for Pe513:
uint8_t xlo;
...
accData[i++] = (xlo | (xhi << 8));