Trouble flashing mk20dx128vlf5 with openocd

Showing results for 
Search instead for 
Did you mean: 

Trouble flashing mk20dx128vlf5 with openocd

Contributor I

I am trying to flash a mk20dx128vlf5 with OpenOCD 9.0 rc1and a Jlink.

I'm struggling to get a good debugging setup. I have the following as my openocd.cfg:

source [find interface/jlink.cfg]
# Freescale Kinetis K20 device. Should be compatible with K40,
# just set a custom name.
set CHIPNAME k20
source [find target/k40.cfg]

adapter_khz 1000
reset_config srst_only

# Scratch RAM for verify
# XXX: This verify method is broken due to a problem with reset?
k20.cpu configure -work-area-phys 0x1FFFE000 -work-area-size 16384

# One 128K flash bank
flash bank pflash.0 kinetis 0x00000000 0x20000 0 4 $_TARGETNAME

Trying to flash with `/usr/local/bin/openocd -f ./openocd.cfg -c "program app-image.hex reset"`
results in /openocd.cfg:29: Error: invalid command name "k20.cpu"

Doe anyone know how to fix this issue or have another solution for flashing this mcu from Linux?


0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

Dear Chris,

I will suggest to use to install MCUXpresso, there you can find a GUI to flash your MCU.

pastedImage_1.pngThere you can find a window like the next one that will help you to flash the MCU.


I hope this helps you.

Best Regards,

Alexis Andalon

0 Kudos