EmbeddedRelated.com
Forums

LPC2148 bulk/production programming

Started by Sutton Mehaffey November 14, 2012
I have Keil uVision software for development and a ULINK 2 for
programming via a 20 pin JTAG on the circuit board (LPC2148). What is
the easiest approach for initial production programming of these devices
on circuit boards (we have SD card updates - but the board must be
programmed with a bootloader and production code for the first time)?
Meaning, I don't want to include the source file for the technicians to
program the parts. I assume the program file is the HEX file produced
by the compiler. Is there an easy way I can just send this file to the
programmer and have him/her download some applicable download software
and have that work? Is there an easier approach or a better software
programming kit for this purpose? Obviously, they will have to have
some type of 20 pin JTAG device to use. Maybe, I'll have to buy another
ULINK2 for the programming lab area. Thanks.

Sutton

--
Sutton Mehaffey
Lookout Portable Security
4040 Royal Dr.
Kennesaw, GA 30144
770-514-7999, 800-207-6269
Fax: 770-514-1285
http://www.lookoutportablesecurity.com
s...@lookoutportablesecurity.com

An Engineer's Guide to the LPC2100 Series

You could use an Amontec JTAG Tiny with OpenOCD for the programmer, or use
the serial port in boot mode. JTAG is faster.

DaveS

> I have Keil uVision software for development and a ULINK 2 for
> programming via a 20 pin JTAG on the circuit board (LPC2148). What is
> the easiest approach for initial production programming of these devices
> on circuit boards (we have SD card updates - but the board must be
> programmed with a bootloader and production code for the first time)?
> Meaning, I don't want to include the source file for the technicians to
> program the parts. I assume the program file is the HEX file produced
> by the compiler. Is there an easy way I can just send this file to the
> programmer and have him/her download some applicable download software
> and have that work? Is there an easier approach or a better software
> programming kit for this purpose? Obviously, they will have to have
> some type of 20 pin JTAG device to use. Maybe, I'll have to buy another
> ULINK2 for the programming lab area. Thanks.
>
> Sutton
>
> --
> Sutton Mehaffey
> Lookout Portable Security
> 4040 Royal Dr.
> Kennesaw, GA 30144
> 770-514-7999, 800-207-6269
> Fax: 770-514-1285
> http://www.lookoutportablesecurity.com
> s...@lookoutportablesecurity.com
>

On Thu, Nov 15, 2012 at 7:06 AM, Sutton Mehaffey
wrote:
> I have Keil uVision software for development and a ULINK 2 for
> programming via a 20 pin JTAG on the circuit board (LPC2148). What is
> the easiest approach for initial production programming of these devices
> on circuit boards (we have SD card updates - but the board must be
> programmed with a bootloader and production code for the first time)?
> Meaning, I don't want to include the source file for the technicians to
> program the parts. I assume the program file is the HEX file produced
> by the compiler. Is there an easy way I can just send this file to the
> programmer and have him/her download some applicable download software
> and have that work? Is there an easier approach or a better software
> programming kit for this purpose? Obviously, they will have to have
> some type of 20 pin JTAG device to use. Maybe, I'll have to buy another
> ULINK2 for the programming lab area. Thanks.

We use Flasher ARM from Segger for this purpose. It doubled as a
J-Link as well.
http://www.segger.com/flasher-arm.html

Or you can use normal J-Link with the J-Flash tool.

If you want to have something cheap, then OpenOCD is one option
and you can use various tools with OpenOCD.

--
Xiaofan
Why would you spend $800-US on Flasher ARM for simple programming when
it looks like there are much cheaper options to do the same thing. You
must be using the Flasher ARM for other things. It looks like most of
the options are $50-$200, so $800 seems way overkill.

Sutton Mehaffey
Lookout Portable Security
4040 Royal Dr. #100
Kennesaw, GA 30144
800-207-6269, 770-514-7999, 770-514-1285 FAX
s...@lookoutportablesecurity.com

