AnsweredAssumed Answered

After BSP cloning: What should I do for configuring the mem mapping and linker files?

Question asked by VictorLorenzo on Sep 15, 2013
Latest reply on Apr 9, 2015 by VictorLorenzo

Hi,

I've just created one BSP clone using the MQX BSP Cloning Wizard for one custom MK20DN512VLK10 based board. As base BSP for cloning I used the twrk40d100m BSP which is prepared for supporting one MK40DX256VMD10.

 

My questions are:

-----------------------------------

The derivative included in the twrk40d100m BSP does not reference the same pinout as the derivative in our board. In this case I removed the original CPU component from the PE and added+configured a new MK20 one.

 

a) Is there any other way to proceed other than what I did?

-----------------------------------

The original cpu included more than one clock configurations and the BSP initialization included code for oscillators auto-trimming with calls to _bsp_set_clock_configuration(BSP_CLOCK_CONFIGURATION_AUTOTRIM) and _bsp_osc_autotrim(). I removed/commented out the code as I included only one clock configuration.

 

b) Is that auto-trimming support necessary? What for?

-----------------------------------

As the MK40 cpu is a superset of the MK20 cpu, the twrk40d100m BSP included code for initializing the LCD and the appropiate memory map and linking files. The steps I made after cloning were:

1) removed the references to the LCD initialization code (they were external links, virtual path)

2) updated the user_config.h, psp_cpudef.h and kinetis.h files to include the new CPU (MK20DN512VLK10)

3) replaced the reference to MK40D10.h by MK20D10.h in the cloned PSP project.

 

c) As both CPU's are also different in memory configuration, what should I do for configuring correctly the BSP/PSP linker and memory map files?

 

Thanks a lot in advance, Victor

p.d. Prematurely pressed the ^S keyboard shortcut and it seems that it made the post visible before I finished writing.

p.d. Using CW 10.4 + MQX 4.0.2 + USBStack 4.0.3

Outcomes