Skip to content

Commit 41789bc

Browse files
committed
Add convenience function arduino-upload to flash a chip.
1 parent dbb523c commit 41789bc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

arduino-mode.el

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ Each list item should be a regexp matching a single identifier." :group 'arduino
109109
(easy-menu-define arduino-menu arduino-mode-map "Arduino Mode Commands"
110110
(cons "Arduino" (c-lang-const c-mode-menu arduino)))
111111

112+
(defun arduino-upload ()
113+
"Upload a sketch to an Arduino board.
114+
115+
You will need a suitable Makefile. See URL
116+
`http://mjo.tc/atelier/2009/02/arduino-cli.html'."
117+
(interactive)
118+
(make-local-variable 'compile-command)
119+
(compile "make -k upload"))
120+
112121
;;;###autoload
113122
(add-to-list 'auto-mode-alist '("\\.pde\\'" . arduino-mode))
114123

0 commit comments

Comments
 (0)