Hi,
I created a custom bootloader for the MSP430F2618 using the TI examples in SLAA600 in CCS v5. The reset vector points to the bootloader which decides whether to jump to the app or wait for a download and the interrupt vectors are redirected using code below. Everything worked really well but now we have a project that's gotten fairly large and I need to access the extended flash region from the bootloader.
I can't go to the large memory model or my interrupt redirection falls apart because it tries to map my redirected vector table using 20 bit addresses which means it won't fit into the fixed location of the interrupt table and I can't access the extended memory without going to 20 bit pointers.
extern Uint16 _App_Proxy_Vector_Start[]; // Proxy table address defined in CMD
// Macro used to calculate address of vector in application proxy table
#define APP_PROXY_VECTOR(x) ((Uint16)&_App_Proxy_Vector_Start[x*2])
// Constant table of MSPBoot Vector table: It's fixed since it can't be erased
// and modified. Points to a proxy vector table in application area.
#pragma DATA_SECTION(Vector_Table, ".BOOT_VECTOR_TABLE")
#pragma RETAIN(Vector_Table)
const Uint16 Vector_Table[] =
{
UNUSED, // FFC0 = Unused
UNUSED, // FFC2 = Unused
UNUSED, // FFC4 = Unused
UNUSED, // FFC6 = Unused
UNUSED, // FFC8 = Unused
UNUSED, // FFCA = Unused
UNUSED, // FFCC = Unused
UNUSED, // FFCE = Unused
UNUSED, // FFD0 = Unused
UNUSED, // FFD2 = Unused
UNUSED, // FFD4 = Unused
UNUSED, // FFD6 = Unused
UNUSED, // FFD8 = Unused
UNUSED, // FFDA = Unused
APP_PROXY_VECTOR(0), // FFDC = DAC12
APP_PROXY_VECTOR(1), // FFDE = DMA
APP_PROXY_VECTOR(2), // FFE0 = UCAB1TX
APP_PROXY_VECTOR(3), // FFE2 = UCAB1RX
APP_PROXY_VECTOR(4), // FFE4 = P1
APP_PROXY_VECTOR(5), // FFE6 = P2
UNUSED, // FFE8 = Unused
APP_PROXY_VECTOR(6), // FFEA = ADC12
APP_PROXY_VECTOR(7), // FFEC = UCAB0TX
APP_PROXY_VECTOR(8), // FFEE = UCAB0RX
APP_PROXY_VECTOR(9), // FFF0 = TACCR1,TACCR2,TAIFG
APP_PROXY_VECTOR(10), // FFF2 = TACCR0
APP_PROXY_VECTOR(11), // FFF4 = WDT
APP_PROXY_VECTOR(12), // FFF6 = Comparator A+
APP_PROXY_VECTOR(13), // FFF8 = TBCCR1, TBCCR6, TBIFG
APP_PROXY_VECTOR(14), // FFFA = TBCCR0
APP_PROXY_VECTOR(15), // FFFC = NMI,Oscillator,Flash access violation
};
Does anybody have any suggestions? I'm not sure how to proceed from here and I fear this will lead to an assembly solution and I'm a novice at best.
Thanks,
Justin