Forum: ARM programming with GCC/GNU tools lpc21isp bug

 Author: Viliam K. (viliam_k) Posted on: 2010-04-25 22:48
Attached files:

Rate this post
 0 ▲ useful ▼ not useful
Hi, I tired using the lpc21isp utility to flash my ADuC7026 through the
serial bootloader and I cam across a frustrating bug.

ADI's appnote AN-724 describes the communication protocol for the serial
bootloader. Basically each command sent to the ADuC ends with a two's
complement checksum of every byte after the start ID. otherwise put, the
euqation is 0x00 - (8 bit sum of: number of bytes + sum of all of the
bytes).
Check the bottom of page three:
http://www.analog.com/static/imported-files/applic...

Here is the debug output from lpc21isp:

45000

Target: Analog Devices.
Turn on debug.
lpc21isp version 1.37
Converting file ADuC2.hex to binary format...

<many lines containing debug info on the hex file, they are not
relevant>

converted to binary format...
image size : 525024
COM-Port com7 opened...
Synchronizing
Sending '(08)'
Erasing .. Sending '(07)(0E)(06)E(00)(00)(00)(00)(00)(FFFFFFB5)'
Sending '(07)(0E)(06)E(00)(00)(00)(00)(00)(FFFFFFB5)'
Sending '(07)(0E)(06)E(00)(00)(00)(00)(00)(FFFFFFB5)'
Send packet failed

-62 I31    (0A)(0D)'). However it does not send the correct packets
afterwards.

'(07)(0E)(06)E(00)(00)(00)(00)(00)(FFFFFFB5)' is the correct packet to
erase the first address page, but clearly FFFFFFB5 is wrong. First, it
is not one byte, second the checksum should be B4.

I tried brute forcing the protocol with RealTerm. If I send
'(07)(0E)(06)E(00)(00)(00)(00)(00)(B4)' I receive the correct ack byte
'0x06'. but if I send the same bytes, but with the checksum B5, I
receive the NACK byte '0x07' over the serial connection.

EDIT: B5 is the correct checksum, however, the FFFFFFB5 not being one
byte is still a problem....

I hope this summarizes the problem well enough. Any ideas on how to get
a hold of the developers to change this?

Thanks for the help,
-Viliam

PS I attached the complete lpc21isp output.

:
 Author: Jörg Wunsch (dl8dtl) (Moderator) Posted on: 2010-04-26 09:56

Rate this post
 0 ▲ useful ▼ not useful
Viliam K. wrote:

> EDIT: B5 is the correct checksum, however, the FFFFFFB5 not being one
> byte is still a problem....

I don't know that software, but it seems like a sign extension bug
to me, most likely one only affecting the printout of the debugging
information.

 Author: Martin Thomas (Guest) Posted on: 2010-04-26 14:06

Rate this post
 0 ▲ useful ▼ not useful
>...
>lpc21isp version 1.37
>...
First of all try with a newer version of lpc21isp. The current version
in the sf.net SVN is 1.79.

>...
> Any ideas on how to get a hold of the developers to change this?
>...
If it still fails it might be better to ask in the lpc21isp Yahoo group.
reads this group too.

• $formula (LaTeX syntax)$