Next: PLD/FPGA Commands, Previous: Flash Commands, Up: Top [Contents][Index]
OpenOCD implements numerous ways to program the target flash, whether internal or external. Programming can be achieved by either using Programming using GDB, or using the commands given in Flash Programming Commands.
To simplify using the flash commands directly a jimtcl script is available that handles the programming and verify stage. OpenOCD will program/verify/reset the target and optionally shutdown.
The script is executed as follows and by default the following actions will be performed.
flash write_image
is called to erase and write any flash using the filename given.
verify_image
is called if verify parameter is given.
reset run
is called if reset parameter is given.
An example of usage is given below. See program.
# program and verify using elf/hex/s19. verify and reset # are optional parameters openocd -f board/stm32f3discovery.cfg \ -c "program filename.elf verify reset exit" # binary files need the flash address passing openocd -f board/stm32f3discovery.cfg \ -c "program filename.bin exit 0x08000000"