LPC2194 production programming problem

Started by typhon62, April 07, 2008, 12:39:04 PM

Previous topic - Next topic

typhon62

Hope someone can help...

I use the keil development system and I use Flash Magic V4.18.1224 to program my prototypes.  Flash Magic works great, I have no problems here.

I want to have AvNet program my LPC2194's for me before they are soldered to the PCB.  I sent them the same .hex file I use with Flash Magic but it does not work.  After some poking around the memory locations using FM I found that 4 bytes starting at location 0x14 were different between a working and non-working board.

The memory dump of the non-working chip matches exactly the .hex file I sent Avnet.  The working chip that I used FM to program has 4 bytes changed from the .hex file that is loaded into FM.

Works:
:4000000018F09FE518F09FE518F09FE518F09FE518F09FE5805F20B9F0FF1FE518F09FE540000000042D0000002D0000FC2C0000F82C000000000000F42C0000F02C0000A7

Does not work:
:4000000018F09FE518F09FE518F09FE518F09FE518F09FE50000A0E1F0FF1FE518F09FE540000000042D0000002D0000FC2C0000F82C000000000000F42C0000F02C0000DE

Why does my .hex file not work with Avnet's production programmer?
And what is FM doing to the four locations to get the .hex file to run properly when using FM?

I've been trying to figure this out by myself for the better part of a day now and I'm getting no where.
Much thanks for anyone who can help me out!!!

Je Gold

You Avent contact should have access to an Avent NXP engineer to assist,

Joe

Andy Ayre

The NXP devices use location 14H - 17H as a checksum. If the checksum is not valid then the device runs the bootloader. You shouldn't have any data in these locations. This is documented in the ISP section of the user manuals from NXP.

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

Andy Ayre

Note that you can read out the contents of Flash and save as a hex file with Flash Magic. The option is on the File menu.

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

typhon62

Quote from: Andy Ayre on April 08, 2008, 09:02:27 AM
Note that you can read out the contents of Flash and save as a hex file with Flash Magic. The option is on the File menu.

Andy

Hi Andy thanks for the reply.

It looks like AvNet is just taking the hex file generated by the Keil ARM compiler and programming it straight into the LPC2194 and not putting in the correct checksum at 0x14-0x17.

If I use FlashMagic to program a part, then save the parts flash to a hex file and send that to AvNet things will work properly?

I know this is not a FlashMagic problem, I'm just starting here because FlashMagic does it correctly.  I'm also trying to educate myself on the issue so when I ask Keil why they don't stick in the correct checksum in the hex file and why AvNet's programmer is not sticking in the correct checksum I won't come across as a total dumy.

Again, thanks for the reply!!!

Andy Ayre

I'm not sure why a compiler or parallel programmer don't have options somewhere to generate the checksum. However Flash Magic doesn't make assumptions so it generates it every time.

If you read a hex file out of the device and then give it to AvNet, it *should* work. I would reprogram that hex file using Flash Magic first to make sure there were no problems with the read process.

But I am concerned that your hex file contains data in those locations. If it is expecting something specific to be there, then it may crash when it needs that data or tries to execute it. You will need to look at the linker map generated by the Keil toolset to see what is being put there. If it is just a dummy interrupt vector then you can ignore it.

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

typhon62

Quote from: Andy Ayre on April 08, 2008, 09:45:38 AM
I'm not sure why a compiler or parallel programmer don't have options somewhere to generate the checksum. However Flash Magic doesn't make assumptions so it generates it every time.

If you read a hex file out of the device and then give it to AvNet, it *should* work. I would reprogram that hex file using Flash Magic first to make sure there were no problems with the read process.

But I am concerned that your hex file contains data in those locations. If it is expecting something specific to be there, then it may crash when it needs that data or tries to execute it. You will need to look at the linker map generated by the Keil toolset to see what is being put there. If it is just a dummy interrupt vector then you can ignore it.

Andy

The linker map files shows nothing that its putting there.  I have a feeling its just a dummy interrupt vector.
Now that I'm more sure of my self about this whole mess I'll give the AvNet guys a call and we can get this worked out.  I just wanted to learn a bit before I started talking to them...

Thansk again!!!