2024-01-08 04:58 PM
Hi, I am using H743.
I am testing to upgrade my firmware using the FWupgrade_Standalone example.
My firmware worked fine.
However, when I modified the next two lines of the icf file to 0x08020000 to upload to FWupgrade_Standalone, HAL_GetTick returned 0 and it doesn't work.
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x08020000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x08020000;
Is there a solution?
2024-01-25 05:59 AM
Hello @Croaker ,
You must also respect the way it defines the SCB->VTOR on the basis you have chosen in SystemInit().
Please take a look to this post may help.
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-01-25 08:58 AM
Hi @Croaker
It should be OK to set SCB->VTOR to 0x08020000 as we require to locate the VTOR at the beginning of the code region.
But it is easier and more compliant with HAL to change the VECT_TAB_OFFSET, the Vector Table base offset field. This value must be a multiple of 0x200.
In you case, you need to change it as follow:
#define VECT_TAB_OFFSET 0x20000UL
I modified the GPIO example in ~\Repository\STM32Cube_FW_H7_V1.11.1\Projects\NUCLEO-H743ZI\Examples\GPIO\GPIO_EXTI and It is working well.
Please find attached the 2 modified files for your use case. Please search inside ( /* MODIF ) to see the changes in that files.
Best Regards,
Younes
2024-01-25 09:41 AM
Could I please ask the ST move away from using #defines to set the vector address, but rather use the linker symbol created for the Vector Table so it then follows the linker script, scatter file, or .ICF and whatever build address the user selects therein?
2024-01-25 02:12 PM
Excellent request, I will double check the reasons behind using both scatter files and pre-processing macros for code and data mapping configurations !!! then suggest keeping only the configuration inside the scatter files !!
2024-02-06 01:56 AM
Hello @Tesla DeLorean
Yes it is always possible to get the information to put into the SCB->VTOR directly from the linker files. By the way, it is the case for the STM32WB and STM32WL as an MX option.
I suggest to generalize this option, but it will be time consuming to cover. Sections names of scatter files are not the same in the 3 IDE (STM32CubeIDE, EWARM and Keil uvision). Many use-cases, applications without VTOR, applications with one, 2 or more VTORs ....
Best Regards,
Younes