Custom BSP for MK20DN512

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

Custom BSP for MK20DN512

跳至解决方案
4,022 次查看
miniwang
Contributor III

I would like to creat a custom BSP for my board.

I refer to the "MQX Board Support Package Porting Guide" (Document Number: AN4287 ; Rev. 0, 06/2011 ).

The MCU of custom board is MK20DN512, and the custom BSP is cloned copy from "twrk20d72m".

My environment is [MQX3.8.1] & [CW10.2], it's seems some different from the document.

for example: 

  1. the content of CUSTOM_BOARD_bsp_mcf52259.bat. is different from my bat file. (Figure 32)

  2. couldn't find and add boot.c to project setting. (Figure38)

  3. the User Recursive Path(-ir) is empty (Figure 40)

Is it another document for MQX3.8.1?

Where can I find more information to create new BSP?

Thank you in advance.

Mini


标记 (1)
0 项奖励
回复
1 解答
2,058 次查看
Martin_
NXP Employee
NXP Employee

To make a direct clone of an existing board in MQX 3.8.1 (same MQX source code, different board name), for myself I found convenient using Find & Replace method in the CodeWarrior 10.x project files (they are text files, with .cproject and .project extensions).

This clone can be added to CodeWarrior 10.2 New Project wizard for MQX 3.8.1 as a new board, which would allow you to use the wizard to create MQX 3.8.1 new applications (based on standard example, or with initialization code only) for the new board.

Attached is a document that guides through this process.

在原帖中查看解决方案

0 项奖励
回复
10 回复数
2,059 次查看
Martin_
NXP Employee
NXP Employee

To make a direct clone of an existing board in MQX 3.8.1 (same MQX source code, different board name), for myself I found convenient using Find & Replace method in the CodeWarrior 10.x project files (they are text files, with .cproject and .project extensions).

This clone can be added to CodeWarrior 10.2 New Project wizard for MQX 3.8.1 as a new board, which would allow you to use the wizard to create MQX 3.8.1 new applications (based on standard example, or with initialization code only) for the new board.

Attached is a document that guides through this process.

0 项奖励
回复
2,058 次查看
miniwang
Contributor III

I have succeeded in create new BSP for my custom board.

but there is a waring message when I new a project use custom BSP.

"Launch configuration is a migration candidate"

I try to use "Quick Fix", but it's fail. (please refer the attached image)

the MCU of custom board is MK20DN512, and the custom BSP is cloned copy from "twrk20d72m".

launch error.JPG

I have tried to replace the "K20DX256M7" to "K20DN512V10" or "K20DN512V", of course, it doesn't work.

how can I fix this problem? or what system name should I use?

thank you in advance.

Mini

0 项奖励
回复
2,058 次查看
Martin_
NXP Employee
NXP Employee

I suspect the "c:\Freescale\CW MCU v10.2\MCU\lib\wizard_data\mqx\3.8\mqx_TWRK20D72M.xml" is not cloned properly to the new board. I think you should change only the board name and board ID (not the processor type) in the xml file. Try using your clone on the original TWRK20D72 board and let it work (try loading some simple application to the TWRK20D72 board and debug).

Once this basic clone is working, you can start making changes to the processor type in debugger configuration and connect the debugger to your custom board.

2,058 次查看
miniwang
Contributor III

Hi Martin,

Thanks for your suggestion. I have checked my xml file. It's followed the document you provide, only change the board name and board ID. And I have tried to use the original one to build a project, but it seems have the same issue. so that I think it might be something wrong with the original one(twrk20d72m). (Does anyone have the same problem?)

I'm trying to install CW10.2 and MQX3.8.1 on other pure OS again. hope can solve the problem.

thanks for your help.

Mini

0 项奖励
回复
2,058 次查看
cavebiker
Contributor V

Hi Martin,

Thanks for the doc (New BSP MQX 3.8.1)

I followed this doc twice, attempting to clone the twrk60n512 BSP, I called it 880bd61fn1m.

All went well until I tried to create a new 'MQX 3.8 project'. When I select my new 'board to be used', the 880bd61fn1m Board, I got the error --> !!! ERROR: MQX is NOT installed for selected board !!!

Any ideas? Does it maybe not like my new name?

Thanks much in advance,
Tom

Note: one problem I had following the 'New BSP MQX 3.8.1' doc, on the bottom of page 11 I'm instructed to modify the file ".ProcessorExpert.g_c" but that file does not exist.

0 项奖励
回复
2,058 次查看
Martin_
NXP Employee
NXP Employee

I created a clone of "twrk60n512" with name "880bd61fn1m".

In the New Project Wizard folder, I renamed also the xml file to this:

"c:\Freescale\CW MCU v10.2\MCU\lib\wizard_data\mqx\3.8\mqx_my880bd61fn1m.xml"

notice the "my" in the file name, as it seems the New Project Wizard doesn't see a file with the name "mqx_880bd61fn1m.xml".

I attached the file - it works with the new name on my computer. Please compare with your file and let me know if there is any difference ?

Thanks for the comment about the .g_c file. I will add a note to my document that this step is to be done only if the file exists in the bsp folder.

0 项奖励
回复
2,058 次查看
cavebiker
Contributor V

Thanks a ton for the help, that got me past that.

Now I am having a problem when I attempt to launch the code 'Hello2' to the K60 tower using my cloned BSP. I am getting a launching error "Failed to resume target process., Could not open memory configuration file"

I have no problems when I build hello2 against the standard 'TWRK60n512 Board'

Any ideas?

Thanks in advance,

Tom

0 项奖励
回复
2,058 次查看
Martin_
NXP Employee
NXP Employee

Hi Tom,

seems I overlooked this: in the debug configuration->connection->target, there are paths for the CW debugger to look for *.tcl (device initialization) and *.mem (memory map file). In the BSP clone, it is as below:

${MQX_ROOT_DIR}/lib/880bd61fn1m.cw10/bsp/dbg/init_kinetis.tcl

${MQX_ROOT_DIR}/lib/880bd61fn1m.cw10/bsp/dbg/880bd61fn1m.mem

we can see the debugger is searching for the file in the MQX installation directory

/lib/880bd61fn1m.cw10/bsp/dbg/880bd61fn1m.mem

so just rename the file /lib/880bd61fn1m.cw10/bsp/dbg/twrk60n512.mem to /lib/880bd61fn1m.cw10/bsp/dbg/880bd61fn1m.mem

I forgot to mention this file in the document.

0 项奖励
回复
2,058 次查看
cavebiker
Contributor V

Rock'en!

Thanks a ton Martin, that did it.

0 项奖励
回复
2,058 次查看
miniwang
Contributor III

Martin, Thanks a lot !!! :smileylaugh:

I'll follow your document and try to create a new BSP.

0 项奖励
回复