A general SWD interface based upon K20

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

A general SWD interface based upon K20

2,157 Views
kai_liu
Senior Contributor I

PS: If anyone thinks this discussion is against interests of FSL, please let me know, I will remove the thread, anyway.

FRDM offers a unique approach to reuse its USB interface with different appliation firmware as programmer, debugger and UART bridge. Although FRDM's K20 is close source, it is not very difficult to reuse the off-the-shelf firmware to make FRDM as a general SWD interface based upon K20D50.

After reading blogs from mcuoneclipse.com, I found it is possible to design a standalone SWD interface based upon K20 micro. The hardware design comes from FRDM boards, the application firmware is ready. We just need a USB MSD bootloader, which has been offered by Freescale. I have checked the firmware, most of them starts from 32KB, which means the first 32KB is reserved for bootloader.

I know PEmicro, JLINK lite are protected to support same micro with target one. But CMSIS-DAP is almost designed for open source.

I have not evalueted all the firmware packages from PEmicro, Keil, mBed, Freescale, OSBDM, OSjtag. However I have successfully programmed off-chip microcontrollers (including FSL and non-FSL micro) with CMSIS-DAP firmware in Keil.

But I do find error reports why I try to debug micro with CMSIS-DAP firmware.

I would like to ask questions to whom have FRDM-K20D50M at hand.

Has anyone ever tried to download these firmware to use K20D50M as a SWD programmer? Since OpenSDA K20 and target K20 are using different package. I would like to use QFP48 packge, instead of QFN and QFP80 to support easy soldering.

I would like to open the design and when I finish evaluting all these questions.

UPDATE:

Currently I am trying to evalue all kinds of bootloaders for this projects, since there is no off-the-shelf solution from FSL. McHack's DFU bootloader may work, and I am going to port AN4379 to K20 as well.

Allan K Liu

Labels (1)
Tags (2)
0 Kudos
5 Replies

813 Views
kai_liu
Senior Contributor I

OpenSDA is not OPEN SOURCE, but it is open for reusing hardware and reloading user applications. PEmicro protects OpenSDA bootloader and SDA file format. So does Segger.

However, we have following open source firmware packages.

  • MSD bootloader from FSL and other open source projects. (Many people are working on it, DFU/MSD/CDC...)
  • open source debugger firmware from Keil/mBed
  • open source debugger firmware from OSBDM/Kinetis

However, OpenSDA hardware only supports SWD. In order to make it suitable for JTAG and other protocol like EZP. We have to design a dedicated clone OpenSDA hardware with additional buffers.

0 Kudos

813 Views
c0170
Senior Contributor III

Hello Kai Liu,

I added a bootloader for K20 to CMSIS-DAP Embedded Stuff Around The Web: CMSIS-DAP bootloader for K20 interface (news). I would evaluate this as alpha version at the moment.

I personally haven't tested using K20D50M board as SWD programmer, but I believe it should work.

Can you comment more:

"But I do find error reports why I try to debug micro with CMSIS-DAP firmware."

Regards,

0xc0170

813 Views
kai_liu
Senior Contributor I

Hi, Martin,

I found your project hosted in github.com. K20 interface - bootloader by 0xc0170 · Pull Request #14 · mbedmicro/CMSIS-DAP · GitHub Keil is used to develop the project. I will download and try to build it in 32KB evaluation version of Keil.

I can test it on K20D50M's target MCU since I got one last night.

Yours sincerely

Allan K Liu

0 Kudos

813 Views
kai_liu
Senior Contributor I

After searching, I found you have contributed many open source projects in mbed and github. Thanks.

Currently I have a new FRDM-K20D50M at hand, and trying to evaluate MSD bootloader on it. Obviously FSL's solution has not been verified on IAR, since it has not intergrated FTFL driver at all.

Once I verified it, I will go on to evaluate all kinds of applications (CMSIS-DAP/PEmicro/JLINK lite/mBed intf/OSJTAG) .

0 Kudos

811 Views
kai_liu
Senior Contributor I

Explanations for "I do find error reports why I try to debug micro with CMSIS-DAP firmware."


I have wired out OpenSDA of FRDM-KL25Z to debug another Cortex-M0 MCU (LPC812 from NXP). I load CMSIS-DAP firmware as debugger. The debugger can be detected in Keil uVision 4, flash programming successfully. But Keil reports "****.dll error" or similar information and refuse to debug with OpenSDA and CMSIS-DAP. But Keil works fine with on board CMSIS-DAP from NXP/mBed LPC812MAX.


So CMSIS-DAP firmware of FRDM OpenSDA can be used to programming any Cortex-M0 MCU, but it has limitation for debug.


I can not access Embedded Stuff Around The Web: CMSIS-DAP bootloader for K20 interface (news) smoothly since it is blocked in China. Can you do me a favor to tell me where is the source? Additionally I saw some disucssion for K20 bootloader's issue here.Problems implementing USB MSD bootloader on K20


I have revised USB MSD bootloader for KL25Z, it takes me about one week to do that. However, I do hope FSL team can release a fully tested one.


I have ordered one FRDM-K20D50M. Hope it works well.

0 Kudos