Jump to content

dub

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About dub

  • Rank
    Newbrie
  1. Dave and others, Tried the patch, and I am pleased to report that it fixed the problem reported few days ago. Thanks for providing fix so quickly, and keep up the good work. Regards! Dub
  2. I've seen the problem on and off on my embedded device and always though it was stack overflow related but last night nailed the problem to BoostC compiler error. Consider call to following function: ... ... lcd_printf("%3d m/sec", speed); ... ... Function is defined earlier in code and here is just the starting sequence of the function (note definition of "pi" variable, We will get ot that later). void lcd_printf( char *fmtptr, unsigned int val ) // JS - Accept unsigned by default { unsigned char pi = 0, bi, c, fill, baseOrBits, sign, mask; unsigned char buff[ 16 ]; // max length allowed is 16 bit pad; while( 1 ) { c = fmtptr[pi++]; if ( !c ) return; ............. ............ Variable fmtptr (string "%3d m/sec" is placed to address 0x0073 (bold in following memory dump. 0x0070 00 01 00 25 33 64 20 6D . 0x0078 2F 73 65 64 00 01 20 00 As we progress through the loop debugger clearly shows that local variable "pi" is stored at the location of NUL character in fmtptr string thus corrupting output to LCD screen and actually printing non printable character until first NUL char is encountered. 0x0070 00 01 00 25 33 64 20 6D 0x0078 2F 73 65 64 04 01 20 00 Please contact me if you need assistance in reproducing the bug. It caused me quite a lot of grief over the last week or so. Regards! Dub Bartolec
×
×
  • Create New...