This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

CMSIS DAP build for Ble Nano MK20D Board

I want to use the CMSIS-DAP provided here github.com/.../CMSIS-DAP with the ble nano MK20D board. I don't need to make any changes to the bootloader. Just the firmware that reads the hex and flashes it to the NRF51822 and the pin assignments. Is there any tutorial or guide about which are the appropriate files and how to build them (using free tools preferably)

Thank you

  • Hello.

    As you can see on the bottom of the BLE nano product page., the MK20 board has an on board Freescale MK20DX128VFM5. In the github repo you posted, we find support for exactly this chip in "/bootloader/hal".

    It is likely that this actually is the firmware running on the MK20D. If you want to program the MK20D, you must have access to the programming pins of the MK20DX128VFM5 chip. You must ask Readbearlabs to provide this for you, or you can just analyze the PCB and compare with the MK20DX128VFM5 data sheet.

    Since the MK20D already support CMSIS-DAP (As far as i can see), why do you want to program it again? Can you explain a bit about what you want to achieve?

    -Anders

  • Well there is this question i had devzone.nordicsemi.com/.../ . Apparently there is some kind of incompatibility between the hex format from arm-gcc and ble nano which most of the time is being fixed by mergehex. In order to fix that there are two possible ways I can think of.

    1. Rebulid the arm gcc library with some changes in the source code which i found too compilcated or 2)Rebuild a CMSIS-DAP driver for the chip to accept the arm-gcc ihex format.

    I can find out which pins are used for programing from the schematic so that would be no problem. I have several questions concerning the structure of the sources found in git hub and the tools to build it.

    1)There are many project files compatible with MDK and uVision. Which one should I use for my purpose? I thought that the project that i needed was in the interface folder. 2)Which one is the source file which reads the hex file? 3)I have tried building the interface project with MDK Lite 5 and got several erros about git version and multiple errors like the following .\Obj\k20dx128_kl25z_if\k20dx128_kl25z_if.axf: Error: L6406E: No space in execution regions with .ANY selector matching usbd_msc.o(.data).

  • There is a stand alone CMSIS-DAP Debug J-Tag here. It comes with utility to parallel program nRF5x. Can flash Softdevice & DFU as well

  • Hi Panos, Unfortunately, the different projects in the CMSIS-DAP repo has been developed and are somewhat depending on the version of uVision you are using. I would expect you should use the interface/mdk/k20dx128/k20dx128_interface.uvproj for developing for your board. I tried this with my uVision setup: v5.17.0.0, which is the one used to build the ATSAM3U2C firmware that is used on our development boards, and I got a lot of warnings/errors. What i would do is try to use an older version of uVision and see if the errors goes away, or fix all the errors you get when compiling with your version.

    1. in the ATSAM3U2C, the file handling the hex parsing is usbd_user_msc.c, in interface/Common/src. programPage(), programHEXpage()
    1. The git version error is because you have not run the tools/pre_build_script.py. You need to link your project to this file. The other warnings seems to be because there is not enough space on the device. I see that if i check out a previous commit of the repo (from 10.06.2014), the project compiles fine. But with all the newer changes, it does not work. So perhaps you could work from the commit that is working, and add your changes?
Related