硬汉嵌入式论坛

 找回密码
 立即注册
查看: 2331|回复: 4
收起左侧

[BOOT/IAP] stm32h7程序下载到sram中不能产生systick中断

[复制链接]

3

主题

4

回帖

13

积分

新手上路

积分
13
发表于 2019-4-19 10:35:23 | 显示全部楼层 |阅读模式
IAR,STM32H750,使用例程STM32Cube_FW_H7_V1.3.2\Projects\STM32H743I_EVAL\Examples\GPIO,程序下载到内部flash中运行可以产生systick中断;但是更换icf文件后下载到sram中,不能产生systick中断,请问是什么原因?

/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x24000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__     = 0x24000000;
define symbol __ICFEDIT_region_ROM_end__       = 0x2403FFFF;
define symbol __ICFEDIT_region_RAM_start__     = 0x24040000;
define symbol __ICFEDIT_region_RAM_end__       = 0x2407FFFF;
define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000;
define symbol __ICFEDIT_region_ITCMRAM_end__   = 0x0000FFFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
define symbol __ICFEDIT_size_heap__   = 0x200;
/**** End of ICF editor section. ###ICF###*/


define memory mem with size = 4G;
define region ROM_region      = mem:[from __ICFEDIT_region_ROM_start__   to __ICFEDIT_region_ROM_end__];
define region RAM_region      = mem:[from __ICFEDIT_region_RAM_start__   to __ICFEDIT_region_RAM_end__];
define region ITCMRAM_region  = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__];

define block CSTACK    with alignment = 8, size = __ICFEDIT_size_cstack__   { };
define block HEAP      with alignment = 8, size = __ICFEDIT_size_heap__     { };

initialize by copy { readwrite };
do not initialize  { section .noinit };

place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };

place in ROM_region   { readonly };
place in RAM_region   { readwrite,
                        block CSTACK, block HEAP };
回复

使用道具 举报

3

主题

4

回帖

13

积分

新手上路

积分
13
 楼主| 发表于 2019-4-19 11:21:12 | 显示全部楼层
找到原因了,因为中断向量定位问题
  /* Configure the Vector Table location add offset address ------------------*/
#ifdef VECT_TAB_SRAM
  SCB->VTOR = D1_AXISRAM_BASE  | VECT_TAB_OFFSET;       /* Vector Table Relocation in Internal SRAM */
#else
  SCB->VTOR = FLASH_BANK1_BASE | VECT_TAB_OFFSET;       /* Vector Table Relocation in Internal FLASH */
#endif  
要在IAR中定义VECT_TAB_SRAM
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
107101
QQ
发表于 2019-4-19 11:48:57 | 显示全部楼层
谢谢告知原因
回复

使用道具 举报

7

主题

48

回帖

69

积分

初级会员

积分
69
发表于 2019-4-20 22:50:09 | 显示全部楼层
我心平静 发表于 2019-4-19 11:21
找到原因了,因为中断向量定位问题
  /* Configure the Vector Table location add offset address ------ ...

KEIL中如何实现?
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
107101
QQ
发表于 2019-4-20 23:07:53 | 显示全部楼层
KAIXIN 发表于 2019-4-20 22:50
KEIL中如何实现?

基于STM32H7的内部SRAM程序调试工程模板(512KB的AXI SRAM存程序,DTCM做主RAM)
http://www.armbbs.cn/forum.php?m ... 3112&fromuid=58
(出处: 安富莱电子论坛)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-5-17 19:50 , Processed in 0.264265 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表