Next: NAND Flash Commands, Previous: Flash Commands, Up: Top [Contents][Index]
OpenOCD implements numerous ways to program the target flash, whether internal or external. Programming can be acheived by either using GDB Programming using GDB, or using the cmds given in Flash Programming Commands.
To simplify using the flash cmds directly a jimtcl script is available that handles the programming and verify stage. OpenOCD will program/verify/reset the target and shutdown.
The script is executed as follows and by default the following actions will be peformed.
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" # binary files need the flash address passing openocd -f board/stm32f3discovery.cfg \ -c "program filename.bin 0x08000000"