keil中下载程序界面设置

下午在调试DAU的时候忽然出现internal command error的情况,以往是将下载器重新上电或编译器重启既可,但是今天这一招怎么也不灵光了,换一个硬件可以正常下载。不死心,试着修改下载器选项,当Connect选择为Under Reset 时,终于能够下载了,重新切换到normal或with Pre-reset还是不行。于是看了网上别人的经历,才知道Keil还有自己的使用手册,里面还挺全的,平时真没好好利用下这些看不起眼的资源。手册上写了一句话,用户不小心关闭JTAG/SW,不管对错,先在程序里加了一句:

GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable,ENABLE);//关闭jtag,保留swd

烧录进去,接着切换到normal或with Pre-reset均可正常下载,问题解决!

以下为手册原文:


Debug

The Debug section, consisting of three groups, controls caching, downloading, and device reset options that are applied each time a debugging session is started.

Connect & Reset Options control the way the µVision debugger establishes a connection to the target device.

  • The Connect drop-down list controls the operations that are executed when the µVision debugger connects to the target device.

    • Connect — Normal just stops the CPU at the currently executed instruction after connecting.
    • Connect — with Pre-reset applies a hardware reset(HW RESET) before connecting to the device.
    • Connect — under Reset holds the hardware reset(HW RESET) signal active while connecting to the device. Use this option when the user program disables the JTAG/SW interface by mistake.

    The Reset after Connect option, if enabled, tells the µVision debugger to perform a reset operation after connecting to the target. If disabled, the debugger just stops the CPU at the currently executed instruction after connecting. See the Start Sequence explanation for details.

    The Reset drop-down list controls the reset operations performed by the target device.

    • Reset — HW RESET performs a hardware reset by asserting the hardware reset (HW RESET) signal.
    • Reset — SYSRESETREQ performs a software reset by setting the SYSRESETREQ bit. Both the Cortex-M core and the on-chip peripherals are reset.
    • Reset — VECTRESET performs a software reset by setting the VECTRESET bit. Only the Cortex-M core is reset. The on-chip peripherals are not reset. For some Cortex-M devices, VECTRESET is the only way they may be reset.
    • Reset — Autodetect selects one of the reset methods based on the target device. If Autodetect finds an unknown device, it uses the SYSRESETREQ method.
  • Stop after Bootloader stops the CPU after executing the bootloader instructions.

Cache Options improve the µVision debugger performance during target debugging by caching target memory areas into the PC memory. By default, caching options are enabled to get maximum performance.

    • Cache Code informs the debugger that the downloaded program code will not change. When this option is set, µVision never reads the program code from the target system. Disable this option, if you are using self-modifying code or, if you suspect that your program code is being overwritten.
    • Cache Memory determines whether memory displays are updated during a program stop. When this option is set, the debugger does not update memory displays until the execution of the next single step, procedure step, or go command. Disable this option to display the actual memory content when the debugger is halted, for example of memory mapped peripherals.  

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值