I use the chip STM32F103C8
, you can refer to the process to select different parameters to modify.
CPU: STM32F103C8
MDK5 software simulation prompts that there is no read and write permission, and it can only be run step by step. The prompt code is as follows:
*** error 65: access violation at 0x40011800 : no 'read' permission
The root cause is: there is a problem with the permission mapping of the map address space. Part of the address space does not have read and write permissions, causing the program to not run automatically.
Increase the map address space permission mapping.
According to the introduction of network resources, there are roughly three methods:
Mainly configure the relevant parameters according to the engineering chip model
The file corresponding to the specific chip click keil -file→device database
The parameter in this row is the sim parameter corresponding to the chip
Under the debugging page, select the Memory Map option under the DEBUG tab as shown in the figure below
The map address mapping can be added according to the error prompt.
(indicating that it has not been used)
Create a new debug.ini
file in the project file, and add the map address permission mapping code to the file
like
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
The specific map address permission mapping can also be viewed in the memory Map option in the debugging interface.