flash_sd.sh 415 B

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