STM32F4 MDK5软件仿真 error : no ‘read’ permission
**本文内容参考自:**https://www.cnblogs.com/houlinfeng/p/10382025.html
问题描述
CPU:STM32F429
MDK5软件模拟提示没有读写权限,只能一步一步运行。提示代码如下:
*** error 65: access violation at 0x40023800 : no ‘read’ permission
*** error 65: access violation at 0x40023800 : no ‘write’ permission
*** error 65: access violation at 0x40023808 : no ‘write’ permission
*** error 65: access violation at 0x40023800 : no ‘read’ permission
*** error 65: access violation at 0x40023800 : no ‘write’ permission
根本原因是:map地址空间权限映射有问题。部分地址空间没有读写的权限,造成程序不能自动运行。
解决方法
增加map地址空间权限映射。
在工程配置选项中的debug选项卡,直接添加正确的Initialization file。
工程文件中新建“debug,ini”文件(文件一定放在工程的目录中),在文件中添加map地址权限映射代码
map 0x40000000, 0x40007FFF read write // APB1
map 0x40010000, 0x400157FF read write // APB2
map 0x40020000, 0x4007FFFF read write // AHB1
map 0x50000000, 0x50060BFF read write // AHB2
map 0x60000000, 0x60000FFF read write // AHB3
map 0xE0000000, 0xE00FFFFF read write // CORTEX-M4 internal peripherals