AnsweredAssumed Answered

PRM File: "be sure the option -OnB=b..."

Question asked by Mehmet Fide on Aug 2, 2007
Latest reply on Aug 3, 2007 by Mehmet Fide
Hi,
 
I'm using LC60 with the prm file below.
NV_SAVE_SEG is where my data are stored in.
FLASH_ROUTINE_SEG is for my flash_write routine.
 
There is a note in Placement Section "ROM1,ROM2 In case you want to use ROM1,ROM2 as well, be sure the option -OnB=b is passed to the compiler."
 
What does exactly this note mean?
If I don't add this option to the compiler, Can't I call flash_write routine in FLASH_ROUTINE_SEG from ROM, ROM1 or ROM2 segment?
 
 
 
Code:
/* This is a linker parameter file for the mc9s08lc60 */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   0x0060 TO 0x00FF;  // 160 byte    RAM                      =  READ_WRITE   0x0100 TO 0x085F;  // 1888 byte    NO_INIT_RAM_SEG          =  NO_INIT      0x0860 TO 0x0C5F;  // 1024 byte    MY_STK                   =  NO_INIT      0x0C60 TO 0x105F;  // 1024 byte    NV_SAVE_SEG              =  READ_ONLY    0x1060 TO 0x12FF;  // reserve 672 (512) byte for NV    ROM1                     =  READ_ONLY    0x1300 TO 0x17FF;    ROM                      =  READ_ONLY    0x1870 TO 0xFEAF;    FLASH_ROUTINE_SEG        =  READ_ONLY    0xFEB0 TO 0xFFAF;    ROM2                     =  READ_ONLY    0xFFC0 TO 0xFFD1;/*  INTVECT                  =  READ_ONLY    0xFFD2 TO 0xFFFF; Reserved for Int. Vectors*/ENDPLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */    _DATA_ZEROPAGE, MY_ZEROPAGE         INTO  Z_RAM;    DEFAULT_RAM                         INTO  RAM;    NO_INIT_RAM                         INTO  NO_INIT_RAM_SEG;    SSTACK                              INTO  MY_STK;    NV_SAVE_AREA                        INTO  NV_SAVE_SEG;    FLASH_ROUTINE_AREA                  INTO  FLASH_ROUTINE_SEG;    _PRESTART, STARTUP, DEFAULT_ROM,     ROM_VAR, STRINGS, COPY              INTO  ROM; /* ROM1,ROM2 In case you want to use ROM1,ROM2                                                      as well, be sure the option -OnB=b                                                       is passed to the compiler. */ENDSTACKSIZE 0x400VECTOR 0 _Startup /* Reset vector: this is the default entry point for an application. */
 
This is a C project.
Regards,
BP.

Outcomes