Skip to content

Commit

Permalink
[M] using pure openocd command to download flash
Browse files Browse the repository at this point in the history
  • Loading branch information
luswdev committed Apr 25, 2023
1 parent fec8a8a commit bea0cb6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 38 deletions.
32 changes: 0 additions & 32 deletions tools/download.pl

This file was deleted.

14 changes: 9 additions & 5 deletions tools/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ if [ "$#" -lt 1 ]; then
exit 1
fi

echo "start openocd in background..."
openocd -f openocd.cfg &

echo "start download client..."
./download.pl $1
openocd -f openocd.cfg \
-c "init" \
-c "reset init" \
-c "poll" \
-c "flash probe 0" \
-c "stm32f4x mass_erase 0" \
-c "flash write_image erase $1 0x08000000" \
-c "reset run" \
-c "shutdown"
3 changes: 2 additions & 1 deletion tools/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
source [find interface/stlink-v2-1.cfg]
source [find interface/stlink.cfg]
source [find target/stm32f4x.cfg]

0 comments on commit bea0cb6

Please sign in to comment.