Using PE code in a MQX project

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

Using PE code in a MQX project

跳至解决方案
569 次查看
barbercolman
Contributor III

I have a MCF51JM processor project that needs a high speed timer. I used PE to generate code to setup and run TMP2. The code works but the PE generated non mqx code ( (void)getReg8(TPM2C1SC_CH1F) ) which MQX would compile. I ended up moving the code into a sperate module, but it is real ugly. I am new to Freescale , is there clean way  to rewrite the code PE generated?

 


 


0 项奖励
1 解答
352 次查看
marek_vinkler
NXP Employee
NXP Employee

This is because Processor Expert for ColdFireV1 is not fully integrated with MQX yet. In your case, you can try to include PE_Types.h file generated from Processor Expert. This file contains appropriate register access macros like getRegxx. You can also extract only necessary macros from this file directly into your .c/.h file.

 

See also this topic. It might help.

https://community.freescale.com/message/87924#87924

 

Marek V.

在原帖中查看解决方案

0 项奖励
1 回复
353 次查看
marek_vinkler
NXP Employee
NXP Employee

This is because Processor Expert for ColdFireV1 is not fully integrated with MQX yet. In your case, you can try to include PE_Types.h file generated from Processor Expert. This file contains appropriate register access macros like getRegxx. You can also extract only necessary macros from this file directly into your .c/.h file.

 

See also this topic. It might help.

https://community.freescale.com/message/87924#87924

 

Marek V.

0 项奖励