MQX 4.1 bool type conflict issues

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MQX 4.1 bool type conflict issues

1,245 次查看
aroste
Contributor IV

Hi,

I am/was working on a project I did with CW10.5 and MQX 4.0.1 starting from a BSP TWR-K60F120M.  The projects works fine so it's in final development part.  As I still have some work and that another board software to do with the same configuration I started to update to MQX4.1.

So I installed MQX4.1 (new folder) and cloned it to my workspace to have a MQX copy with BSP from BSP TWR-K60F120M. (As I did for 2 projects now and works well)

I have some PE components that I created, as ADC; SPI; FTM; Flash, etc...   I encounter the problem with bool type.  I read that in PE_Types.h I should add a "#ifndef bool", that fixes most of issues. (workaround)

But I still have a type issue for 3 functions. I cannot find from where it comes, as bool is also used in some structure definitions, etc..

bool SPI_Eeprom_GetBlockReceivedStatus(LDD_TDeviceData *DeviceDataPtr)

bool SPI_Eeprom_GetBlockSentStatus(LDD_TDeviceData *DeviceDataPtr)

bool SPI1_Inc_GetBlockSentStatus(LDD_TDeviceData *DeviceDataPtr)

error: conflicting types for 'SPI1_Inc_GetBlockSentStatus'

Help would be welcome.

BR

-stéphan-

标记 (5)
0 项奖励
回复
4 回复数

708 次查看
lvw
Contributor II

Hello,

Define bool to always be an unsigned char.

At line 32 in stdbool.h, just replace #define bool _Bool by #define bool unsigned char.

You might want to make a copy of the file before because it comes with the distribution of CW.

The file is located here: "CW MCU v10.6\MCU\ARM_GCC_Support\ewl\EWL_C\include\stdbool.h"


- Luc

0 项奖励
回复

708 次查看
Martin_
NXP Employee
NXP Employee

Check MQX_Release_Notes.pdf, section: 5.19 Bool Type Conflict in Processor Expert BSPs and MQX Applications

perhaps it will help.

0 项奖励
回复

708 次查看
aroste
Contributor IV

Hi,

Thanks for your answer. Yes I read already that part, it's why I said that this workaround in the PE_Types.h has fixed most of error.  But I still have 3 remaining errors for the functions listed above generated by PE that I don't know how to fix.

Thanks

BR

-stéphan-

0 项奖励
回复

708 次查看
DavidS
NXP Employee
NXP Employee

Hi BR,

I had same issue several weeks ago so I just changed the return definition to "unsigned int" in all locations.  My assumption it is a PE issue that will get resolved so this is just a workaround.

Regards,

David

0 项奖励
回复