We are trying to read out portions of our STM32F0x microcontrollers with OpenOCD, which we also use to program them. However, the flash read_bank
command doesn't work as documented. Whatever we input, the error is:
flash read_bank 0 test.bin: command requires more arguments
We invoke it for example by:
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"
Other flash operations work as expected, such as:
openocd -f interface/stlink-v2.cfg -f target/stm32f0x_stlink.cfg -c init -c "flash info 0" -c exit
or
openocd -f interface/stlink-v2.cfg -f target/stm32f0x_stlink.cfg -c init -c "flash banks" -c exit
The command flash read_bank
seems to be very rarely used. This is at least, was my google search said. Does anybody have an idea on how to use this command?