Well, the bug is finally dead!! :)
It seems that I have been over much of my code chasing this bug and
have found a few others along the way, but the bad one kept lurking
until last night until finally exposed. It turned out to be a
character array that I was using to send strings to the routine that
sends the data to the standard lcd for the TS-7260. I had used much of
the example lcd code provided by Technologic. This code in the
writechar subroutine passes the character to the lcd by indexing a
char pointer.
*padr = *p_buf++;
My BIG mistake was that I had changed the original subroutine so that
it used a pointer to my global char pointer p_buf instead of a pointer
local to the subroutine. This was done so that I could be lazy and not
bother to explicitly name the string I wanted to send to the lcd
because it was the same one every time. This turned very BAD because
every time the writechar routine was called it kept indexing my global
char pointer until it reached the end of the allocated space (took
about 20min of writing to the lcd) then CRASH.
Well, looking on the bright side this did make me look very hard at my
code and I found some other bugs along the way. It also shows the
potential danger of indexing pointers.
Thanks to all who have provided comments to help find this bug.
Geoff Veale
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|