Jump to content

MarkM

EstablishedMember
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About MarkM

  • Rank
    Newbrie
  1. Hi My code includes this function: static void lcd_graphic_rawput(unsigned char *charsrc, unsigned char row, unsigned char nrows, unsigned char col, unsigned char ncols) { unsigned char r, c; for (r = 0; r < nrows; r++) { for (c = 0; c < ncols; c++) { if (charsrc[(r >> 3) * ncols + c] & (1 << (r & 00000111b))) lcd_graphic_setXY_internal(col + c, row + r); else lcd_graphic_clearXY_internal(col + c, row + r); } } for (r = (row >> 3); r <= ((row + nrows) >> 3); r++) { lcd_pageMin[r] = min(col, lcd_pageMin[r]); lcd_pageMax[r] = max((col + ncols), lcd_pageMax[r]); #ifdef XX_DEBUG serial_printf("row = %u\n", (unsigned int)r); serial_printf("lcd_pageMin[r] = %u\n", (unsigned int)lcd_pageMin[r]); serial_printf("lcd_pageMax[r] = %u\n", (unsigned int)lcd_pageMax[r]); #endif } } The macro XX_DEBUG is not defined. If I try to compile this code I get Building... BoostC Optimizing C Compiler Version 6.88 (for PIC18 architecture) http://www.sourceboost.com Copyright© 2004-2008 Pavel Baranov Copyright© 2004-2008 David Hobday Licensed to Mark Murray under Single user Full License for 1 node(s) Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited, Non commercial use only lcd_graphic.c C:\Documents and Settings\Mark.GRUMPY\My Documents\My Documents\coxcomp\lcd_graphic.c(176): error: jump to undefined label failure "C:\Program Files\SourceBoost\boostc.pic18.exe" lcd_graphic.c -t PIC18F2620 -W2 -I boostc_libs_r1_3/libs;m:/font -O1 -Su Exit code was 1. Removing target: lcd_graphic.obj Done ... where the undefined label is in some innocent and previously functional piece of code elsewhere in the same file. A workaround is to comment out the #ifdef/#endif block. I've seen this before where simply rearranging code fixes the "problem". I'll guess you'll be wanting to look at the whole project? I can send it if you like. M
  2. OK when I get another one that reliably crashes, I'll send it in. I assume the compiler not MPLAB because the compiling stops abruptly, but the IDE doesn't disappear, so I conclude that a subtask not the main task is doing this.
  3. Hi I'm using this compiler: Executing: "C:\Program Files\SourceBoost\boostc.pic18.exe" flash.c -O1 -W2 -v -t 18F4523 -I boostc_libs_r1_3\libs BoostC Optimizing C Compiler Version 6.87 (for PIC18 architecture) http://www.sourceboost.com Copyright© 2004-2008 Pavel Baranov Copyright© 2004-2008 David Hobday Licensed to Mark Murray under Single user Full License for 1 node(s) Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited, Non commercial use only ... and it rather too often fails with the error found in the attached file. Often you can ignore the error and try again with success; sometimes it is repeatable, like this one. M
  4. Aaaaah! If I do ... rom char *foo = { 1,2,3 }; ... instead of ... rom char foo[3] = { 1,2,3 }; ... it works! Funny, that - I was expecting the compiler to treat the two as equivalent. No worries. M
  5. Hi I want to use a series of "rom char foo_1[256]" arrays to initialise an EEPROM. When I try to do this with 8 of them, I get this: Executing: "C:\Program Files\SourceBoost\boostc.pic18.exe" flash.c -O1 -W2 -v -t 18F4523 -I boostc_libs_r1_3\libs BoostC Optimizing C Compiler Version 6.87 (for PIC18 architecture) http://www.sourceboost.com Copyright© 2004-2008 Pavel Baranov Copyright© 2004-2008 David Hobday Licensed to Mark Murray under Single user Full License for 1 node(s) Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited, Non commercial use only flash.c Starting preprocessor: "C:\Program Files\SourceBoost\pp.exe" "C:\Documents and Settings\Mark.GRUMPY\My Documents\My Documents\Flash\flash.c" -i "C:\Program Files\SourceBoost\include" -i boostc_libs_r1_3\libs -d _PIC18F4523 -la -c2 -o flash.pp -v -d _BOOSTC -d _PIC18 < Working compile removed > Memory Usage Report =================== Error: No remaining RAM block (on target) big enough for: 'sprintfbuffer' size:128 bytes 'fonteeprom_5' size:256 bytes 'fonteeprom_6' size:256 bytes 'fonteeprom_7' size:256 bytes RAM available:1536 bytes, used:2412 bytes (157.0%), free:-876 bytes (-57.0%), Heap size:0 bytes, Heap max single alloc:0 bytes ROM available:32768 bytes, used:0 bytes (0.0%), free:32768 bytes (100.0%) failure Question - why is this overflowing my RAM? I need the data (and a lot more later!) to go into ROM, of which I have PLENTY. The sprintbuffer is fair game, it is a "static char[128]" array. The fonteeprom_N items are all "rom char fonteeprom[256] = { ... };" Thanks! M
  6. Hi I'm using Executing: "C:\Program Files\SourceBoost\boostc.pic18.exe" flash.c -O1 -W2 -v -t 18F4523 -I boostc_libs_r1_3\libs BoostC Optimizing C Compiler Version 6.87 (for PIC18 architecture) http://www.sourceboost.com Copyright© 2004-2008 Pavel Baranov Copyright© 2004-2008 David Hobday Licensed to Mark Murray under Single user Full License for 1 node(s) Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited, Non commercial use only With the following data structure (generated using a script) static unsigned char *eepromlist[] = { digit_18x24_0, digit_18x24_1, digit_18x24_2, digit_18x24_3, eeprom_gap_0, digit_18x24_4, digit_18x24_5, digit_18x24_6, digit_18x24_7, eeprom_gap_1, digit_18x24_8, digit_18x24_9, NULL }; The following loop does not terminate at the NULL: for (i = 0; eepromlist != NULL; i++) { // do stuff with eepromlist[] } instead, it runs off into an infinite(?) loop. Any ideas? M
  7. Hi I'm trying to compile a bit of C with the following fragment in it: struct icon { unsigned char x, y; } icon[6] = { // This is line 89 { 10, 6 }, { 10, 7 }, { 10, 8 }, { 9, 7 }, { 10, 7 }, ( 10, 9 } }; ... and I get the following error: flash.c Starting preprocessor: "C:\Program Files\SourceBoost\pp.exe" "C:\Documents and Settings\Mark.GRUMPY\My Documents\My Documents\Flash\flash.c" -i "C:\Program Files\SourceBoost\include" -i boostc_libs_r1_3\libs -d _PIC18F4523 -la -c2 -o flash.pp -v -d _BOOSTC -d _PIC18 C:\Documents and Settings\Mark.GRUMPY\My Documents\My Documents\Flash\flash.c(89): error: missing semicolon C:\Documents and Settings\Mark.GRUMPY\My Documents\My Documents\Flash\flash.c(89): error: failure My compiler (running under MPLAB) is: BoostC Optimizing C Compiler Version 6.84 (for PIC18 architecture) Any ideas? I've tried things like changing x to xx and y to yy with no change to the problem. Thanks! M
  8. Hi I'm using BoostC on WinXP under MPLab IDE 8.02. The BoostC is: BoostC Optimizing C Compiler Version 6.84 (for PIC18 architecture) ... and I'm targeting a PIC18F4523. I need a 1k buffer, and organising it as 8 pages of 128 bytes is effective and useful, so I've declared it as: static unsigned char page0[128], page1[128], page2[128], page3[128], page4[128], page5[128], page6[128], page7[128]; static unsigned char *lcd_graphic_buffer[8] = { page0, page1, page2, page3, page4, page5, page6, page7 }; Now if I need to access a particular byte in the buffer, I ought to be able to do something like lcd_graphic_buffer[1][45] = 0x00; but this fails; I haven't looked to see where the rvalue goes, but it is not in the right place. If, however, I do the equivalent *(lcd_graphic_buffer[1] + 45) = 0x00; then it works fine. Have I got things right, or am I missing something? M
×
×
  • Create New...