2020-04-05 06:51 PM
Hello, everyone!
I am using STM32CubeIDE and STM32H753VI.
I have to write the code written on Sector 0 of Bank 2, not Sector 0 of Flash Memory Bank 1.
I modified the VECT_TAB_OFFSET value in the system_stm32h7xx.c file as follows to process this work.
#define VECT_TAB_OFFSET 0x00100000UL
After that, STM32CubeIDE was used to change to debug mode and pressed the Resume button, and the following window came out.
The View Disassembly is as follows.
Why did this happen? How can I solve this?
2020-04-05 11:28 PM
anyone? ;(
2020-04-06 08:41 AM
I don't use H7. What is at 0x00100000UL? Executable RAM? Did you actually copy the vector table there? How is that area set in MPU?
JW
2020-04-06 12:56 PM
0x00100000 indeed is Sector 0 of Bank 2. Is this the actual location of your code in flash? We cannot know without the .ld file.
2020-04-06 01:10 PM
People, it is added to the BASE of FLASH, it is not an absolute value
The STM32H7 probably isn't going to auto-magically jump there, and the bank swap would likely map it to 0x08000000, which wouldn't help if all the table entries pushed up at 0x08100000
Do you transfer control from Bank 1, or set any Option Bytes to facilitate this address?
If it faults before SCB->VTOR is set up, it might pull an 0xFFFFFFFF value from blank flash.
2020-04-06 05:05 PM
What is the method of setting up an Option Bytes to facilitate this address?
2020-04-06 05:52 PM
Are you asking how to set option bytes? With CubeProgrammer for example.
2020-04-06 06:02 PM
Yes, and the other question I have is whether my program can work normally just by setting up an option byte.
In fact, I used the IAR embedded workbench, where when I changed the vector table value from the project option, the program was downloaded to the location I wanted.I'm trying to change the compile tool with STM32CubeIDE, but it's not as easy as I thought.
2020-07-21 11:27 PM
i had a same issue at debugging time . i had some break points in the main.c ,i removed all the break points .then it works fine
i do not know whether it work for you or not .just try it, thank you.:smiling_face_with_smiling_eyes: