你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

STM32H 在IAR中如何实现从FLASH加载到SRAM中运行程序

[复制链接]
onebyte 提问时间:2022-4-1 14:13 / 已解决

如题,STM32H 在IAR中如何实现从FLASH加载到SRAM中运行程序

有没有相关的例程可供参考

收藏 评论3 发布时间:2022-4-1 14:13

举报

3个回答
onebyte 最优答案 回答时间:2022-4-2 14:40:32

问题终于解决了,IAR9.1按照AN4296操作,是不可以的,把放到RAM中的程序先定义到block,再定义到section

具体操作是

Introduction

This Technical Note sorts out an issue in version 5.xx of IAR Embedded Workbench for ARM.

Background

The issue is that the documentation is unclear on this topic.

Information

The __ramfunc functions are placed in the section .textrw The placement can be done as in this example. In the .icf file do:

define symbol __RAM_func_start__ = 0x00200000;
define symbol __RAM_func_end__ = 0x00207FFF;
define region RAM_func_region = mem:[from __RAM_func_start__ to __RAM_func_end__];

define block RamCode {section .textrw};
place in RAM_func_region { block RamCode };
initialize by copy {readwrite};

Note that...

...this Technical Note does not apply to IAR Embedded Workbench ARM versions 5.10 and 5.11 , where the IAR ILINK Linker worked in another way.

All product names are trademarks or registered trademarks of their respective owners

xmshao 回答时间:2022-4-1 14:35:13
你可以参考下ST官方的一个应用笔记AN4296,你去www.st.com/stm32搜索下载之。
onebyte 回答时间:2022-4-1 16:20:38

xmshao 发表于 2022-4-1 14:35
你可以参考下ST官方的一个应用笔记AN4296,你去www.st.com/stm32搜索下载之。

谢谢,按文档里的内容仿真的时候有些问题,所报的内容如下,程序实际也不能运行

image.png

关于意法半导体
我们是谁
投资者关系
意法半导体可持续发展举措
创新和工艺
招聘信息
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
关注我们
st-img 微信公众号
st-img 手机版