Tutorial for PE with MQX and KDS.

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

Tutorial for PE with MQX and KDS.

716 Views
jrs1986
Contributor II

Hi,

I want to develop a firmware with the MQX RTOS. Additionally I want to use KDS for it as this is the IDE we chose over CW because it is newer and more recommended for starting new projects. I am developing on a TWR-K60F120M with the TWR-SER and TWR-ELEV modules.

I worked through a lot of "Getting started" documents and tried to make a new Kinetis project.

I added the CPU first followed by LEDs, a Console, a Wait Module and the two buttons.

Till here everything worked perfectly fine and I was able to flash the software to the board and got the desired mooving lights. Now I added MQX (not MQX lite) to the project. Now I can't build it anymore as I get the following error for each BitIoLdd:

In function `BitIoLddX_Init':

../Generated_Code/BitIoLdd3.c:130: undefined reference to `_lwmem_alloc_system'

I can find the _lwmem_alloc_system macro in the mqx.h in the built psp library which is also included in the project. But it seems like the linker is not able to make that connection. I don't know if the ordering of the includes might be the problem. But I treid to circument that by using -Xlinker --start-group ${INPUTS} -Xlinker --end-group instead of ${INPUTS}...

Additionally I have the problem that I don't really know what to do with the MQX module in PE. I don't see a possibility to add tasks or semaphores. So is it, that the module adds the OS and adapters to it and basically everything else needs to be added by hand?

I also tried to load the pe_demo into CW but it doesn't show the PE components. I was just curious to see how that looks like.

Well, a lot of questions at once. Maybe someone can help me to solve some of them :smileywink:

Thanks,

best regards,

Jan

0 Kudos
Reply
2 Replies

462 Views
soledad
NXP Employee
NXP Employee

Hello Jan,

Processor Expert (PEx) can generate the driver and the initialization code for the MCU peripherals and also make the MCU clock setup easy (PEx is not used to create main code). It enables a quick hardware setup and can also be use as a tool to learn about the peripherals and the usage of registers. PEx can be obtained either as a part of the Freescale’s CodeWarrior tool chain or it can be downloaded as a stand-alone application Processor Expert Driver Suite and used with other tool chains.

PEx is used to create the MQX Kinetis BSPs. In particular, the clock configurations used in the BSPs are generated by PEx.

For more information about how PEx can be used for the clock configuration of the BSP, see How-to Change Default Clock Settings in Kinetis BSPs (document MQXGSCLKBSP) located in: doc\tools\cw

\MQX_Howto_Setup_Kinetis_Clock_UsingPE.pdf.

In order to generate the driver and the initialization code for the MCU peripherals please check the attached document page 39. In the document the example is using CodeWarrior, however the process is the same for KDS.

Please let me know if this helps.


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

462 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Jan,

- It seems that there is no MQX_task  in PE component , only have mqx_lite_task., so i think when we use the MQX on PE,

it still need add task and other code by hand .

- And there is a tutorial for Processor Expert & MQX.  It’s included with the documentation installed with MQX. 

You can find it in this path: \Freescale\Freescale_MQX_4_2\doc\tools\cw\MQX_CW10_Getting_Started.pdf -> page 42 .

While this only the BSP use  the PE component , then the user's project  call the drivers from the BSP . So about the tasks or semaphores you mentioned ,

they are need add by hand , there is no the PE component about that .

Hope it helps

Alice

0 Kudos
Reply