A user called Sandeep asked me at the NuttX Channel how to copy the firmware already flashed in the stm32f103 MCU. Then I decided to document it here:

$ sudo openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "flash read_bank 0 dump_flash.bin"