cfreund escreveu:egipts escreveu:É que depois vou atualizar estes dados na flash... Aí pretendia fazer uma rotina que atualize todos e não um por um...
Mas vou testar...
Obrigado.
- Código: Selecionar todos
const unsigned char txtL0x[][17] @ 0x8000 = {
" INCENDIO L01 ",
" INCENDIO L02 ",
" INCENDIO L03 ",
" INCENDIO L04 ",
" INCENDIO L05 ",
};
Eu testei o "const" sem informar o endereço, mas ele joga na área anterior ao programa. Como coloquei o programa para iniciar em 0x8400 (Project.prm) ele colocou as variáveis nesta área protegida... Como indico que aquele grupo deverá ficar fora da "ROM" e "ROM1"? Tenho que criar uma outra ROM com READ_WRITE não tenho? Tipo ROM2 ou devo usar algo assim: ROM_VAR = READ_WRITE 0x8000 TO 0x83FF; ?
Project.prm:
/* This is a linker parameter file for the mc9s08pa32 */
NAMES END /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your own files too. */
SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */
Z_RAM = READ_WRITE 0x0040 TO 0x00FF FILL 0x9D;
RAM = READ_WRITE 0x0100 TO 0x103F FILL 0x9D;
ROM = READ_ONLY 0x8400 TO 0xFF6F FILL 0x9D;
ROM1 = READ_ONLY 0xFF80 TO 0xFFAF FILL 0x9D;
EEPROM = READ_ONLY 0x3100 TO 0x31FF FILL 0x9D;
/* INTVECTS = READ_ONLY 0xFFB0 TO 0xFFFF; Reserved for Interrupt Vectors */
END
PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */
DEFAULT_RAM, /* non-zero page variables */
INTO RAM;
_PRESTART, /* startup code */
STARTUP, /* startup data structures */
ROM_VAR, /* constant variables */
STRINGS, /* string literals */
VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */
DEFAULT_ROM,
COPY /* copy down information: how to initialize variables */
INTO ROM; /* ,ROM1: To use "ROM1" as well, pass the option -OnB=b to the compiler */
_DATA_ZEROPAGE, /* zero page variables */
MY_ZEROPAGE INTO Z_RAM;
END
STACKSIZE 0x80
VECTOR 0 _Startup /* Reset vector: this is the default entry point for an application. */