[Zephyr-devel] NXP FRDM-K64F and OpenOCD from 0.9.0 SDK issue

Piotr Król piotr.krol at 3mdeb.com
Sat Mar 18 16:03:58 UTC 2017


Hi all,
I'm not sure why, but OpenOCD from SDK can't flash and debug my K64F:

```
[16:51:40] pietrushnic:hello_world git:(master*) $ make BOARD=frdm_k64f 
flash
make[1]: Entering directory 
'/home/pietrushnic/storage/wdc/projects/2017/acme/src/zephyr'
make[2]: Entering directory 
'/home/pietrushnic/storage/wdc/projects/2017/acme/src/zephyr/samples/hello_world/outdir/frdm_k64f'
   Using /home/pietrushnic/storage/wdc/projects/2017/acme/src/zephyr as 
source for kernel
   GEN     ./Makefile
   CHK     include/generated/version.h
   CHK     misc/generated/configs.c
   CHK     include/generated/generated_dts_board.h
   CHK     include/generated/offsets.h 

make[3]: 'isr_tables.o' is up to date. 

Flashing frdm_k64f
Flashing Target Device
Open On-Chip Debugger 0.9.0-dirty (2017-01-08-19:49)
Licensed under GNU GPL v2
For bug reports, read
         http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
Info : add flash_bank kinetis k60.flash
adapter speed: 1000 kHz
none separate
cortex_m reset_config sysresetreq
Error: unable to find CMSIS-DAP device

Done flashing
```

I compiled OpenOCD from master and with that version flashing and 
debugging works:

```
[16:51:46] pietrushnic:hello_world git:(master*) $ 
OPENOCD=/usr/local/bin/openocd make BOARD=frdm_k64f flash
make[1]: Entering directory 
'/home/pietrushnic/storage/wdc/projects/2017/acme/src/zephyr'
make[2]: Entering directory 
'/home/pietrushnic/storage/wdc/projects/2017/acme/src/zephyr/samples/hello_world/outdir/frdm_k64f'
   Using /home/pietrushnic/storage/wdc/projects/2017/acme/src/zephyr as 
source for kernel
   GEN     ./Makefile
   CHK     include/generated/version.h
   CHK     misc/generated/configs.c
   CHK     include/generated/generated_dts_board.h
   CHK     include/generated/offsets.h
make[3]: 'isr_tables.o' is up to date.
Flashing frdm_k64f
Flashing Target Device
Open On-Chip Debugger 0.10.0+dev-00093-g6b2acc0243f6 (2017-03-18-15:52)
Licensed under GNU GPL v2
For bug reports, read
         http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To 
override use 'transport select <transport>'.
Info : add flash_bank kinetis k60.flash
adapter speed: 1000 kHz
none separate
cortex_m reset_config sysresetreq
Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 1.0
Info : SWCLK/TCK = 0 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : k60.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : MDM: Chip is unsecured. Continuing.
     TargetName         Type       Endian TapName            State
--  ------------------ ---------- ------ ------------------ ------------
  0* k60.cpu            cortex_m   little k60.cpu            running
Info : MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00001a28 msp: 0x20000640
auto erase enabled
Info : Probing flash info for bank 0
Warn : Flash Configuration Field written.
Warn : Reset or power off the device to make settings effective.
wrote 12288 bytes from file 
/home/pietrushnic/storage/wdc/projects/2017/acme/src/zephyr/samples/hello_world/outdir/frdm_k64f/zephyr.bin 
in 0.995954s (12.049 KiB/s)
Info : MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00001a28 msp: 0x20000640
Error: timed out while waiting for target halted
target halted due to debug-request, current mode: Thread
xPSR: 0x41000000 pc: 0x000018f8 psp: 0x20000730
Error: error executing cortex_m crc algorithm
verified 10520 bytes in 20.876684s (0.492 KiB/s)
Info : MDM: Chip is unsecured. Continuing.
shutdown command invoked
Done flashing
make[2]: Leaving directory 
'/home/pietrushnic/storage/wdc/projects/2017/acme/src/zephyr/samples/hello_world/outdir/frdm_k64f'
make[1]: Leaving directory 
'/home/pietrushnic/storage/wdc/projects/2017/acme/src/zephyr'
```

The only thing I'm worry about is `error executing cortex_m crc 
algorithm` any idea what maybe wrong ?

Is there any way to fix `unable to find CMSIS-DAP device` in SDK OpenOCD ?

Best Regards,
-- 
Piotr Król
Embedded Systems Consultant
http://3mdeb.com | @3mdeb_com


More information about the Zephyr-devel mailing list