Hi,
I am using MC9S08SG8 microcontroller and the Serial bootloader (AN 2295) provided by freescale for the same.
I am facing certain flash memory space constraints and thus wish to relocate vector table to a different location. According the Bootloader that I am using right now the vector table is auto matically relocated from 0xFFC0 to 0xFDC0 , I wish to relocate it to 0xFBC0 as I wish to use the penultimate sector i.e. 0xFC00 to 0xFDFF for some flash writing. Moreover the sector 0xFA00 to 0xFBFF is partially occupied by my code. I wished to know how to redirect my vector table. Your suggestions would be appreciated.
Regards,
Kirti
Hi Kirti,
The redirection of the vector-table is tied to the flash protection mechanism. The concept is to move the vector table to locations immediately below write-protected flash.
In order to place the vector-table at 0xFBC0, you would need to write-protect 0xFFC0 through 0xFFFF, which means you will not be able to use 0xFFC0 through 0xFDFF for writing. All flash above the vector-table is protected.
Maybe you should allocate your write-able flash first, followed by your code, followed by the vector-table, and finally followed by protected-flash containing the bootstrap.