Skip to content

Commit

Permalink
Fixing alias issue with flashing and debug
Browse files Browse the repository at this point in the history
  • Loading branch information
nwdepatie committed Feb 21, 2024
1 parent 5f0c2e2 commit e7356b8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dev/scripts/flash.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
#! /bin/bash
openocd -f interface/cmsis-dap.cfg -f target/stm32f4x.cfg -c "adapter speed 5000" -c "program /home/app/build/*.elf verify reset exit"
elf_file=$(ls /home/app/build/*.elf)

printf "$elf_file"

openocd -f interface/cmsis-dap.cfg -f target/stm32f4x.cfg -c "adapter speed 5000" -c "program $elf_file verify reset exit"
8 changes: 7 additions & 1 deletion dev/scripts/gdb.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
#! /bin/bash
openocd -f interface/cmsis-dap.cfg -f target/stm32f4x.cfg -c "adapter speed 5000" -c "init" -c "reset halt" & sleep 1 && arm-none-eabi-gdb /home/app/build/*.elf -ex "target remote localhost:3333"
elf_file=$(ls /home/app/build/*.elf)

printf "$elf_file"

openocd -f interface/cmsis-dap.cfg -f target/stm32f4x.cfg -c "adapter speed 5000" -c "init" -c "reset halt" & sleep 1 && arm-none-eabi-gdb $elf_file -ex "target remote localhost:3333"

kill $(pidof openocd)

0 comments on commit e7356b8

Please sign in to comment.