Programming a microcontroller without IDE

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

Programming a microcontroller without IDE

Jump to solution
3,485 Views
MarcoGiammarini
Contributor III

Dear,

I have a question (maybe stupid): It is a lot of times that I develop my project with MCUXpresso and when the board go in production, I still program the board with MCUXpresso and the project opened. I think is not the correct way, with other microcontrollers I use a specific tool where I can download directly the hex file. Is there a similar tool for NXP, in particular the Kinetis series?

Regards

Marco

Tags (3)
0 Kudos
Reply
1 Solution
3,480 Views
ErichStyger
Specialist I

There are different ways, depends a bit on the debug probe used.

For LinkServer you can run a script as shown in https://mcuoneclipse.com/2020/12/05/standalone-and-command-line-programmer-with-mcuxpresso/

For P&E (PEMicro) or Segger you can use gdb: https://mcuoneclipse.com/2015/03/25/command-line-programming-and-debugging-with-gdb/

Or you can buy one of the production programmers (Cyclone from P&E, Flasher from SEGGER), see https://mcuoneclipse.com/2016/04/02/flashing-many-arm-boards-without-a-host-pc/ then you can even do the programming without a host PC.

The other way is that you have a bootloader on your device, then you can program it directly e.g. over USB or with blhost:

https://mcuoneclipse.com/2018/03/03/flash-resident-usb-hid-bootloader-with-the-nxp-kinetis-k22-micro...

I hope this helps,

Erich

View solution in original post

0 Kudos
Reply
9 Replies
3,423 Views
mjbcswitzerland
Specialist V

Hi

If your Kinetis part has eZport it is also possible to use that to program boards in  production environment, whereby boards can be used to clone their programs to new, un-programmed boards, which can be very efficient since it doesn't require any further tools:

See https://www.utasker.com/docs/uTasker/uTaskerEzPortCloner.pdf

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1064.html

0 Kudos
Reply
3,465 Views
myke_predko
Senior Contributor III

@MarcoGiammarini 

What volume of product are you building?  If you're talking in the hundreds at a time then I would recommend getting the MCUs pre-programmed before they're soldered to the PCB.  

Your board manufacturer should have relationships with companies that do that as it saves them money and hassle and is a higher quality process.  

As @ErichStyger indicates there are quite a few ways to do the programming on the line, but eliminating that manufacturing makes sense in terms of cost, product turn around and quality.  

myke

0 Kudos
Reply
3,459 Views
MarcoGiammarini
Contributor III

50/100 pieces per time...

0 Kudos
Reply
3,456 Views
myke_predko
Senior Contributor III

@MarcoGiammarini 

That's probably too low for ongoing purchases of pre-programmed parts but I still recommend talking to your board manufacturer.  

With the current long lead times on Kinetis (and other devices) it may make sense to buy your year's supply now at which point it would be advantageous to have them preprogrammed.  

Good luck - I'm going through the same discussions right now.

myke

0 Kudos
Reply
3,469 Views
MarcoGiammarini
Contributor III

It needs an open project, otherwise, you can't choose the microcontroller, right?

0 Kudos
Reply
3,468 Views
ErichStyger
Specialist I

yes, just a dummy project where it can store the settings.

0 Kudos
Reply
3,481 Views
ErichStyger
Specialist I

There are different ways, depends a bit on the debug probe used.

For LinkServer you can run a script as shown in https://mcuoneclipse.com/2020/12/05/standalone-and-command-line-programmer-with-mcuxpresso/

For P&E (PEMicro) or Segger you can use gdb: https://mcuoneclipse.com/2015/03/25/command-line-programming-and-debugging-with-gdb/

Or you can buy one of the production programmers (Cyclone from P&E, Flasher from SEGGER), see https://mcuoneclipse.com/2016/04/02/flashing-many-arm-boards-without-a-host-pc/ then you can even do the programming without a host PC.

The other way is that you have a bootloader on your device, then you can program it directly e.g. over USB or with blhost:

https://mcuoneclipse.com/2018/03/03/flash-resident-usb-hid-bootloader-with-the-nxp-kinetis-k22-micro...

I hope this helps,

Erich

0 Kudos
Reply
3,477 Views
MarcoGiammarini
Contributor III

Thanks, @ErichStyger  for the reply. I use both P&E Micro and Segger to develop. I was hoping there was a simpler solution, like STM32CubeProgrammer. I'll try your solution with gdb.

Regards

Marco

0 Kudos
Reply
3,472 Views
ErichStyger
Specialist I

Hi Marco,

the MCUXpresso IDE has a similar programmer built in as 'GUI Flash Programmer':

ErichS_0-1614945613120.png

ErichS_1-1614945672281.png

 

Erich

0 Kudos
Reply