~ruther/stm32h747i-disco-usb-image-viewer

3c1ddb20008638d0dc318ad9d420b89dbc447b79 — Rutherther 5 months ago a9fcbab
chore: debug config via dape
2 files changed, 29 insertions(+), 0 deletions(-)

A .dir-locals.el
A gdb.script
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

Do not follow this link