How could I create a new MQX bsp/psp for K20DX512VLK100?

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

How could I create a new MQX bsp/psp for K20DX512VLK100?

Jump to solution
1,390 Views
VictorLorenzo
Contributor IV

Hi,

I need to include USB support to a custom board designed on the K20DX512VLK100 processor. I've installed CW MCU 10.4 + MQX 4.0.1.I tried just including one instance of SW\Software Components\USB_DEVICE_STACK from PE but PE did not compile, it complained about duplicated sections on the .pe file.

What are the steps I should follow for adding USB support to my application?

Thanks a lot in advance,

Victor

0 Kudos
1 Solution
628 Views
Martin_
NXP Employee
NXP Employee

ok, so as a Kinetis 100 MHz MCU, the baseline BSP to clone from initially would be twrk40d100m.

This BSP has usb stack support - I mean native MQX USB Device stack. Then you just need to disable features that your K20 100 MHz doesn't have.

Check this document, it may help to create your custom BSP:

https://community.freescale.com/docs/DOC-94248

and check also the init_bsp.c (_bsp_enable_card()) function, which is the basic function to initialize hardware for a board.

Then, once you can boot an MQX system and usb device example applications with your custom BSP, as there is no CCID device class support, you will need to create your custom device class driver. How to do this is desribed in MQX USB Device User's Guide, Chapter 4 Developing new Class Drivers.

You can also follow source codes in one of the existing class drivers, like for example follow CDC device for bulk endpoints and HID device for control and interrupt endpoints.

View solution in original post

0 Kudos
5 Replies
628 Views
Martin_
NXP Employee
NXP Employee

For creating custom BSP, the most crucial step is to select correct baseline BSP to clone from. The idea is to start with a BSP for a chip that is the most similar to the custom one. So, I searched Freescale web page for the K20DX512VLK100 part number, unfortunately, it seems such an orderable part does not exist. Could you please check the part number again ? Did you purchase the chip from Freescale or Freescale Authorized Distributor ?

For Kinetis chips with usb controller, there exist MQX native usb host and device stack, that works out of the box. No need to integrate the PE usb device stack, in my opinion.

0 Kudos
628 Views
VictorLorenzo
Contributor IV

Hi Martin,

Yes, you're absolutely right, the part number is wrong, sorry about that, it is MK20DN512VLK10.

2013-05-28 11.52.19.jpg

What I need to integrate is MQX and USB device stack, in this case I also need to implement the CCID USB class. Could you, please, tell us the steps to follow for this?

0 Kudos
629 Views
Martin_
NXP Employee
NXP Employee

ok, so as a Kinetis 100 MHz MCU, the baseline BSP to clone from initially would be twrk40d100m.

This BSP has usb stack support - I mean native MQX USB Device stack. Then you just need to disable features that your K20 100 MHz doesn't have.

Check this document, it may help to create your custom BSP:

https://community.freescale.com/docs/DOC-94248

and check also the init_bsp.c (_bsp_enable_card()) function, which is the basic function to initialize hardware for a board.

Then, once you can boot an MQX system and usb device example applications with your custom BSP, as there is no CCID device class support, you will need to create your custom device class driver. How to do this is desribed in MQX USB Device User's Guide, Chapter 4 Developing new Class Drivers.

You can also follow source codes in one of the existing class drivers, like for example follow CDC device for bulk endpoints and HID device for control and interrupt endpoints.

0 Kudos
628 Views
VictorLorenzo
Contributor IV

Hi Martin, thanks for your response.

I had too many things and projects on my desk and the initial project that originated this question was closed/discarded. But for one new project we're using the same MCU. I started using MQX Lite for getting most of the software ready for first mockup (in fact only the USB communication part is still missing) and... got to this same point once again.

I've installed CW 10.4+ MQX4.0.2 and cloned the TWRK40D100M BSP/PSP using the Cloning Wizard. I was able to import all bsp/psp projects into the workspace and compile them but something is not working properly regarding the new project wizard. The cloning wizard created two files under C:\Freescale\Freescale_MQX_4_0\tools\CodeWarriorNPW, one windows registry update file (.reg extension) and one wizard extension file (.xml extension). I copied the .xml file to C:\Freescale\CW MCU v10.4\MCU\lib\wizard_data\mqx\4.0\arm with the rest of the wizard extension files but the new board is not shown in the new MQX project wizard.

What are the steps for making the new bsp available in the new project wizard boards list?

0 Kudos
628 Views
VictorLorenzo
Contributor IV

Could some one help with this?

0 Kudos