我们正在尝试用OpenOCD读出我们的STM32F0x微控制器的一部分,我们也用它来对它们进行编程。但是,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似乎很少使用。至少,这是我在谷歌上搜索到的。有谁知道如何使用这个命令吗?
发布于 2017-11-07 21:42:26
flash read_bank命令还需要两个参数:偏移量和长度。
所以在STM32 MCU上,你可以使用
flash read_bank 0 test.bin 0x8000000 0x4000
读取闪存的前16KB。
请记住,在OpenOCD中也有一个“帮助”命令。
https://stackoverflow.com/questions/46910172
复制相似问题