久芯网

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

avatar onebyte 提问时间: 2023-08-03 16:12:50 / 已解决

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

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


如需获得 STM32H 等器件的更多信息,请点击链接或 点击此处 联系在线客服!

3个回答
  • avatar onebyte
    最佳答案
    回答时间: 2023-08-03 16:30:24

    问题终于解决了,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

  • avatar xmshao
    回答时间: 2023-08-03 16:55:07

    你可以参考下ST官方的一个应用笔记AN4296,你去www.st.com/stm32搜索下载之。

  • avatar onebyte
    回答时间: 2023-08-03 17:21:18
    xmshao 发表于 2022-4-1 14:35
    你可以参考下ST官方的一个应用笔记AN4296,你去www.st.com/stm32搜索下载之。

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

会员中心 微信客服
客服
回到顶部