New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow VECT_TAB_OFFSET to be overridden externally (IDE or Makefile) #10
base: master
Are you sure you want to change the base?
Conversation
Hi @pieterconradie, Thank you for your suggestion and contribution. A fix for this code below: STM32CubeL0/Drivers/CMSIS/Device/ST/STM32L0xx/Source/Templates/system_stm32l0xx.c Lines 80 to 85 in 8b26821
will be published as soon in in future release (STM32L0Cube V1.12.0) looks like the following: + #if defined(USER_VECT_TAB_ADDRESS)
/* #define VECT_TAB_SRAM */
+ #if defined(VECT_TAB_SRAM)
+ #define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field.
+ This value must be a multiple of 0x200. */
+ #define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
+ This value must be a multiple of 0x200. */
+ #else
+ #define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
+ This value must be a multiple of 0x200. */
+ #define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
+ This value must be a multiple of 0x200. */
+ #endif /* VECT_TAB_SRAM */
+ #endif /* USER_VECT_TAB_ADDRESS */ Thank you again for your contribution. With regards, |
@RKOUSTM Thanks for attending to the pull request so quickly :) I am probably missing something but I can not see from the solution above how VECT_TAB_OFFSET can be overridden(?). In both cases above it is #defined as 0x00000000U Should it not be:
Thanks in advance, |
Hi @pieterconradie, Thank you for your contribution. The vector table is updated by a generic preprocessor directive
Thank you again for your contribution. With regards, |
I've the same concern than @pieterconradie |
Hi @pieterconradie, I hope you are fine. The issue you reported has been fixed in the frame of version v1.12.0 of the STM32CubeL0 published on GitHub. Thank you again for having reported. With regards, |
See also STM32CubeF4#30. |
See also STM32CubeF4#64. |
ST Internal Reference: 116475 |
Hi @pieterconradie, I hope you are fine. We reopened the point as the current implementation does not address the requirement to be able to redefine We will get back to you as soon as we get feedback from our development teams. With regards, |
It is useful to allow VECT_TAB_OFFSET to be overridden externally in the IDE or Makefile. This allows the Vector Table Offset to be at 0 for a debug build and the Vector Table Offset to be moved for a release build that has to accommodate a bootloader.
IMPORTANT INFORMATION
Contributor License Agreement (CLA)