Is Processor Expert recommended for MQX (Non-Lite)?

cancel
Showing results for 
Search instead for 
Did you mean: 

Is Processor Expert recommended for MQX (Non-Lite)?

Jump to solution
4,453 Views
anguel
Contributor V

Hi!

I wonder if Processor Expert is really recommended for accessing peripherals like I2C and SPI in new MQX (Non-Lite!) projects or not. I know that PE cannot be used to configure advanced MQX components like USB and Ethernet but how about the simple ones? Is Processor Expert a production-proof best-practice

approach or is it just something novice developers should use to experiment with the device features? Unfortunately, I did not find any docs regarding this topic.

There are some new videos but they are all about using PE with MQX-Lite. So what about the full-featured MQX version? My target is Kinetis K70. I am asking because I have also found some older appnotes that show examples using file I/O to access SPI, I2C, etc. :

http://www.freescale.com/files/microcontrollers/doc/app_note/AN4345.pdf

So what is the recommended way to go for MQX? PE or do it yourself?

Thank you in advance.

Anguel

Tags (2)
1 Solution
773 Views
petr_uhlir
NXP Employee
NXP Employee

Hi Anguel,

it depends on your personal preferences. If you like concept of components with GUI configuration and generated code you can use ProcessorExpert. It allows to mix MQX and PEx in the same BSP. So you can for example use UART, Ethernet, USB and  SPI from MQX and add I2C, DAC, ADC, PWM, GPIO from ProcessorExpert.

To select particular driver from MQX or the ekvivalent one from PEx depends also on your application.

If you require for example MFS running on SDCARD you have to use SPI or SDHC driver from MQX due to Posix.

For other cases like ADC, I2C I would rather choose PEx drivers as they are much lighter and easier to use.

Some drivers like DAC are not supported in MQX.

To make your decision easier you can test PEx drivers with MQX Lite and if found suitable you can easily transfer them into full MQX just by using Export / Import.

If you do not like generated code you can at least take some inspiration and reuse code from PEx drivers when you write your own drivers from scratch.

Some documentation about using PEx and MQX can be found in "mqx\doc\tools\cw\FSL_MQX_in_CW_10_x.pdf"

Petr

View solution in original post

0 Kudos
27 Replies
193 Views
anguel
Contributor V

Petr,

Just wanted to give some feedback regarding my first tests with MQX / MQX Lite and PEx. Although I consider myself an experienced computer user and have MCU experience I find the whole development process very complex for first time users and unfortunately there are no good docs to get started with. Everything is extremely confusing - CW, MQX, then MQX Lite now and PEx on top of that... What should I really use where and why...

Freescale should be aware that new users don't know about their complex software dependencies and where to tweak what to get it to work or at least not to break it. FSL_MQX_in_CW_10_x.pdf is also full of mistakes, not only mistypings and overlooked things but even complete slides appear on wrong pages. There is no explanation text, so we have to guess what the author wants to say.

Previously I worked with Texas Instruments - their Eclipse IDE and RTOS are not that complex but nevertheless they have spent a day or two and have done some free multi-day video workshops to help people get started. Freescale should really consider doing something like this and it will also save many inquiries in the forums. I don't find any longer videos or walkthroughs for MQX, MQX Lite or PEx. MQX Lite was probably created to make things easier, but to it looks things got just more confusing.

Regards,

Anguel

193 Views
mehmetekici
Contributor II

Hi Petr,

Would you please tell us at what versions of MQX and CW you assume ? Because we use CW10.2. we have to use it because it only supports MQX4.0. CW10.2 does not have options you mentioned above.

Did you tested it with CW10.3  and MQX 3.8.1 ?

Note : when we add PE components to BSP and generate the code  bsp compilation fails. I think PE is not properly integrated to MQX at least version 4.0.

Regards,

Mehmet

0 Kudos
193 Views
petr_uhlir
NXP Employee
NXP Employee

Mehmet,

MQX Lite is available in CW 10.3 and there should be no problem to use it with MQX 4.0.0 so you can try.

Note : when we add PE components to BSP and generate the code  bsp compilation fails. I think PE is not properly integrated to MQX at least version 4.0

