Hi!
I have been experimenting with the serial_blaster tool, looks like a very useful
tool. :)
I did have one problem getting it running, receiving the following error.
$ ./serial_blaster
START
waiting for '<'
found '<'
--------- SENDING 2K BOOT FILE: "boot.bin" ---------
4352555301da8fe202c1a0e3d300a0e300f029e100f069e12c0000ebc20000eb310000e
<snip>
0000000000000000
2048 Bytes in 22 seconds.
--------------------------------------------------
waiting for '>'
ERROR!!! Expected '>' but found '<'
After comparing my output with the expected output from the readme file
I noticed that the time taken to send the boot.bin file was substantially
longer than the example.
After a bit of digging in the serial_blaster.c file I found the following
section.
line 169:
if(bverbose)
{
printf("%0.2x", (unsigned char )ch);
fflush(stdout);
out_count += 2;
WriteByte(fd, ch, TRUE); <<-- by setting this to true the
WriteByte function
} calls tcdrain() for every byte.
this behaviour
differs from the !bverbose path
which only calls
tcdrain() every 1024 bytes.
else
{
if((x%1024) == 0)
{
printf(".");
fflush(stdout);
out_count++;
}
WriteByte(fd, ch, ((x%1024) == 0) );
}
I found that if I changed the WriteByte(fd, ch, TRUE) line to read
WriteByte(fd, ch, ((x%1024) == 0) );
everything works as expected.
This is most probably a mis-configuration on my behalf however I have attached
a patch with my change
just incase others have the same issue.
my system configuration consists of:
debian unstable, 2.4.32 kernel, gcc version 3.3.6 (Debian 1:3.3.6-12)
regards
Chris.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/CFFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
--- old/serial_blaster.c 2005-09-01 09:24:26.000000000 +1200
+++ new/serial_blaster.c 2006-05-18 14:08:44.000000000 +1200
@@ -171,7 +171,7 @@
fflush(stdout);
out_count += 2;
- WriteByte(fd, ch, TRUE);
+ WriteByte(fd, ch, ((x%1024) == 0) );
}
else
{
|