flash.sh 584 B

1234567891011121314151617181920
  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/stm32f469discovery.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/stm32f469i-disco.bin 0x08000000" \
  14. -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f469-disco.dtb 0x08004000" \
  15. -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x08008000" \
  16. -c "reset run" \
  17. -c "shutdown"