STMicroelectronics / STM32CubeG4

STM32Cube MCU Full Package for the STM32G4 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
182 stars 98 forks source link

template file system_stm32g4xx.c should support userdefined location of vectortable #41

Open marcgendron-dyze opened 1 year ago

marcgendron-dyze commented 1 year ago

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 https://github.com/STMicroelectronics/STM32CubeF4/issues/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

  1. Indicate the global behavior of your application project.

  2. The modules that you suspect to be the cause of the problem (Driver, BSP, MW ...).

  3. The use case that generates the problem.

  4. 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.

ALABSTM commented 1 year ago

Hi @marcgendron-dyze,

Thank you for this report. We are already aware of this point and are working on a global update. We will let you know once a fix is published. We cannot share a date for the moment. Thank you for your comprehension.

With regards,

ALABSTM commented 8 months ago

ST Internal Reference: 116475