From: SourceForge.net <no...@so...> - 2004-01-19 23:19:05
|
Bugs item #880197, was opened at 2004-01-19 16:50 Message generated for change (Comment added) made by epetrich You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=880197&group_id=599 Category: msc51(8051) target Group: None Status: Open Resolution: None Priority: 5 Submitted By: Michael Broxton (mbroxton) Assigned to: Nobody/Anonymous (nobody) Summary: Unable to write to code memory using a pointer? Initial Comment: When compiling the attached test code using the following command: /usr/local/bin/sdcc -I. --model-large -c test.c I receive the following error: test.c:32: error: FATAL Compiler Internal Error in file 'gen.c' line number '8381' : genPointerSet: illegal pointer type Contact Author with source code This error occurs whenever I attempt to write to code memory using a (unsigned char code *) pointer, as I do in line 28 of this file. (Side question -- Is this the same as a (code unsigned char *) pointer??) Is it possible to write to flash memory using sdcc? Is this a bug or an unemplemented feature? I'm developing on a Cygnal Systems 8051 core microcontroller, which has 32Kb of rewritable internal flash memory for its code space. SDCC Version info: SDCC : mcs51/gbz80/z80/avr/ds390/pic14/pic16/TININative/ xa51/ds400/hc08 2.3.6 (01/06/04) (UNIX) Thanks for your help, Michael ---------------------------------------------------------------------- >Comment By: Erik Petrich (epetrich) Date: 2004-01-19 17:19 Message: Logged In: YES user_id=635249 A standard 8051 has no instruction to write to code space, so the code generator is at a complete loss as to how to implement your request; thus the fatal internal error. You will need to check your microcontroller's data sheet for more information on how they implemented writes to the flash memory. The bug we need to fix is to catch this with a reasonable error message before the code generator chokes on it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=880197&group_id=599 |