What is the NXP recommended way to unlock and flash a K20 in Linux with jlink

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

What is the NXP recommended way to unlock and flash a K20 in Linux with jlink

ソリューションへジャンプ
1,444件の閲覧回数
chris_seto
Contributor I

I'm trying to simply mass erase and load code on my Kinetis mk20dx128vlf5. I'm trying to use OpenOCD and Jlink in Linux, but it seems like there is no real support for the k20, and I'm still having issues with trying to mass erase the chip. 

What is the NXP recommended way to mass erase and program the chip in Linux? I don't care about this chip's "security features" or the entire "secured state" mess. All I want to do is erase what's currently on the chip and flash new content. I don't understand why someone would ever design a microcontroller to work this way. It seems remarkably counter productive for 95% of use cases.

ラベル(1)
0 件の賞賛
1 解決策
1,303件の閲覧回数
BlackNight
NXP Employee
NXP Employee

The standard way would be to use the MCUXpresso IDE and use the GUI Flash tool to erase, program and recover the device if needed.

pastedImage_1.png

But this basically requires the that device is supported by the NXP MCUXpresso SDK, and the 50 MHz K20DX128 is not.

The legacy devices are supported with the NXP Kinetis Design Studio V3.2.0. In KDS you have the 'Flash from File' functionality:

pastedImage_2.png

which you can use to program a file to the target.

OpenOCD does not support the Kinetis devices well, so I recommend you go with the LinkServer (LPC-Link2, but this is not supported in KDS), or with a P&E or SEGGER debug probe (which you already have).

If you want to do things on the command line, I wrote a few tutorials on this:

Command Line Programming and Debugging with GDB | MCU on Eclipse 

Tutorial: MCUXpresso SDK with Linux, Part 2: Commandline Debugging with GDB | MCU on Eclipse 

If it is about unlocking a device, there is as well the way to use the J-Link commander, have a read at

Unlocking and Erasing FLASH with Segger J-Link | MCU on Eclipse 

I hope this helps,

Erich

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
1,304件の閲覧回数
BlackNight
NXP Employee
NXP Employee

The standard way would be to use the MCUXpresso IDE and use the GUI Flash tool to erase, program and recover the device if needed.

pastedImage_1.png

But this basically requires the that device is supported by the NXP MCUXpresso SDK, and the 50 MHz K20DX128 is not.

The legacy devices are supported with the NXP Kinetis Design Studio V3.2.0. In KDS you have the 'Flash from File' functionality:

pastedImage_2.png

which you can use to program a file to the target.

OpenOCD does not support the Kinetis devices well, so I recommend you go with the LinkServer (LPC-Link2, but this is not supported in KDS), or with a P&E or SEGGER debug probe (which you already have).

If you want to do things on the command line, I wrote a few tutorials on this:

Command Line Programming and Debugging with GDB | MCU on Eclipse 

Tutorial: MCUXpresso SDK with Linux, Part 2: Commandline Debugging with GDB | MCU on Eclipse 

If it is about unlocking a device, there is as well the way to use the J-Link commander, have a read at

Unlocking and Erasing FLASH with Segger J-Link | MCU on Eclipse 

I hope this helps,

Erich

0 件の賞賛
1,303件の閲覧回数
chris_seto
Contributor I

Hi Erich,

Thanks for the detailed post! This did work with JLink commander. Do you know any quick way of flashing a hex with JLink commander, rather than having to convert to a bin and specify a starting address?

0 件の賞賛