【问题标题】:OpenOCD read_bank command asks for more argumentsOpenOCD read_bank 命令要求更多参数
【发布时间】:2017-10-24 12:07:02
【问题描述】:

我们正在尝试使用 OpenOCD 读取我们的 STM32F0x 微控制器的部分内容,我们也使用 OpenOCD 对其进行编程。但是,flash read_bank 命令无法按文档说明工作。无论我们输入什么,错误都是:

flash read_bank 0 test.bin: command requires more arguments

我们调用它例如:

sudo openocd -f interface/stlink-v2.cfg -f target/stm32f0x_stlink.cfg -c "init" -c "reset init" -c "flash read_bank 0 test.bin" -c "exit"

其他闪存操作按预期工作,例如:

openocd -f interface/stlink-v2.cfg -f target/stm32f0x_stlink.cfg -c init -c "flash info 0" -c exit

openocd -f interface/stlink-v2.cfg -f target/stm32f0x_stlink.cfg -c init -c "flash banks" -c exit

flash read_bank 命令似乎很少使用。至少,这是我的谷歌搜索说的。有人知道如何使用这个命令吗?

【问题讨论】:

    标签: embedded microcontroller jtag openocd stm32f0


    【解决方案1】:

    flash read_bank comannd 还需要 2 个参数:偏移量和长度。

    所以我可以在 STM32 MCU 上使用

    flash read_bank 0 test.bin 0x8000000 0x4000

    读取闪存的前 16KB。

    请记住,OpenOCD 中也有一个“帮助”命令。

    【讨论】:

    • 你试过了吗?对我们来说,我们通过哪些参数和多少参数并不重要。错误总是“需要更多参数”:sudo openocd -f interface/stlink-v2.cfg -f target/stm32f0x_stlink.cfg -c "init" -c "reset init" -c "flash read_bank 0 test.bin 0x8000000 0x4000" -c "exit"
    • flash read_bank 0 test.bin 0x8000000 0x4000: command requires more arguments in procedure 'flash'
    • openocd.org/doc/html/… 文档说偏移量和长度是可选的。
    • 检查您的 OpenOCD 版本附带的文档。我的仍然没有标记为可选的偏移量和长度。
    • 无论文档如何 - 有或没有偏移量和长度参数,该命令都不起作用并要求“更多参数”。我可以添加更多参数,但它仍然要求更多。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-04-28
    • 2012-01-28
    • 1970-01-01
    • 1970-01-01
    • 2021-02-26
    • 1970-01-01
    相关资源
    最近更新 更多