Programming (flashing) Kinetis microcontrollers

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

Programming (flashing) Kinetis microcontrollers

3,963 Views
jrychter
Contributor V

I'm new to Kinetis microcontrollers, coming from an MSP430 world. With the MSP430 what I usually do is:

* create a prototype version of software using the MSP430 LaunchPad,

* design the target PCB, build the device,

* connect the launchpad SBW (spy-bi-wire) pins to the target device,

* program the target device.

I just realized that steps 3 and 4 are not obvious in the world of Kinetis. There are DIY tutorials on modifying Freedom boards, but there are warnings about licenses not allowing this kind of thing.

So, do I need to buy a dedicated device just to load code onto chips? What is the hobbyist-friendly solution for that?

5 Replies

1,931 Views
jessemillwood
Contributor I

Sorry if this is a little late to the party but I am also looking for a cheap and easy way of flashing a Freescale Kinetis microcontroller in an environment other than the FRDM boards. I have become rather familiar with some of the tools for the FRDM-KL25Z and the FRDM-K64F boards through course work as well as Erich Styger's incredible website.

I am now working on a project in which I would like to debug code on one of the FRDM boards and then implement it on a board that I design with the Freescale KL25Z128VLK ARM M0+.

My understanding is that the L-series Kinetis microcontrollers have only one physical interface for programming and that is the SWD interface that interfaces with the ARM DAP. My thoughts on how to proceed are to use this https://www.olimex.com/Products/ARM/JTAG/ARM-USB-OCD/ JTAG Debugger and this https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-SWD/ adapter to interface with the SWD physical interface. Then, it seems that the openocd software can flash over the SWD interface.

I do not want to try this out without knowing it will work though. If anyone has any experience in this area or thinks this sounds plausible please let me know.

Thanks

0 Kudos
Reply

1,931 Views
jrychter
Contributor V

I've looked around and here's the impression I got: it seems to me that while certain barriers to accessibility of modern microcontrollers have been removed (low-cost development boards! free compilers for popular devices!), other barriers remained, a relic of the times past.

Here's a great company that can launch 500 new microcontroller devices and obviously cares about them landing in the hands of as many designers as possible (hence the Freedom boards), but cannot also manufacture a simple and inexpensive SWD programmer/debugger?

So many people are directed to seek a third-party device. Those third parties are tiny companies, their products are not easily procured in all parts of the world, and for small-scale usage they are way overpriced. There is uncertainty in which one to choose and whether it will work at all.

The alternative is to modify (destroy) a Freedom board to produce an unsupported solution that might kind-of work.

I appreciate your answer, Erich (and I *really* appreciate all the material you put on the web, it's a great resource!), but I think Freescale deserves some criticism for staying behind the times.

Why can't we have a Freedom JTAG/SWD device alongside the 500 Kinetis devices and all the Freedom boards?

Yes, I know that's "how it's done". But times change and as microcontrollers become more accessible, companies like P&E can't hope to continue to sell a device that costs $5 to manufacture for EUR 210 +VAT (that's what Farnell want's to charge me for P&E Multilink Universal!). There is still lots of business in the professional devices, but the hobbyist/amateur/beginner end should be taken care of with a device costing $20.

Texas Instruments got this right with the MSP430 Launchpad boards. All you need to do is remove a bunch of jumpers and you have a programmer for all their SBW-compatible devices (all the newer MSP430 chips). It is simple, it is cheap, and it works very well indeed. And it means that I can immediately design boards using MSP430 devices, without taking the cost and uncertainty of a JTAG FET tool into account.

1,931 Views
BlackNight
NXP Employee
NXP Employee

Hello,

Only the Segger OpenSDA firmware has this licensing terms. If you are using the USBDM or CMSIS-DAP, then no restrictions apply.

The the FRDM board way is *the* hobbiest friendlest way I'm aware of: you get a debugging/programming device for $15.

0 Kudos
Reply

1,931 Views
jrychter
Contributor V

Well, being completely new to this world, these terms mean nothing to me :-(

I guess I need to learn much more to be able to build devices with Kinetis controllers (going beyond launching code on the Freedom boards).

0 Kudos
Reply

1,931 Views
BlackNight
NXP Employee
NXP Employee

USBDM is an open source implementation of a debugging firmware. Google for USBDM, and you will find plenty of links/information, as well in this forum.

CMSIS-DAP is the Debug Access Protocol defined by ARM (here again: google is your friend ;-). It is a debug protocol widely used in the industry (e.g. IAR and Keil tool chains), and there is an FRDM firmware for it provided by Freescale.