How can I run MQX USB demo on FRDM-K22F?

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

How can I run MQX USB demo on FRDM-K22F?

Jump to solution
1,806 Views
davepfaltzgraff
Senior Contributor I

I have downloaded various packages and keep running into dead ends. For example, in trying to get a USB host msd compile:

Freescale_MQX_4_1_FRDMK22F120M does not provide a  kds project. This is supported by the fact that the document MQXGSRTOS "Getting Started with Freescale MQX™ RTOS" does not mention the KSD tool.

MQX_KSDK_1.0.0 provides a kds project, but header files cannot be found. This appears to be a problem with path definitions, but after an hour of trying to track these down one by one, I gave up!

To add to the confusion, document USBKSDKUG "Integration of the USB Stack and Kinetis SDK" shows the FRDM-K22F board upside down and backwards! (see the picture on page 5)

I would like to be able to load, compile and, test USB host capabilities on the FRDM-K22F board and not get a headache in the process. Some gentle pointers would be very welcome.

Thanks

Labels (1)
0 Kudos
1 Solution
1,015 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi David,

KSDK1.1 is coming soon (before the end of the year), his stack has an USB Host MSD example for KDS2.0 which is already available at www.freescale.com/kds, I recommend to wait for the release. The path where you will find this example should look something like this:

C:\Freescale\KSDK_1.1.0\usb\example\host\msd\msd_fatfs\sdk\kds\host_msd_fatfs_frdmk22f_mqx

To run the demo you will need to build the following libraries for K22F:

KSDK Platform Lib

C:\Freescale\KSDK_1.1.0\lib\ksdk_platform_lib\kds\K22F51212

KSDK OSA for MQX Lib

C:\Freescale\KSDK_1.1.0\lib\ksdk_mqx_lib\kds\K22F51212

MQX Lib

C:\Freescale\KSDK_1.1.0\rtos\mqx\mqx\build\kds\mqx_frdmk22f

MQX stdlib

C:\Freescale\KSDK_1.1.0\rtos\mqx\mqx_stdlib\build\kds\mqx_stdlib_frdmk22f

MQX Shell Lib

C:\Freescale\KSDK_1.1.0\rtos\mqx\nshell\build\kds\nshell_frdmk22f

USB Host Lib

C:\Freescale\KSDK_1.1.0\usb\usb_core\host\build\kds\usbh_sdk_frdmk22f_mqx

You can import the library projects using the option in menu File > Import > General > Existing Project into Workspace

You can also import the 3 MQX Libs using the build_libs.wsd file with the option menu File > Import > Project of Projects > Existing project Sets. This working set is located in the following path:

C:\Freescale\KSDK_1.1.0\rtos\mqx\build\kds\workspace_frdmk22f

Bet regards,

Carlos

Technical Support Engineer

View solution in original post

0 Kudos
4 Replies
1,016 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi David,

KSDK1.1 is coming soon (before the end of the year), his stack has an USB Host MSD example for KDS2.0 which is already available at www.freescale.com/kds, I recommend to wait for the release. The path where you will find this example should look something like this:

C:\Freescale\KSDK_1.1.0\usb\example\host\msd\msd_fatfs\sdk\kds\host_msd_fatfs_frdmk22f_mqx

To run the demo you will need to build the following libraries for K22F:

KSDK Platform Lib

C:\Freescale\KSDK_1.1.0\lib\ksdk_platform_lib\kds\K22F51212

KSDK OSA for MQX Lib

C:\Freescale\KSDK_1.1.0\lib\ksdk_mqx_lib\kds\K22F51212

MQX Lib

C:\Freescale\KSDK_1.1.0\rtos\mqx\mqx\build\kds\mqx_frdmk22f

MQX stdlib

C:\Freescale\KSDK_1.1.0\rtos\mqx\mqx_stdlib\build\kds\mqx_stdlib_frdmk22f

MQX Shell Lib

C:\Freescale\KSDK_1.1.0\rtos\mqx\nshell\build\kds\nshell_frdmk22f

USB Host Lib

C:\Freescale\KSDK_1.1.0\usb\usb_core\host\build\kds\usbh_sdk_frdmk22f_mqx

You can import the library projects using the option in menu File > Import > General > Existing Project into Workspace

You can also import the 3 MQX Libs using the build_libs.wsd file with the option menu File > Import > Project of Projects > Existing project Sets. This working set is located in the following path:

C:\Freescale\KSDK_1.1.0\rtos\mqx\build\kds\workspace_frdmk22f

Bet regards,

Carlos

Technical Support Engineer

0 Kudos
1,015 Views
davepfaltzgraff
Senior Contributor I

Hi Carlos,

Since we're already into the second week of the last month of 4Q14, I think I'll wait.

One comment: I hope that the information on which libraries and modules are associated (required) for each application are listed. A lot of my frustration was in finding out what was needed to make a complete package.

The details you gave are a big help and I look forward to the next release.

Thanks

0 Kudos
1,014 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello David:

I do not have MQX_KSDK_1.0.0 installed, I suppose you mean the BETA version, right?

However I have KSDK v1.0.0 and the FRDM-K22F USB examples in KDS v2.0 are working fine, I tested CDC and HID host. Maybe you can try with the baremetal USB examples (no MQX); I think you should have those in your installation too. Later you can move to MQX integration. Besides a new release of KSDK v1.1.0 is coming this month and MQX_KSDK will not be in a separate installation package anymore. For details check the next links:

- KDS 1.1.1 and MQX

- Kinetis SDK FAQ (RTOS section)

These were my steps (the same as in the document "Integration of the USB Stack and Kinetis SDK"):


For CDC:

1) Import and build ksdk_platform_lib_K22F51212.

2) Import and build usbd_sdk_frdmk22f120m_bm_frdmk22f120m.

3) Import and build project dev_cdc_virtual_com_frdmk22f120m_bm_frdmk22f120m.

4) Run the debug session for the cdc projet. It worked ok.

For HID Host:

1) K22 KSDK platform library is already compiled.

2) Import and build usbh_sdk_frdmk22f120m_bm_frdmk22f120m.

3) Import and build project host_hid_mouse_frdmk22f120m_bm_frdmk22f120m.

4) Place jumper J22. This is necessary for host mode.

5) Run the debug session for the hid host project. It worked fine.


Regards!,
Jorge Gonzalez

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

1,015 Views
davepfaltzgraff
Senior Contributor I

Hi Jorge,

I had been able to get the bare metal version to compile and run. Mostly by blindly following the example (step 5.3 in the Integration document). In doing that I was able to work out what the full names may be for the FRDM-K22F.

It appears that the step I missed at the beginning was to go through the custom install and get the MQX portion.

Thanks.

0 Kudos