2015-06-15 04:35 PM
In the latest HAL on the F1 (and F4) (http://www.st.com/st-web-ui/static/active/cn/resource/technical/document/user_manual/DM00154pdf )
Doesnt seem to contain
NVIC_SetVectorTable(NVIC_VectTab_FLASH, USER_PROG_OFFSET);
Hence there is no HAL way to change the Vector table start address (to account for the use of a bootloader etc)
Is the preferred method to change
SCB->VTOR
in main ?
2015-06-15 05:06 PM
In the CMSIS/SPL mechanics the vector table, and clocks, are generally set via a call into SystemInit(), which is called prior to the initialization of the statics, and a call to main()
I generally prefer SCB->VTOR, primarily because it's unambiguous, none of the base+offset stuff, just pointing directly at the table.2015-06-15 05:31 PM
I can see that SCB->VTOR is initially setup in SystemInit()
However I was looking for a solution where I did not need to change any of the ''Template'' files from the output of CubeMX i.e I want to ''generate'' separate HAL code folders for different processors (F1 and F4), and be able to select at compile time, which HAL to use I also wanted to be able to update the HAL folders if there is an update to CubeMX However, I think you are saying that I need to change the ''template'' files generated by CubeMX to achieve what I want. This is OK, because I guess the CubeMX does not change very often. I just want to make sure I do things correctly.