-
Notifications
You must be signed in to change notification settings - Fork 0
/
debug.bat
51 lines (35 loc) · 1.65 KB
/
debug.bat
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@echo off
rem https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
set ALACRITTY=F:Dev_Tools/Alacritty/alacritty.exe
rem ENTER: monitor reset halt
rem AT Reset_Handler() ENTER: start
echo %CD%
set VER=1
if [%VER%] EQU [0] (call :VER0)
if [%VER%] EQU [1] (call :VER1)
GOTO :
:VER0
echo ver0
rem ==================================================
rem OPEN A CMD PROMPT & RUN ARM GBD
rem ==================================================
start cmd /c F:\Dev_Tools\ARMGNU\bin\arm-none-eabi-gdb.exe -c -nh -ex "target extended-remote localhost:3333" -f ./build/k82f_fc.axf
rem ==================================================
rem RUN OPENOCD & start GBD SERVER - TELNET
rem ==================================================
F:\Dev_Tools\openocd-0.10.0-15\bin\openocd.exe --debug=2 -f ./debug/openocd.cfg
echo returning
exit /B
:VER1
echo ver1
rem ==================================================
rem OPEN A CMD PROMPT & RUN ARM GBD
rem ==================================================
start %ALACRITTY% --command "F:\Dev_Tools\ARMGNU\bin\arm-none-eabi-gdb.exe --quiet -ex \"target extended-remote localhost:3333\" -f ./build/K82F_FlightController.axf"
rem ==================================================
rem RUN OPENOCD & start GBD SERVER - PIPES
rem ==================================================
call F:\Dev_Tools\openocd-0.10.0-15\bin\openocd.exe --debug=2 -f ./debug/openocd.cfg -c "gdb_port pipe; log_output ./debug/openocd.log"
exit /B
rem ------------------------------------------------------------------------
rem .\debug\FC_k82F_Debug\FC_k82F_Debug.uvprojx