-
Notifications
You must be signed in to change notification settings - Fork 2
/
debug.sh
executable file
·31 lines (25 loc) · 722 Bytes
/
debug.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
Green='\033[0;42m'
Red='\033[0;41m'
End='\033[0;0m'
#cargo build --release
EXECUTABLE_FILE="target/thumbv7m-none-eabi/debug/stm32-black-pill-rust"
check_gdb() {
GDB=$(which "$1")
if [ $? -eq "0" ] ; then
echo -e "${Green}Launch a GDB session with '${GDB}'${End}"
"$GDB" "$EXECUTABLE_FILE"
exit $?
else
return 1
fi
}
check_gdb arm-none-eabi-gdb
check_gdb gdb-multiarch
# add your own gdb:
# check_gdb [others_gdb]
echo -e "${Red}Impossible to launch a GDB session.${End}"
# A lancer à la main...
#st-util > st-link.log 2>&1 &
#arm-none-eabi-gdb target/thumbv7m-none-eabi/debug/stm32-black-pill-rust
#rust-gdb target/thumbv7em-none-eabihf/debug/nucleo_rust