GithubHelp home page GithubHelp logo

Comments (8)

theadib avatar theadib commented on August 22, 2024 1

please ST
the register holding the vector address should be written as part of the startup code in any case.
not only when USER_ADDRESS is defined.

SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET;

from stm32cubef4.

RKOUSTM avatar RKOUSTM commented on August 22, 2024

Hi @theadib,

Thank you for this report. You request will be forwarded to our development teams. We will be back to you as soon as we get feedback.

Thank you for your patience and thank you again for your contribution.

With regards,

from stm32cubef4.

RKOUSTM avatar RKOUSTM commented on August 22, 2024

Hi @theadib,

Thank you for your contribution. Our development teams confirmed the issue you pointed out. The fix below will be available in the next release.

+ #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 */

I hope this answer helps. If you have no other question about this subject, I think this issue can be closed.

With regards,

from stm32cubef4.

RKOUSTM avatar RKOUSTM commented on August 22, 2024

ST Internal Reference: 76137

from stm32cubef4.

fpistm avatar fpistm commented on August 22, 2024

Hi @RKOUSTM

In STM32duino, it is possible to redefine VECT_TAB_OFFSET to use a bootloader.
In a general way Bootloader is stored at the beginning of the FLASH, in that case the VECT_TAB_OFFSET is set to the SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; where offset is set after the BL.

With the USER_VECT_TAB_ADDRESS I don't understand how we can properly set it as the VECT_TAB_OFFSET is always 0.
This only allow to set it to SRAM or FLASH.

from stm32cubef4.

RKOUSTM avatar RKOUSTM commented on August 22, 2024

Hi @fpistm,

Thank you for your contribution. The above fix is proposed to mention if we are on FLASH or SRAM, and if we want to apply a different Offset value, as in the STM32WL, the following:

/* #define VECT_TAB_SRAM */
#if defined(VECT_TAB_SRAM)
#define VECT_TAB_BASE_ADDRESS   SRAM2_BASE      /*!< Vector Table base address field.
                                                     This value must be a multiple of 0x100. */
#define VECT_TAB_OFFSET         0x00008000U     /*!< Vector Table base offset field.
                                                     This value must be a multiple of 0x100. */
#else
#define VECT_TAB_BASE_ADDRESS   FLASH_BASE      /*!< Vector Table base address field.
                                                     This value must be a multiple of 0x100. */
#define VECT_TAB_OFFSET         0x00020000U        /*!< Vector Table base offset field.
                                                     This value must be a multiple of 0x100. */
#endif

Thank you again for your contribution.

With regards,

from stm32cubef4.

fpistm avatar fpistm commented on August 22, 2024

Thanks for the feedback @RKOUSTM
But I think the OP request concern the VECT_TAB_OFFSET not if we are on FLASH or SRAM.
Anyway you answered my question and will update STM32duino to also be able to redefine VECT_TAB_OFFSET

from stm32cubef4.

RKOUSTM avatar RKOUSTM commented on August 22, 2024

Hi @theadib,

I hope you are fine. The issue you reported has been fixed in the frame of version v1.26.0 of the STM32CubeF4 published recently on GitHub.

Thank you again for having reported.

With regards,

from stm32cubef4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.