embedded isp programming of lpc922

Started by roadster896, May 26, 2010, 02:07:05 AM

Previous topic - Next topic

roadster896

Hi,


I've been using Flash Magic to program my lpc922. This did work fine. The idea is now that we create our own embedded application (which runs on a MIPS up and is connected to lpc922 via internal serial bus) which upgrades the lpc922 software when needed.

I noticed however that the format of the intel hex file is restructured by Flash Magic before the records are sent out on the serial bus. They all start on 64 byte boundary and are sorted according their programming address. The intel hex file that was provided to Flash Magic (generated by Keil toolset) is not sorted at all and start at arbitrary addresses.

While reading on this forum I noticed that the hex file can be sorted by applying a hex2bin and bin2hex sequence. I tried this and I now have a nicely sorted hex file, but there is still a difference with the hex file that Flash Magic generates internally : the Flash Magic hex file has records with a length of 64 bytes, but the hex file that is generated by a hex2bin/bin2hex sequence has records with a length of 32 bytes...

I looked at the help of the hex2bin and bin2hex exe's and it seems that you can not specify the desired length of the intel hex records in the file... I would prefer to use a length of 64 bytes since this optimizes the programming sequence (less serial requests for the same amount of data). Any idea how this can be achieved? Do I need to write an algorithm myself or can I use another tool for that?   

Btw programming the hex file by Flash Magic and then reading it out is not an option since it is not possible to read data from the lpc922...

Any ideas/tips?