Designer11

Serial Bootloader Memory Re-allocate for Q9S08QG8 question

Discussion created by Designer11 on Feb 25, 2011
Latest reply on Feb 28, 2011 by Designer11

Hi All,

 

I'm new to the bootloader and freescale MCU. What i would like to do is to add the serial bootloader to my firmware, but my problem is how would i segment the memory on my firmware so it works with the bootloader code and won't create any overlap etc...

 

 Firmware .prm file

 

NAMES END SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */    Z_RAM                    =  READ_WRITE   0x0060 TO 0x00FF;    RAM                      =  READ_WRITE   0x0100 TO 0x015F;    ROM                      =  READ_ONLY    0xF000 TO 0xFFAD;    ROM1                     =  READ_ONLY    0xFFC0 TO 0xFFCF; /* INTVECTS                 =  READ_ONLY    0xFFD0 TO 0xFFFF; Reserved for Interrupt Vectors */ENDPLACEMENT /* 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;ENDSTACKSIZE 0x30VECTOR 0 _Startup /* Reset vector: this is the default entry point for an application. */

 

Serial Bootloader .prm file

 

ENTRIES MY_NVOPT MY_NVPROTENDNAMESENDSECTIONS /* here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */  Z_RAM  = READ_WRITE 0x0060 TO 0x00FF;   RAM    = READ_WRITE 0x0100 TO 0x015F;  ROM    = READ_ONLY  0xFE00 TO 0xFFAD;  NVPROTROM = READ_ONLY 0xFFBD TO 0xFFBD;  NVOPTROM  = READ_ONLY 0xFFBF TO 0xFFBF;ENDPLACEMENT /* here all predefined and user segments are placed into the SECTIONS defined above. */  NVPROT_ROM     INTO NVPROTROM;  NVOPT_ROM      INTO NVOPTROM;  DEFAULT_ROM                   INTO ROM;  DEFAULT_RAM                   INTO RAM;  _DATA_ZEROPAGE, MY_ZEROPAGE   INTO Z_RAM;ENDVECTOR 0 main INIT main

 

Thanks,

Outcomes