Hello, i'm a newbie in this bootloader section i need some help to understand vector redirection without hw support.
I have a bootloader project developed MC9S08QE64 which doesn't have hw vector redirection and an application project, thisi is application prm:
/* This is a linker parameter file for the mc9s08qe64 */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 0x0080 TO 0x00FF; RAM = READ_WRITE 0x0100 TO 0x107F; /* unbanked FLASH ROM */ ROM = READ_ONLY 0x2080 TO 0x7FFF; //ROM = READ_ONLY 0x2090 TO 0x3FFF; //ROM = READ_ONLY 0x2080 TO 0x3FFF; //ORIGINAL VALUE!! ROM1 = READ_ONLY 0xC000 TO 0xFFAD; /* INTVECTS = READ_ONLY 0xFFC0 TO 0xFFFF; Reserved for Interrupt Vectors */ /* banked FLASH ROM */ PPAGE_0 = READ_ONLY 0x008000 TO 0x00A08F; /* PAGE partially contained in ROM segment */ //PPAGE_0 = READ_ONLY 0x008000 TO 0x00A07F; //ORIGINAL VALUE!!/* PAGE partially contained in ROM segment */ PPAGE_2 = READ_ONLY 0x028000 TO 0x02BFFF; //PPAGE_1 = READ_ONLY 0x018000 TO 0x01BFFF; //PAGE already contained in segment at 0x4000-0x7FFF */ //PPAGE_3 = READ_ONLY 0x038000 TO 0x03BFFF; //PAGE already contained in segment at 0xC000-0xFFFF */ //PPAGE_3 = READ_ONLY 0x038000 TO 0x03BFAD; /* vectors are at 0xFFAE(banked 0x3BFAE*/ //0x03BFFF;*/ /* this is the same like nonbanked 0xC000-0xFFFF */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 */ NON_BANKED, /* runtime routines which must not be banked */ COPY /* copy down information: how to initialize variables */ INTO ROM; /* ,ROM1: To use "ROM1" as well, pass the option -OnB=b to the compiler */ DEFAULT_ROM, PAGED_ROM /* routines which can be banked */ INTO PPAGE_0,PPAGE_2,ROM,ROM1;//PPAGE_1,PPAGE_3; _DATA_ZEROPAGE, /* zero page variables */ MY_ZEROPAGE INTO Z_RAM;ENDSTACKSIZE 0xC0//VECTOR 0 _Startup /* Reset vector: this is the default entry point for an application. */
Could somebody explain with a simple example how to use vector redirection with jump table ( it seems to that i have to use this way to create a single project )?
This under is the bootloader prm ( i have surely to modify it...
// This is a linker parameter file for the mc9s08qe128NAMES ENDSEGMENTS Z_RAM = READ_WRITE 0x0080 TO 0x00FF; RAM = READ_WRITE 0x0100 TO 0x17FF; RAM1 = READ_WRITE 0x1880 TO 0x207F; //unbanked FLASH ROM USER_VECT = READ_ONLY 0xD7A0 TO 0xD7FF; //user interrupt vectors USER_DATA = READ_ONLY 0xD800 TO 0xDFFF; //user data BOOT_DATA = READ_ONLY 0xE000 TO 0xE01F; //boot code BOOT_CODE = READ_ONLY 0xE020 TO 0xFFAD; //boot code BOOT_VECT = READ_ONLY 0xFFC0 TO 0xFFFF; //boot interrupt vectors //banked FLASH ROM PPAGE_0 = READ_ONLY 0x008000 TO 0x00A07F; //PAGE partially contained in ROM segment //PPAGE_1 = READ_ONLY 0x018000 TO 0x01BFFF; //PAGE already contained in segment at 0x4000-0x7FFF PPAGE_2 = READ_ONLY 0x028000 TO 0x02BFFF; //PPAGE_3 = READ_ONLY 0x038000 TO 0x03BFFF; //PAGE already contained in segment at 0xC000-0xFFFF PPAGE_4 = READ_ONLY 0x048000 TO 0x04BFFF; PPAGE_5 = READ_ONLY 0x058000 TO 0x05BFFF; PPAGE_6 = READ_ONLY 0x068000 TO 0x06BFFF; PPAGE_7 = READ_ONLY 0x078000 TO 0x07BFFF; ENDPLACEMENT DEFAULT_RAM INTO RAM,RAM1; ISR_USER // INTO USER_VECT; // ISR_BOOT // INTO BOOT_VECT; // _PRESTART, // startup code STARTUP, // startup data structures ROM_VAR, // constant variables DEFAULT_ROM, STRINGS, // string literals VIRTUAL_TABLE_SEGMENT, // C++ virtual table segment NON_BANKED, // runtime routines which must not be banked COPY // copy down information: how to initialize variables INTO BOOT_CODE; // ,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 0x0200
I know that is really a newbie question but vector redirection in this case is not so clear to me...
Thanks in advance to anyone!