Using PE code in a MQX project

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

Using PE code in a MQX project

Jump to solution
524 Views
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 Kudos
1 Solution
307 Views
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.

View solution in original post

0 Kudos
1 Reply
308 Views
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 Kudos