What is the best starting point to port MQX to an MK20FX512

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

What is the best starting point to port MQX to an MK20FX512

504 Views
joesark
Contributor I

I wanted to check with the rest of you guys what you thought would be the best starting point using the cloning tool to port to MK20FX512.  My thought was to use the K60F but I wanted to make sure. 

Thanks,

0 Kudos
2 Replies

331 Views
soledad
NXP Employee
NXP Employee


Hi Joe,


Below you can find some guidelines in order to clone a BSP.


1. Select a BSP and PSP that already exist. It is very important that you consider the factures and the core frequency; these should be very similar to the custom board. For example, if you want to create a BSP and PSP for a K20dx256z (100MHz) it is necessary to select the BSP and PSP for the twrk40x256 because the features and core frequency between both processors (k40 and k20) and the boards are very close.

2. Clone the select BSP and PSP, for do that, you need to refer to the Chapter 5 in the MQX User's Guide "Developing a New BSP" or consult the AN4287 application note, this application provide a guide to clone a BSP, you need to follow the SAME STEPS in order to clone the PSP. Another option is using the BSP Cloning Wizard tool to clone the libraries. (I suggest this option because it is very easy)

3. Another important thing is select an existing BSP for the same pin version.

For example TWR-K60N512 144 pin version. MK60DZ10.h header file

c:\Freescale\Freescale_MQX_4_0\mqx\source\psp\cortex_m\cpu\MK60DZ10.h

covers also MK60DN256ZVLL10 device, in terms of memory map.

4. Mapping of functions to pins is specified in the BSP source file init_gpio.c:

c:\Freescale\Freescale_MQX_4_0\mqx\source\bsp\${CLONE_BSP_NAME}\init_gpio.c


5. Less flash memory size is to be modified in the linker command file. The location of the linker file is at

c:\Freescale\Freescale_MQX_4_0\mqx\source\bsp\<platform>\cw\*.lcf.

In addition please check the below thread.

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

Regards :smileywink:

Soledad

0 Kudos

331 Views
joesark
Contributor I

So if our clock is 120 MHz it would make sent to use the K60f120 BSP as a starter?  We would need to use the MK20F12.h file. 

Once problem we are having is that we cannot get the MCGAutoTrim to be added by processor expert when our CPU is set to 20FX512VLQ12. 

0 Kudos