On 11/14/2012 8:56 PM, Xiaofan Chen wrote:
>
> On Thu, Nov 15, 2012 at 7:06 AM, Sutton Mehaffey
> > > wrote:
> > I have Keil uVision software for development and a ULINK 2 for
> > programming via a 20 pin JTAG on the circuit board (LPC2148). What is
> > the easiest approach for initial production programming of these devices
> > on circuit boards (we have SD card updates - but the board must be
> > programmed with a bootloader and production code for the first time)?
> > Meaning, I don't want to include the source file for the technicians to
> > program the parts. I assume the program file is the HEX file produced
> > by the compiler. Is there an easy way I can just send this file to the
> > programmer and have him/her download some applicable download software
> > and have that work? Is there an easier approach or a better software
> > programming kit for this purpose? Obviously, they will have to have
> > some type of 20 pin JTAG device to use. Maybe, I'll have to buy another
> > ULINK2 for the programming lab area. Thanks.
>
> We use Flasher ARM from Segger for this purpose. It doubled as a
> J-Link as well.
> http://www.segger.com/flasher-arm.html
>
> Or you can use normal J-Link with the J-Flash tool.
>
> If you want to have something cheap, then OpenOCD is one option
> and you can use various tools with OpenOCD.
>
> --
> Xiaofan



On Thu, Nov 15, 2012 at 10:11 AM, Sutton Mehaffey
wrote:
> Why would you spend $800-US on Flasher ARM for simple programming when
> it looks like there are much cheaper options to do the same thing. You
> must be using the Flasher ARM for other things. It looks like most of
> the options are $50-$200, so $800 seems way overkill.
>

Whether US$800 is expensive or not depends on the use cases.
In our case, it is really cheap if you consider that we use J-Link
and IAR (10s of licenses) as our standard ARM MCU tools at work.
--
Xiaofan
JTAG adapters are very inexpensive. We use a cheap Linux desktop machine
as a programmer with 4 adapters and 4 instances of OpenOCD running. It
can keep one person pretty busy swapping targets and doing an UP_ARROW,
RETURN to program the new target.

DaveS

> Why would you spend $800-US on Flasher ARM for simple programming when
> it looks like there are much cheaper options to do the same thing. You
> must be using the Flasher ARM for other things. It looks like most of
> the options are $50-$200, so $800 seems way overkill.
>
> Sutton Mehaffey
> Lookout Portable Security
> 4040 Royal Dr. #100
> Kennesaw, GA 30144
> 800-207-6269, 770-514-7999, 770-514-1285 FAX
> s...@lookoutportablesecurity.com
>
> On 11/14/2012 8:56 PM, Xiaofan Chen wrote:
>>
>> On Thu, Nov 15, 2012 at 7:06 AM, Sutton Mehaffey
>> >> > wrote:
>> > I have Keil uVision software for development and a ULINK 2 for
>> > programming via a 20 pin JTAG on the circuit board (LPC2148). What is
>> > the easiest approach for initial production programming of these
>> devices
>> > on circuit boards (we have SD card updates - but the board must be
>> > programmed with a bootloader and production code for the first time)?
>> > Meaning, I don't want to include the source file for the technicians
>> to
>> > program the parts. I assume the program file is the HEX file produced
>> > by the compiler. Is there an easy way I can just send this file to the
>> > programmer and have him/her download some applicable download software
>> > and have that work? Is there an easier approach or a better software
>> > programming kit for this purpose? Obviously, they will have to have
>> > some type of 20 pin JTAG device to use. Maybe, I'll have to buy
>> another
>> > ULINK2 for the programming lab area. Thanks.
>>
>> We use Flasher ARM from Segger for this purpose. It doubled as a
>> J-Link as well.
>> http://www.segger.com/flasher-arm.html
>>
>> Or you can use normal J-Link with the J-Flash tool.
>>
>> If you want to have something cheap, then OpenOCD is one option
>> and you can use various tools with OpenOCD.
>>
>> --
>> Xiaofan
>>
>>

