BSP cloning for MK20DN512VLK10

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

BSP cloning for MK20DN512VLK10

Jump to solution
1,420 Views
freuz
Contributor II

Hi,

I want to develop a project using MQX 4.0 and the Kinetis MK20DN512VLK10 on CW10.3 (without PE) but until the final hardware will be ready, I'm developping on the TWR-K60F120M eval board. To make the BSP for the official hardware, I use the BSPCloningWizard tool to clone the twrk60d100m BSP that I think is the closest BSP for my project. I successfully compile the twrk60d100m clone (bsp, psp and usbd), I modify my project link to clone BSP header files and libs and finally, I successfull compile the project with the new BSP clone.

But I have some questions:

  1. Knowing there was no BSP for the MK20DN512VLK10 from Freescale and knowing on the TWR-K60d100M (this board use the MK60DN512VMD10) descriptions on the Freescale web page (TWR-K60D100M Product Summary Page) there specify that supported K10_100, K20_100 and K60_100: Can I use directly the BSPCloningWizard result (with or without project minors modifications)?
  2. If I want an official MK20DN512VLK10 BSP, some source files modifications are needed for a real porting. What are rules to modify them and what are all these files? Example:
    • Create a new cpu definitions in the "psp_cpudef.h" Ex create "PSP_CPU_MK20D100M" definition for my cpu.
    • Create a cpu specific PSP cortex_m file definitions Ex create a "MK20D10.h" file for my cpu
    • Modify the "kinetis.h" to support the new cpu definition and cpu psp header file.
    • and ?
  3. I read the MQX user guide at chapter 5 and I think that I don't have all information for BSP porting.
  4. I read the Application Notes AN4287 and I found no answer because it is a manual operation description that BSPCloningWizard done and I already change header file and library links in my project. There was other documentation for BSP porting?

Anybody can help me?

Fred

0 Kudos
Reply
1 Solution
798 Views
Martin_
NXP Employee
NXP Employee

This might help:

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

you would use TWR-K60D100M as the baseline BSP to clone from. You say "I'm developing on TWR-K60F120M eval board" The startup of the processor is different. If you mean only some high level application code that you carry over to TWR-K60D100M it will work, (like for example our demo/examples use the same application level code for multiple different BSPs)

View solution in original post

0 Kudos
Reply
4 Replies
799 Views
Martin_
NXP Employee
NXP Employee

This might help:

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

you would use TWR-K60D100M as the baseline BSP to clone from. You say "I'm developing on TWR-K60F120M eval board" The startup of the processor is different. If you mean only some high level application code that you carry over to TWR-K60D100M it will work, (like for example our demo/examples use the same application level code for multiple different BSPs)

0 Kudos
Reply
798 Views
freuz
Contributor II

Hi Martin,

I successfully do BSP migration to MK20DN512VLK10 cpu from your documentation link (without this, I can't generate a right BSP). Just one question: even if I do not use PE, how about the "ProccessorExpert.pe" file in the ".\mqx\build\cw10\myBoard" path? Where I can find the right one or generate one for the right cpu (MK20DN512VLK10)?

Frédéric

0 Kudos
Reply
798 Views
Martin_
NXP Employee
NXP Employee

Hi Frédéric,

If you don't ever plan to use PE for the BSP, just delete the .pe file from the new BSP.

If you wish to add it, it might be more difficult. As far as I know it doesn't allow to just open the PE file and change the processor type from K60 to K20 at the moment. Therefore, I would suggest to delete the original .pe file, then use CodeWarrior menu to add PE support for an existing C project (select the BSP project and File->New->Other... then under Processor Expert select "Enable Processor Expert for Existing C Project"). Then, the PE in the BSP project should be configured to not generate "main" function (as there already is one main() function in the BSP) and I would recommend to disable "Generate Processor Expert code before build"). If you wish to use PE to generate code for the BSP, it needs be configured to generate code for the clock module (see /doc/tools/cw/Howto_SetupKinetisClock_UsingPE.pdf).

0 Kudos
Reply
798 Views
freuz
Contributor II

Hi Martin,

Thanks for your reply, this is a very useful documentation link: I will made change shortly.

Yes I'm developping on the TWR-K60F120M eval board because it was the first available at time to buy. But the final cpu will be the MK20DN512 and I think the twrk60d100m is the closest BSP for this cpu. My project contains an HAL/BSP layer that can be use on some other cpu in the future.

Frédéric

0 Kudos
Reply