simple flash downloading tool for production using SWD port for KL25

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

simple flash downloading tool for production using SWD port for KL25

Jump to solution
4,967 Views
sw_vw
Contributor II

hi,

can anyone help to suggest a simple flash downloading tool for production usage, which can support SWD programming?

our board now is almost ready release to production. but we now found that we lack a simple downloading tool. we reserved the SWD port in our board. the MCU is MKL25 series.

we have J-link and FRDM-KL25Z tools on hand.

Thanks very much.

best regards,

sw

Labels (1)
1 Solution
1,639 Views
BlackNight
NXP Employee
NXP Employee

First: I recommend professional tools like a P&E Cyclone or other high end tools for production programming. If you are going to program a few <10 devices, approaches like using OpenSDA is possiblility. But I would not take the risk for a larger set of boards, or if things needs to go to customers. But that's your decision.

To use the OpenSDA to program another board you need to modify the Freedom board: see this article

Using the Freedom Board as SWD Programmer

I hope this helps.

View solution in original post

7 Replies
1,639 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

P&E company provides Cyclone MAX programmer tool, which supports Kinetis L series SWD interface.

More detailed info, please check below link:

http://tinyurl.com/P-E-Cyclone-Max

Wish it helps.

1,639 Views
kai_liu
Senior Contributor I

By using OpenSDA (programmer mode) of FRDM, you can download firmware to external MCU via SWD.

You find some QFP80 breakout boards and Yamaichi sockets (expensive) to build DIY off-line programmers before soldering on board.

You can also use scripting languages to copy binary files to target KL25Z.

Alternatively, a serial port and MSD bootloader can be used for future firmware programming.

0 Kudos
1,639 Views
sw_vw
Contributor II

Hi, Kai Liu,

thank you.

yes, we can download firmware to external MCU via SWD using FRDM. we can download it in the compiler's IDE.  but is there a simple standalone software program which we can use it to download the firmware?

best regards

sw

0 Kudos
1,639 Views
kai_liu
Senior Contributor I

For my understanding, the on board debugger can be configured as programmer mode, which it acts as an USB MSD and s19 binary code can be downloader to target microcontroller, either on board and off board.

So in this mode, you can copy your code into USB MSD.

Command prompt: copy your_code.srec to e:\ (in case e: is your attached programmer MSD)

Bash shell: cp your_code.srec to your_mount_point

Just batch file in Windows, shell script in Linux. There is no standard programmer GUI software.

If you want more features like verification and personalization, I would like to suggest you to use Python to add simple GUI, and read back its status. (disconnect and connect again by PyUSB).

Furthermore, it seems CMSIS-DAP is open source now. It is possible to use it as programmer as well.

0 Kudos
1,639 Views
sw_vw
Contributor II

Kai Liu,

thank you.

by using FRDM in programmer mode, seems that it can only act ONE time, and after that, we need load it again.

is it possible to modify that program to let it act as a simple standalone programmer for small devices , say limit the .bin file size to 32kbyte,and save that file to its internal flash, and also give some OK/NG indication , so we can use it as a standalone programmer for KL25Z32 series, etc?

and you mentioned the PyUSB, as I'm not familiar with python. can you help to give us some codes on read back status, disconnect and connect again by PyUSB as you mentioned?

thanks a lot

sw

0 Kudos
1,639 Views
kai_liu
Senior Contributor I

Well, if you are searching for a fully automatically programmer (software) running on FRDM, there is no complete solution, I guess.

You can use MSD_programmer to program code in target chip.

You can download code to target code with IAR with PEmicro debugger.

You can download flash code to target chip in Keil with CMSIS-DAP debugger.

The source code for all of these OpenSDA applications are not open so far. You have to roll your own with existing reference code from Freescale. For CMSIS-DAP, you can find some code for STM32F103 or LPC11U37. Because CMSIS-DAP uses USB HID, it is not difficult to do it with Python/PyUSB, but you have to know more detail for KL25Z programming algorithm for registers definitions.

It takes time anyway.

For non-technical solutions, you can ask help for 3rd party programming services, actually some distributors of programmers offer such service. If you place a BIG order, you can ask help from distributors of Freescale, some of them will offer service as value-added service.

0 Kudos
1,640 Views
BlackNight
NXP Employee
NXP Employee

First: I recommend professional tools like a P&E Cyclone or other high end tools for production programming. If you are going to program a few <10 devices, approaches like using OpenSDA is possiblility. But I would not take the risk for a larger set of boards, or if things needs to go to customers. But that's your decision.

To use the OpenSDA to program another board you need to modify the Freedom board: see this article

Using the Freedom Board as SWD Programmer

I hope this helps.