首页 > 解决方案 > st8s013f2控制器中的stm8地址范围错误读取访问

问题描述

我在 ST Visual Studio(汇编语言)的模拟器模式下使用 stm8s103f2p 控制器,在编译我的一个示例文件期间,我收到错误“读取访问超出 stm8 地址范围”。

映射文件:字节;以下地址是 0-ff 'ram0' 处的 8 位长段字节

WORDS           ; The following addresses are 16 bits long
segment byte at 100-1ff 'ram1'

WORDS           ; The following addresses are 16 bits long
segment byte at 200-3ff 'stack'

WORDS           ; The following addresses are 16 bits long
segment byte at 4000-427F 'eeprom'

WORDS           ; The following addresses are 16 bits long
segment byte at 8080-8FFF 'rom'

WORDS           ; The following addresses are 16 bits long
segment byte at 8000-807F 'vectit'

源文件:stm8/

#include "mapping.inc"

 segment 'rom'

。主要的: ; 示例代码 CPL A

end

标签: assemblymicrocontrollermemory-mappingstm8

解决方案


推荐阅读