template file system_stm32g4xx.c should support userdefined location of vectortable #41
Labels
cmsis
CMSIS-related issue or pull-request.
enhancement
New feature or request
internal bug tracker
Issue confirmed and logged into the internal bug tracking system
spotted before customer
Spotted internally before being pointed out by the user but not yet fixed or published
Caution
The Issues are strictly limited for the reporting of problem encountered with the software provided in this project.
For any other problem related to the STM32 product, the performance, the hardware characteristics and boards, the tools the environment in general, please post a topic in the ST Community/STM32 MCUs forum.
Describe the set-up
Describe the bug
Same as STMicroelectronics/STM32CubeF4#30
`A clear and concise description of what the bug is.
template file system_stm32g4xx.c should support userdefined location of vectortable
using a custom bootloader requires to move the default location of the vector table.
in the file system_stm32g4xx.c that is copied by the program generator is the needed settings for the move of the vector table.
But the user can not control this behaviour by compiler command arguments
in the defines section at the beginning of the file line 92ff
the lines:
/* #define VECT_TAB_SRAM /
#define VECT_TAB_OFFSET 0x00 /!< Vector Table base offset field.
This value must be a multiple of 0x200. /
/*****************************************************************************/
have to be changed to
/* #define VECT_TAB_SRAM /
#if !defined(VECT_TAB_OFFSET)
#define VECT_TAB_OFFSET 0x00 /!< Vector Table base offset field.
This value must be a multiple of 0x200. /
#endif
/*****************************************************************************/
So the user can control the define from compiler command arguments.
This allows targets for bootloader or plain memory layout.
All the existing code will not break.`
How To Reproduce
Indicate the global behavior of your application project.
The modules that you suspect to be the cause of the problem (Driver, BSP, MW ...).
The use case that generates the problem.
How we can reproduce the problem.
Additional context
If you have a first analysis or patch correction, thank you to share your proposal.
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: