Interrupt Vector Offset
Posted: Mon Jan 30, 2012 11:45 pm
Hi Giovanni,
We have 2.3.4 running on PiXCL Decaf-1 and Decaf-2 (STM32F103VE) boards, loaded at the std 0x800 0000.
We have also developed a USB Device Firmware Update (DFU) utility that sits at 0x800 0000 - 800 2FFF. Our test code (some LCD and graphics primitives) that's built to load at 0x800 3000 runs fine. We adjust the linker script to be
MEMORY
{
flash : org = 0x08003000, len = 512k - 0x3000
ram : org = 0x20000000, len = 64k
}
and issue a vector table remap command
(NVIC_SetVectorTable(NVIC_VectTab_FLASH, InterruptVectorAddress)
as the first line of main().
When our DFU code only runs, the boards appear as a USB DFU Device, and we can load the test binary (a .BIN converted to .DFU). When the combined flash load is booted, the core DFU code checks for a flag at 0x800 3000 and if found jumps there and starts execution, and the USB DFU Device mode never appears.
We did the same build exercise with 2.3.4, but there's two problems. The DFU mode never gets unset, and 2.3.4 tries to start and then jams: the usual LEDs light up but don't blink, no USART output, suggesting that the blinker thread has run through once.
We see the vector.c file that includes the vector table, so it seems that we have missed something that relocates the vectors. Suggestions?
In the Makefile, I see "# Enable this if you really want to use the STM FWLib."
Can you clarify why we would or would not use the FWLib?
regards
We have 2.3.4 running on PiXCL Decaf-1 and Decaf-2 (STM32F103VE) boards, loaded at the std 0x800 0000.
We have also developed a USB Device Firmware Update (DFU) utility that sits at 0x800 0000 - 800 2FFF. Our test code (some LCD and graphics primitives) that's built to load at 0x800 3000 runs fine. We adjust the linker script to be
MEMORY
{
flash : org = 0x08003000, len = 512k - 0x3000
ram : org = 0x20000000, len = 64k
}
and issue a vector table remap command
(NVIC_SetVectorTable(NVIC_VectTab_FLASH, InterruptVectorAddress)
as the first line of main().
When our DFU code only runs, the boards appear as a USB DFU Device, and we can load the test binary (a .BIN converted to .DFU). When the combined flash load is booted, the core DFU code checks for a flag at 0x800 3000 and if found jumps there and starts execution, and the USB DFU Device mode never appears.
We did the same build exercise with 2.3.4, but there's two problems. The DFU mode never gets unset, and 2.3.4 tries to start and then jams: the usual LEDs light up but don't blink, no USART output, suggesting that the blinker thread has run through once.
We see the vector.c file that includes the vector table, so it seems that we have missed something that relocates the vectors. Suggestions?
In the Makefile, I see "# Enable this if you really want to use the STM FWLib."
Can you clarify why we would or would not use the FWLib?
regards