Looking for a simple software to flash a Kinetis

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

Looking for a simple software to flash a Kinetis

Jump to solution
4,032 Views
arnogir
Senior Contributor II

Hello every body.

I'm using a K70 with KDS and a P&E to flash and debug my software on the K70.

I'm looking for a simple way to flash the K70 without need to start all KDS environment.

Example:

-Launch this "Software"

- Open the .abs

- Click on "Start flash"

- Flash is started...

Thank:smileyhappy:

0 Kudos
1 Solution
1,659 Views
BlackNight
NXP Employee
NXP Employee

Arno and everyone else who is interested how to use Kinetis Design Studio (or GDB in general) for command line debugging/flashing/standalone programmer, both with Segger J-Link and P&E Multilink:

http://mcuoneclipse.com/2015/03/25/command-line-programming-and-debugging-with-gdb/

It shows how to debug/program a device without launching an IDE.

I hope this is what you are looking for.

Erich

View solution in original post

0 Kudos
10 Replies
1,659 Views
alexfeinman
Contributor III

To elaborate slightly on what Erich said. I am flashing K22 via JTAG using Segger Jlink like this:

/opt/SEGGER/JLink/JLinkExe < unlock

/opt/SEGGER/JLink/JLinkExe < flash


Where the contents of the script files is:

unlock:

     si 1

     unlock kinetis

     qc

flash:

     si 1

     speed auto

     device mk22fn128xxx10

     loadbin myapp.bin, 0

     qc

Hope this helps

0 Kudos
1,660 Views
BlackNight
NXP Employee
NXP Employee

Arno and everyone else who is interested how to use Kinetis Design Studio (or GDB in general) for command line debugging/flashing/standalone programmer, both with Segger J-Link and P&E Multilink:

http://mcuoneclipse.com/2015/03/25/command-line-programming-and-debugging-with-gdb/

It shows how to debug/program a device without launching an IDE.

I hope this is what you are looking for.

Erich

0 Kudos
1,659 Views
arnogir
Senior Contributor II

Thank,

I will test it!

:smileyhappy:

0 Kudos
1,659 Views
arnogir
Senior Contributor II

Hello

I havn't yet tested the solution which consist to start a GDB server and client and then enter command line in a dos CMD.

But are they a way which consist to start a specific software in which we "Open" an .abs file and then "click" on a "Flash" button?

It seem the client/server solution not allow to write an bach file (.bat) which execute this?

0 Kudos
1,659 Views
BlackNight
NXP Employee
NXP Employee

GDB allows very easy batch programming. I use this batch file to start the server and program my file:

REM Start P&E GDB Server with single session

call "cmd /c start C:\Freescale\KDS_3.0.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_2.0.8.201504092111\win32\pegdbserver_console.exe -startserver -singlesession -device=Freescale_K6x_K64FN1M0M12"

REM start gdb with script

arm-none-eabi-gdb -x gdbScript.txt

The content of the script gdbScript file is this:

# script for gdb. Run it with

# gdb -x <commandFile>

# disable confirmation messages (y or no):

set confirm off

# connect to P&E gdb server:

target remote localhost:7224

# reset target:

monitor reset

# load symbols for application:

file MyProject/Debug/MyProject.elf

# load application:

load MyProject/Debug/MyProject.elf

# detach from target. As a side effect, this will start it:

detach

# quit gdb

quit

I hope this helps,

Erich

0 Kudos
1,659 Views
arnogir
Senior Contributor II

Hi,

All work correclty! Many thank.

Do you know (even  if I'm not in the good session) if it is exist the same thing for the HCS08 series (HCS08GT/GB 60...MC13213...)?

I have CodeWarior 10.3 (eclipse IDE) and CodeWarrior 6.3 (Old IDE)

:smileyhappy:

0 Kudos
1,659 Views
BlackNight
NXP Employee
NXP Employee

CodeWarrior (Eclipse) is not using GDB, so the approach is different.

Have a look here:

Scripting: The Debugger Shell, Getting started… | MCU on Eclipse

Debugger Shell: Test Automation | MCU on Eclipse

CW 6.3: I have not done that with that debugger.

I hope this helps,

Erich

0 Kudos
1,659 Views
BlackNight
NXP Employee
NXP Employee

KDS comes with gdb, so you could use the gdb command line mode, no need to use Eclipse.

Additionally, both P&E and Segger offer standalone tools too:

P&E Microcomputer Systems

https://segger.com/flasher-arm.html

Erich

0 Kudos
1,659 Views
arnogir
Senior Contributor II

Hi,

I want keep My P&E Multilink universal to do it.

So, I will test with KDS command line.

But I'm not be able to find the documentation which explain to me how use KDS command line to flash a specific file.

Could you indicate to me where is this documentation?

:smileyhappy:

0 Kudos
1,659 Views
BlackNight
NXP Employee
NXP Employee

Hi Arno,

I have described it how it works on the command line with OpenOCD/CMSIS-DAP:

http://mcuoneclipse.com/2015/03/22/openocdcmsis-dap-debugging-with-eclipse-and-without-an-ide/

Same thing would apply for the P&E GDB server too: launch the P&E GDB server (I need to dig out the path) and use the arm-none-eabi-gdb as for the OpenOCD connection.

I hope this helps,

Erich

0 Kudos