Skip to content
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

Repository forces one to fork it, if it is necessary to move the vector table #1

Open
Krensi opened this issue Oct 4, 2021 · 3 comments
Assignees
Labels
cmsis CMSIS-related issue or pull-request. enhancement New feature or request internal bug tracker Issue confirmed and reported into a ticket in the internal bug tracking system.

Comments

@Krensi
Copy link

Krensi commented Oct 4, 2021

In the file "system_stm32g4xx.c" it is necessary to uncomment a line (see code below) to change the vector table offset. I included this repository as a submodule. Therefore, I am forced to fork this repo in order to uncomment the line and commit the change.

A simple #ifdef condition could solve this.

#if defined(USER_VECT_TAB_ADDRESS) /*!< Uncomment the following line if you need to relocate your vector Table in Sram else user remap will be done in Flash. */ /* #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 */

@ALABSTM ALABSTM self-assigned this Oct 21, 2021
@ALABSTM
Copy link
Collaborator

ALABSTM commented Oct 25, 2021

Hi @Krensi,

Thank you for having reported the point. Indeed, currently, it is not possible to redefined the VECT_TAB_OFFSET unless by manually editing the system_stm32g4xx.c file.

https://github.com/STMicroelectronics/cmsis_device_g4/blob/3a3a8909720e37bece786f6011ba865951b369c8/Source/Templates/system_stm32g4xx.c#L120

The point has been forwarded to our development teams. We will get back to you as soon as they provide their feedback.

With regards,

@ALABSTM ALABSTM added enhancement New feature or request internal bug tracker Issue confirmed and reported into a ticket in the internal bug tracking system. labels Oct 25, 2021
@ALABSTM
Copy link
Collaborator

ALABSTM commented Oct 25, 2021

ST Internal Reference: 116475

@PennRobotics
Copy link

PennRobotics commented Nov 2, 2021

Unless I'm misunderstanding the issue, what is the negative to using git update-index --assume-unchanged system_stm32g4xx.c to modify this locally without git reporting an out-of-sync repo while still attempting to merge future changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmsis CMSIS-related issue or pull-request. enhancement New feature or request internal bug tracker Issue confirmed and reported into a ticket in the internal bug tracking system.
Projects
None yet
Development

No branches or pull requests

3 participants