Hi , I am Subrat. (Issue in BSP Porting for MQX RTOS)I am using Codewarrior 10.6 for my SW development on MQX RTOS For K60 MCU.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Hi , I am Subrat. (Issue in BSP Porting for MQX RTOS)I am using Codewarrior 10.6 for my SW development on MQX RTOS For K60 MCU.

869 次查看
subratbiswal
Contributor I

I am following the MQX_BSP_Porting_Guide.pdf for the BSP,PSP and RTCS porting of the K60DX256VLL10 from the K60D100M BSP Evaluation board.

I am using the MK60DX256VLL10 as my processor and using eth-to-serial example as a reference code.

I am finding it very difficult to port the MCU.

I am following steps as defined in MQX_BSP_Porting_Guide.pdf:      

  1. 1)      Clone BSP – makes a copy of a provided BSP with a new name which is later modified : I was able to do this steps and use the BSP Cloning Wizard.

  1. 2) Add PEx to the BSP project – only needed if using PEx with IAR Embedded Workbench® or MDK-ARM Keil™ tool chain : Not required as I am using CW10.6.

  1. 3) Change the PEx CPU Component/Package – optional step if using PEx in the BSP. : I am using PEx and added the my desired CPU i.e. MK60DX256VLL10. While selecting the toolchain I am selecting the GNU C Complier instead of "Legacy CodeWarrior ARM C Compiler" if I am selecting Legacy CodeWarrior ARM C Compiler I am getting the error as :

          “Incorrect tool chain selected in project setting: Please change your project setting to use 'ARM Toolchain' or change the selected Compiler.”

  1. 4)      Changing the MCU derivative in MQX projects : I have kept #define MQX_CPU PSP_CPU_MK60D100M as I have to use MK60D10.h only.

MK60D10.h is the header file supporting both the controllers MK60DX256VLL10 and MK60DN512VLL10(as in eval board).

  1. 5) Modify clock configuration. I want to use only internal clock only. (in actual Hardware I am using External Crystal of 20MHz. In eval board there is external oscillator of 50MHz).I have also checked the code with an example code using only Processor expert for the working of the external crystal.it is working fine.
  2. Need help in bellow steps as I have not changed anything till now.
  3. 6) Modify BSP source/include files and user_config.h.
  4. 7) Modify derivative-specific driver files.
  5. 8) Add/remove driver source files in BSP project.
  6. 9) Modify BSP Memory map and linker file.
  7. 10) Modify post-link batch files.
  8. 11) Change CodeWarrior debugger memory file – optional if using CodeWarrior and dependent on the derivative.
  9. 12)   Port example applications to a new BSP – optional for testing the new BSP. I have imported the eth-to-serial project example created by using the BSP Cloning Wizard.

0 项奖励
回复
1 回复

654 次查看
soledad
NXP Employee
NXP Employee

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 thingh 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.

6. If customer has a different configuration he needs to change the BSP. Attached to this mail, you can find a document that explains how to change the default clock configurations.

In addition please check the below thread in our community web, it may helps,

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

NOTE: Freescale provides MQX support for free on Freescale EVB only. The customer has the option to purchase Level 2 MQX support, either Standard or Premium. These support programs cover also migration to customer specific hardware.

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MQX_SUPPORT

I hope this helps,

Have a nice day!!

0 项奖励
回复