A .dir-locals.el => .dir-locals.el +27 -0
@@ 0,0 1,27 @@
+((nil . ((dape-configs . ((gdb ensure
+ (lambda
+ (config)
+ (dape-ensure-command config)
+ (let*
+ ((default-directory
+ (or
+ (dape-config-get config 'command-cwd)
+ default-directory))
+ (output
+ (shell-command-to-string "arm-none-eabi-gdb --version"))
+ (version
+ (save-match-data
+ (when
+ (string-match "GNU gdb \\(?:(.*) \\)?\\([0-9.]+\\)" output)
+ (string-to-number
+ (match-string 1 output))))))
+ (unless
+ (>= version 14.1)
+ (user-error "Requires gdb version >= 14.1"))))
+ modes
+ (c-mode c-ts-mode c++-mode c++-ts-mode)
+ command-cwd dape-command-cwd command "arm-none-eabi-gdb" command-args
+ ("--interpreter=dap" "--x=gdb.script" "bin/blink.elf")
+ defer-launch-attach t :request "launch" :program "bin/blink.elf" :args
+ []
+ :stopAtBeginningOfMainSubprogram nil))))))
A gdb.script => gdb.script +2 -0
@@ 0,0 1,2 @@
+tar ext :3333
+load<
\ No newline at end of file