CMSIS-DAP board for planned small form-factor KV3X projects

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

CMSIS-DAP board for planned small form-factor KV3X projects

Jump to solution
1,386 Views
mrcruz
Contributor I

cmsis-dap‌

Hello,

I am currently planning on making several projects based around the KV1/3/5 family parts, and was considering making smaller dev boards (similar to Teensy boards) such that I could embed the boards in the projects themselves while iterating through the prototyping process.

Because of this, I'm wondering how difficult it would be to isolate and create a small CMSIS-DAP board specific to my needs, but there seems to be a whole bunch of information with special conditions sprinkled about, so I figured I'd ask here.

My questions:

  1. From what I gather, I should simply be able to isolate the debug circuit from the FRDM-KV31F board, plop it onto its own board, and load firmware from this page, using a separate dedicated debugger. Is this correct? Would this work?
  2. The link to the source code points to this page, but the CMSIS-DAP project has now been moved and renamed to DAPLink. If I wanted to modify the source, would I use this project instead, targeting the K20DX?
  3. The appendices in this page demonstrate how to build the CMSIS-DAP application. This suggests that I need to build a specific version of CMSIS-DAP and load it to the interface chip (aka K20DX) for each target I may want to use. Is this correct? Or am I able to flash/debug any Kinetis MCU with this generic interface?
  4. If I wanted to use a different interface chip (in leiu of the K20DX), am I correct in that I should be good to use any of these chips? Are there any file size restrictions that I should be aware of when choosing a chip?
  5. Finally, does there already exist a suggested pinout if I want a single connector to connect an Interface Board (the K20DX) to a target, and have simultaneous UART comms, Debugging capability, and power show up at the Interface?

Thank you!

Cruz M.

Tags (2)
0 Kudos
1 Solution
846 Views
devanlai
Contributor I

I'm not particularly familiar with Kinetis parts (I'm more of an LPC guy), but I do know a bit about DAPLink from playing around with it, so I'll try to answer some of your questions.

1. From what I gather, I should simply be able to isolate the debug circuit from the FRDM-KV31F board, plop it onto its own board, and load firmware from this page, using a separate dedicated debugger. Is this correct? Would this work?

If you can find an appropriate bootloader firmware, then you should be able to load the normal firmware onto a board that's a copy of the debug circuit, sure.

2. The link to the source code points to this page, but the CMSIS-DAP project has now been moved and renamed to DAPLink. If I wanted to modify the source, would I use this project instead, targeting the K20DX?

You probably would want to work with the DAPLink project. In terms of features, it's a struct superset of the old CMSIS-DAP project. I think there may be some CMSIS-DAP targets that never got updated to work with the DAPLink firmware, but I haven't really looked into that.

3. The appendices in this page demonstrate how to build the CMSIS-DAP application. This suggests that I need to build a specific version of CMSIS-DAP and load it to the interface chip (aka K20DX) for each target I may want to use. Is this correct? Or am I able to flash/debug any Kinetis MCU with this generic interface?

For the drag'n'drop interface over mass storage, the flash algorithm is baked into each version of CMSIS-DAP/DAPLink firmware, so it will only be able to flash target MCUs that are compatible with the included flash algorithm. If you use the low level DAP interface through your IDE or openocd, you can flash any target that your software supports, regardless of what the drag'n'drop interface targets.

I don't see any existing support for KVxx target chips, but there's documentation on how to add support for new targets:
DAPLink/PORT_TARGET.md

I believe that they also have tools to extract flash algorithms from CMSIS-PACKs for use with DAPLink.

4. If I wanted to use a different interface chip (in leiu of the K20DX), am I correct in that I should be good to use any of these chips? Are there any file size restrictions that I should be aware of when choosing a chip?

No, the list you're looking at is a list of targets that DAPLink supports when flashing targets for drag'n'drop. This is the list you would want to look at - it's pretty short, though STM32F103 support is supposed to be landing soon.
DAPLink/records/hic_hal

If you want to port DAPLink to a new interface chip, it may or may not be too bad depending on how similar it is to one of the existing interface chips. I'm not a DAPLink developer, but off the top of my head, you probably want a chip that has at least 64K flash (preferably 128K - mass storage bootloaders are kind of big), 16K RAM, and support for a lot of USB endpoints (at least 7).

Finally, does there already exist a suggested pinout if I want a single connector to connect an Interface Board (the K20DX) to a target, and have simultaneous UART comms, Debugging capability, and power show up at the Interface?

If you find one, let me know :smileysilly:. If you're not using SWO, one common trick is to repurpose the SWO line in a regular 10-pin SWD cable for one UART line back to the debugger.

View solution in original post

0 Kudos
1 Reply
847 Views
devanlai
Contributor I

I'm not particularly familiar with Kinetis parts (I'm more of an LPC guy), but I do know a bit about DAPLink from playing around with it, so I'll try to answer some of your questions.

1. From what I gather, I should simply be able to isolate the debug circuit from the FRDM-KV31F board, plop it onto its own board, and load firmware from this page, using a separate dedicated debugger. Is this correct? Would this work?

If you can find an appropriate bootloader firmware, then you should be able to load the normal firmware onto a board that's a copy of the debug circuit, sure.

2. The link to the source code points to this page, but the CMSIS-DAP project has now been moved and renamed to DAPLink. If I wanted to modify the source, would I use this project instead, targeting the K20DX?

You probably would want to work with the DAPLink project. In terms of features, it's a struct superset of the old CMSIS-DAP project. I think there may be some CMSIS-DAP targets that never got updated to work with the DAPLink firmware, but I haven't really looked into that.

3. The appendices in this page demonstrate how to build the CMSIS-DAP application. This suggests that I need to build a specific version of CMSIS-DAP and load it to the interface chip (aka K20DX) for each target I may want to use. Is this correct? Or am I able to flash/debug any Kinetis MCU with this generic interface?

For the drag'n'drop interface over mass storage, the flash algorithm is baked into each version of CMSIS-DAP/DAPLink firmware, so it will only be able to flash target MCUs that are compatible with the included flash algorithm. If you use the low level DAP interface through your IDE or openocd, you can flash any target that your software supports, regardless of what the drag'n'drop interface targets.

I don't see any existing support for KVxx target chips, but there's documentation on how to add support for new targets:
DAPLink/PORT_TARGET.md

I believe that they also have tools to extract flash algorithms from CMSIS-PACKs for use with DAPLink.

4. If I wanted to use a different interface chip (in leiu of the K20DX), am I correct in that I should be good to use any of these chips? Are there any file size restrictions that I should be aware of when choosing a chip?

No, the list you're looking at is a list of targets that DAPLink supports when flashing targets for drag'n'drop. This is the list you would want to look at - it's pretty short, though STM32F103 support is supposed to be landing soon.
DAPLink/records/hic_hal

If you want to port DAPLink to a new interface chip, it may or may not be too bad depending on how similar it is to one of the existing interface chips. I'm not a DAPLink developer, but off the top of my head, you probably want a chip that has at least 64K flash (preferably 128K - mass storage bootloaders are kind of big), 16K RAM, and support for a lot of USB endpoints (at least 7).

Finally, does there already exist a suggested pinout if I want a single connector to connect an Interface Board (the K20DX) to a target, and have simultaneous UART comms, Debugging capability, and power show up at the Interface?

If you find one, let me know :smileysilly:. If you're not using SWO, one common trick is to repurpose the SWO line in a regular 10-pin SWD cable for one UART line back to the debugger.

0 Kudos