Can you be more specific? Which compiler (FSL or GCC) which bsp,.... can you post here your ProcessorExpert.pe for check?

Regards Petr

0 Kudos
193 Views
mehmetekici
Contributor II

Petr,

We are using a custom board based on bsp_twrk60d100m. We actually try the test on the bsp_twrk60d100m. I have attached the pe project file.

We use arm tool chain.  The problem is pe generated files and other files define the same structures. An excerpt from the error log.

Regards,

Mehmet

>QX1.h:40

>C:\Freescale\Freescale_MQX_4_0\mqx\source\bsp\twrk60d100m\init_esdhc.c:33)

>       C:\Freescale\Freescale_MQX_4_0\mqx\source\bsp\twrk60d100m\bsp.h:37

>

>C:\Freescale\Freescale_MQX_4_0\mqx\source\bsp\twrk60d100m\init_flashx.c:33)

>struct/union/enum/class tag 'RFSYS_MemMap' redefined

>(included from:

>struct/union/enum/class tag 'CAN_MemMap' redefined

>

>C:\Freescale\Freescale_MQX_4_0\mqx\build\cw10\bsp_twrk60d100m\Generated_Code\M

>QX1.h:40

>

>(included from:

>

>C:\Freescale\Freescale_MQX_4_0\mqx\source\bsp\twrk60d100m\init_bsp.c:33)

>(included from:

>

>C:\Freescale\Freescale_MQX_4_0\mqx\build\cw10\bsp_twrk60d100m\Generated_Code\M

>QX1.h:40

>C:\Freescale\Freescale_MQX_4_0\mqx\build\cw10\bsp_twrk60d100m\Generated_Code\P

>E_LDD.h:2161

>

>struct/union/enum/class tag 'FMC_MemMap' redefined

>(included from:

>

>C:\Freescale\Freescale_MQX_4_0\mqx\build\cw10\bsp_twrk60d100m\Generated_Code\M

>QX1.h:40

>

>C:\Freescale\Freescale_MQX_4_0\mqx\build\cw10\bsp_twrk60d100m\Generated_Code\M

>

>identifier 'CMP_MemMapPtr' redeclared

>was declared as: 'volatile struct CMP_MemMap *'

>now declared as: 'volatile struct  *'

>QX1.h:40

>

>C:\Freescale\Freescale_MQX_4_0\mqx\build\cw10\bsp_twrk60d100m\Generated_Code\P

>       C:\Freescale\Freescale_MQX_4_0\mqx\source\bsp\twrk60d100m\bsp.h:37

>E_LDD.h:2161

>       C:\Freescale\Freescale_MQX_4_0\mqx\source\bsp\twrk60d100m\bsp.h:37

>struct/union/enum/class tag 'MCM_MemMap' redefined

>

>(included from:

>identifier 'DMA_MemMapPtr' redeclared

>C:\Freescale\Freescale_MQX_4_0\mqx\build\cw10\bsp_twrk60d100m\Generated_Code\P

>was declared as: 'volatile struct DMA_MemMap *'

>now declared as: 'volatile struct  *'

>(included from:

>

0 Kudos
193 Views
petr_uhlir
NXP Employee
NXP Employee

Mehmet,

your ProcessorExpert.pe file is set for MK60DN512ZVLQ10 (K60 with Z which means older silicion revision) and BSP you are trying to integrate it with is MK60DN512VMD10. Thats the reason why you get compile errors. When you clone some BSP you have to also take and modify right ProcessorExpert.pe file.

0 Kudos
193 Views
mehmetekici
Contributor II

Petr,

MK60DN512VMD10 vas originally there but PE gave error not recognized CPU so that I have changed it. We have only


MK60DN256Zxxx10,

MK60DN512Zxxx10,

MK60DNDX256Zxxx10


from component library. When I do "check for updates" from help menu of CW10.2 it says "no updates were found".


Regards,

Mehmet


0 Kudos
193 Views
petr_uhlir
NXP Employee
NXP Employee

You can to download latest CodeWarrior version here

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CW-MCU10

Petr

0 Kudos