1#!/bin/bash 2 3OUTPUT_DIR=$1 4 5if ! test -d "${OUTPUT_DIR}" ; then 6 echo "ERROR: no output directory specified." 7 echo "Usage: $0 OUTPUT_DIR" 8 exit 1 9fi 10 11${OUTPUT_DIR}/host/bin/openocd -f board/stm32f469discovery.cfg \ 12 -c "init" \ 13 -c "reset init" \ 14 -c "flash probe 0" \ 15 -c "flash info 0" \ 16 -c "flash write_image erase ${OUTPUT_DIR}/images/u-boot.bin 0x08000000" \ 17 -c "reset run" \ 18 -c "shutdown" 19