韦东山Linux嵌入式课程社区
直播中

宋令怡

7年用户 202经验值
私信 关注

请问我能通过修改配置文件的方式来默认关闭MMU和D-Cache吗?

widon@widon-laptop:~$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> halt
target state: halted
target halted in ARM state due to debug request, current mode: Supervisor
cpsr: 0x60000093 pc: 0xc012e484
MMU: enabled, D-Cache: enabled, I-Cache: enabled
> mdw 0x0
memory read caused data abort (address: 0x00000000, size: 0x4, count: 0x1)
Failure examining memory
>
可不可以通过修改配置文件的方式来
默认关闭MMU和D-Cache
而不用每次都输入arm920t cp15 2 0

回帖(2)

杜茂仁

2019-11-5 06:59:17
应该可以,试试在openocd.cfg里调用脚本,比如:
script ....
举报

王侃

2019-11-5 07:14:35
这个。。。我是新手。。。。
我在openocd.cfg加入了
script /work/eclipse_projects/closeMMU.sh
widon@widon-laptop:~$ cat /work/eclipse_projects/closeMMU.sh
arm920t cp15 2 0

widon@widon-laptop:~$ openocd -f /work/eclipse_projects/openocd.cfg
Open On-Chip Debugger 1.0 (2008-10-04-09:26) svn:717
$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
Info:    options.c:50 configuration_output_handler(): jtag_speed: 0, 0
Info:    options.c:50 configuration_output_handler(): Open On-Chip Debugger 1.0 (2008-10-04-09:26) svn:717
Info:    options.c:50 configuration_output_handler(): fast memory access is enabled
Info:    options.c:50 configuration_output_handler(): target must be stopped for "cp15" command
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x0032409d (Manufacturer: 0x04e, Part: 0x0324, Version: 0x0)
Info:    server.c:78 add_connection(): accepting 'telnet' connection from 0
User:    target.c:957 target_arch_state(): target state: running
User:    target.c:957 target_arch_state(): target state: halted
User:    arm920t.c:574 arm920t_arch_state(): target halted in ARM state due to debug request, current mode: Supervisor
cpsr: 0x40000013 pc: 0xc009585c
MMU: enabled, D-Cache: enabled, I-Cache: enabled

widon@widon-laptop:~$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> poll
target state: running
> halt
target state: halted
target halted in ARM state due to debug request, current mode: Supervisor
cpsr: 0x40000013 pc: 0xc009585c
MMU: enabled, D-Cache: enabled, I-Cache: enabled
>
好象不行罗哦:Q
举报

更多回帖

发帖
×
20
完善资料,
赚取积分