1026 views|2 replies

407

Posts

7

Resources
The OP
 

[Distributed temperature and humidity acquisition system] + STM32H7-IAR environment online simulation RAM operation [Copy link]

 

Debugging platform STM32H745XI-DISCO, software IAR9.10.2

1> Define the starting address of the interrupt space vector table in the ICF file

define symbol __ICFEDIT_intvec_start__ = 0x24000000;

2> Define the start and end addresses of the code area in the ICF file

define symbol __ICFEDIT_region_ROM_start__ = 0x24000000;
define symbol __ICFEDIT_region_ROM_end__ = 0x2403FFFF;

3> In IAR's Workspace->Project->Option->Debugger->Download, check Use falsh loader

I feel like it's all right now. I tried compiling it. It works fine at first, but once an interrupt occurs, the program crashes. What's going on?

Although we compiled the program to the starting address of the interrupt space vector table, when the CPU runs, it has a default address of 0x0800 0000.

This requires us to change this register, SCB->VTOR, during initialization.

4>In IAR's Workspace->Project->Option->C/C++ Compiler's Preprocessor under Defined symbols,

Added USER_VECT_TAB_ADDRESS, VECT_TAB_SRAM.

The starting point is to change SCB->VTOR to 0x24000000.

When the program runs to the main function, it needs to have some initialization code, some key configurations, including stack, variables that need to be initialized, etc.

This post is from DigiKey Technology Zone

Latest reply

After changing this register, SCB->VTOR, the program will not fly?   Details Published on 2023-3-5 22:11
 
 

1662

Posts

0

Resources
2
 

After changing this register, SCB->VTOR, the program will not fly?

This post is from DigiKey Technology Zone

Comments

You can try it, maybe this is the only step missing. From my debugging experience, modifying SCB->VTOR is a necessary step, so pay attention to it.  Details Published on 2023-3-6 08:35
 
 
 

407

Posts

7

Resources
3
 
Hot Ximi Show posted on 2023-3-5 22:11 After changing this register, SCB->VTOR, will the program stop flying?

You can try it, maybe this is the only step missing. From my debugging experience, modifying SCB->VTOR is a necessary step, so pay attention to it.

This post is from DigiKey Technology Zone
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list