Il 15/11/2012 00:06, Sutton Mehaffey ha scritto:
>
>
> I have Keil uVision software for development and a ULINK 2 for
> programming via a 20 pin JTAG on the circuit board (LPC2148). What is
> the easiest approach for initial production programming of these devices
> on circuit boards (we have SD card updates - but the board must be
> programmed with a bootloader and production code for the first time)?
> Meaning, I don't want to include the source file for the technicians to
> program the parts. I assume the program file is the HEX file produced
> by the compiler. Is there an easy way I can just send this file to the
> programmer and have him/her download some applicable download software
> and have that work? Is there an easier approach or a better software
> programming kit for this purpose? Obviously, they will have to have
> some type of 20 pin JTAG device to use. Maybe, I'll have to buy another
> ULINK2 for the programming lab area. Thanks.
>
There are multiple solutions:
1. using JTAG as you said you should use the hex or the binary file and
a JTAG programmer or debugger. There are different devices with
different performance and price.
2. Using boot mode and serial interface. In this case you should design
your board taking care to have a serial connection and some pins
management to use ISP mode (I didn't remember the correct pins but you
can check in the user manual). In this case you should find Flash Magic
(not totally free, please check the licensing) and a similar application
from www.coocox.com and I think other similar. In this way you haven't
to buy a JTAG programmer or debugger because a PC and a serial cable or
a USB to serial converter are the only things needed.

In any case if you have a lot of boards to program there are companies
that made industrial programmers that may be installed and connected to
ATE/fixtures and they are able to program more boards in parallel (I
know models that can program 8 boards in parallel). This is the more
industrial solution and if you didn't provide the hw support to use ISP
you may arrange the missing hw in the fixture).

I know guys at www.algocraft.com they have good products and a good
support service.
> Sutton
>
> --
> Sutton Mehaffey
> Lookout Portable Security
> 4040 Royal Dr.
> Kennesaw, GA 30144
> 770-514-7999, 800-207-6269
> Fax: 770-514-1285
> http://www.lookoutportablesecurity.com
> s...@lookoutportablesecurity.com
>



For programming using Keil It's possible to create a new project which only
includes the .axf output from the build project and programs this into the
target.

I've been using this technique with the LPC43xx devices for some time.

Just create a new project and add the .axf into source group 1, set the
debug and programmer options as normal, it's really that simple.

This means you don't have to expose any source code.

Regards

Phil.

From: l... [mailto:l...] On Behalf Of
M. Manca
Sent: 15 November 2012 07:25
To: l...
Subject: Re: [lpc2000] LPC2148 bulk/production programming

Il 15/11/2012 00:06, Sutton Mehaffey ha scritto:
> I have Keil uVision software for development and a ULINK 2 for
> programming via a 20 pin JTAG on the circuit board (LPC2148). What is
> the easiest approach for initial production programming of these devices
> on circuit boards (we have SD card updates - but the board must be
> programmed with a bootloader and production code for the first time)?
> Meaning, I don't want to include the source file for the technicians to
> program the parts. I assume the program file is the HEX file produced
> by the compiler. Is there an easy way I can just send this file to the
> programmer and have him/her download some applicable download software
> and have that work? Is there an easier approach or a better software
> programming kit for this purpose? Obviously, they will have to have
> some type of 20 pin JTAG device to use. Maybe, I'll have to buy another
> ULINK2 for the programming lab area. Thanks.
>
There are multiple solutions:
1. using JTAG as you said you should use the hex or the binary file and
a JTAG programmer or debugger. There are different devices with
different performance and price.
2. Using boot mode and serial interface. In this case you should design
your board taking care to have a serial connection and some pins
management to use ISP mode (I didn't remember the correct pins but you
can check in the user manual). In this case you should find Flash Magic
(not totally free, please check the licensing) and a similar application
from www.coocox.com and I think other similar. In this way you haven't
to buy a JTAG programmer or debugger because a PC and a serial cable or
a USB to serial converter are the only things needed.

In any case if you have a lot of boards to program there are companies
that made industrial programmers that may be installed and connected to
ATE/fixtures and they are able to program more boards in parallel (I
know models that can program 8 boards in parallel). This is the more
industrial solution and if you didn't provide the hw support to use ISP
you may arrange the missing hw in the fixture).

I know guys at www.algocraft.com they have good products and a good
support service.
> Sutton
>
> --
> Sutton Mehaffey
> Lookout Portable Security
> 4040 Royal Dr.
> Kennesaw, GA 30144
> 770-514-7999, 800-207-6269
> Fax: 770-514-1285
> http://www.lookoutportablesecurity.com
> s...@lookoutportablesecurity.com

>