Skip to content

Commit

Permalink
try different way of functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jr1221 committed Apr 17, 2024
1 parent 38868f9 commit 2fcf3f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 4 additions & 0 deletions dev/scripts/alias.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ alias emulate='/home/dev/scripts/emulate.sh'
alias debug='/home/dev/scripts/gdb.sh'
alias ody-connect='source /home/dev/scripts/ody-connect.sh'
alias curr-serial='/home/dev/scripts/curr-serial.sh'

function curr-serial() {
udevadm info "$DEBUG_PORT" -a | sed -n -e 's/^.*ATTRS{serial}=="//p' | head -n 1 | sed 's/.$//'
}
5 changes: 0 additions & 5 deletions dev/scripts/curr-serial.sh

This file was deleted.

2 changes: 1 addition & 1 deletion dev/scripts/gdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ elf_file=$(ls /home/app/build/*.elf)

printf "$elf_file"

openocd -f interface/cmsis-dap.cfg -f target/"$STM_TARGET_NAME"x.cfg -c "adapter speed 5000" -c "init" -c "reset halt" & sleep 1 && arm-none-eabi-gdb $elf_file -ex "target remote localhost:3333"
openocd -f interface/cmsis-dap.cfg -f target/"$STM_TARGET_NAME"x.cfg -c "adapter speed 5000" -c "cmsis_dap_serial serial_string $(curr-serial)" -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 2fcf3f0

Please sign in to comment.