LPC21xx ISP problems

Started by oversc0re, July 29, 2006, 03:51:26 AM

Previous topic - Next topic

oversc0re

Hello! I'm trying to get the command line ISP working. But so far it only works if i program my device from user interface prior to command line programming. And after the command line programming, I have to use the user interface again. Here is output from two consucetive command line programmings (the one before those two was made with the user interface).

C:\Program Files\Flash Magic>fm DEVICE(LPC2102,10) ERASE(DEVICE,PROTECTISP) HEXFILE(d:\projects\thermoarm\SW\lpc2102.hex,NOCHECKSUMS,NOFILL,PROTECTISP) COM(1,9600) HARDWARE(BOOTEXEC, 50, 100)
Flash Magic Version 3.21.116
8051/XA Driver Version 2.10.112
ARM Driver Version 1.10.113
(C) Embedded Systems Academy 2000-2006 All rights reserved
Connected
Device selected
Erase complete (DEVICE)
Hex file programming complete (d:\projects\thermoarm\SW\lpc2102.hex)

C:\Program Files\Flash Magic>fm DEVICE(LPC2102,10) ERASE(DEVICE,PROTECTISP) HEXFILE(d:\projects\thermoarm\SW\lpc2102.hex,NOCHECKSUMS,NOFILL,PROTECTISP) COM(1,9600) HARDWARE(BOOTEXEC, 50, 100)
Flash Magic Version 3.21.116
8051/XA Driver Version 2.10.112
ARM Driver Version 1.10.113
(C) Embedded Systems Academy 2000-2006 All rights reserved
Connection failed: invalid command

I'm sure I'm missing something, but I just can't figure it out.

Thanx for help!

Andy Ayre

Sorry for the delay in replying. I couldn't reproduce this. Here is what I tried:

I created a file called lpc2xxxtest.txt which contained:

DEVICE(LPC2129,12)
ERASE(DEVICE,PROTECTISP)
HEXFILE(Pat64k.hex,NOCHECKSUMS,NOFILL,PROTECTISP)
COM(1,9600) HARDWARE(BOOTEXEC, 50, 100)

I had to change the device, frequency and hex file to match my setup. I am using a Keil MCB2000 board. I then ran Flash Magic using:

fm @lpc2xxxtest.txt

It worked three times in a row. So please try moving your directives to a text file and using that method. If it doesn't help please post back here.

Embedded Systems Academy, Inc.
support at esacademy dot com

oversc0re

#2
After a while I got fed up with lpc flash utility and I gave Flash magic another chance. Programming from the GUI now works without a problem, but the command line is giving me hard times again. The error message i get now is:

"C:\Program Files\Flash Magic\FM.EXE" COM(2,38400) DEVICE(LPC2148,12.000) HARDWARE(BOOTEXEC,50,100) HEXFILE(S:\DAQ.HEX, NOCHECKSUMS, NOFILL, PROTECTISP)
Flash Magic Version 3.43.183
8051/XA Driver Version 2.26.181
ARM Driver Version 1.21.181
(C) Embedded Systems Academy 2000-2006 All rights reserved
Connected
Device selected
Hex file programming failed: invalid command (S:\DAQ.HEX)

Any ideas?

Regards, Matic

Andy Ayre

Something is going wrong during programming. Please add the "DEBUG" directive to the command line and email me the debug file C:\flashmagic.fmd, then delete it.

My email address is at the bottom of this post.
Embedded Systems Academy, Inc.
support at esacademy dot com

oversc0re

Today it is working ;) I the cpu setting in compiler was set to lpc2148 and I am using lpc2146. But the error "Hex file programming failed: invalid command (S:\DAQ.HEX)" really does not suggest the problem. Sorry for bothering you and thanks for your answer.

Regards, Matic

Andy Ayre

Hmmm...there is probably a difference in the programming commands. Thanks for posting the solution!

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com