support for arduino added
This commit is contained in:
parent
1f802bd030
commit
9992fe2973
|
@ -13,6 +13,7 @@
|
|||
'development
|
||||
'web
|
||||
'editor-theme
|
||||
'arduino
|
||||
'javascript
|
||||
;'php
|
||||
;'clojure
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
;; Important Note: On linux you need to add your user to 'dialout' group
|
||||
;; OS reqyurements: You need to install these utilities:
|
||||
;; * arduino-mk
|
||||
;; * python-serial
|
||||
;; * avrdude
|
||||
;; * libdevice-serialport-perl
|
||||
;; * libyaml-perl
|
||||
;;
|
||||
;; You need following environments veriables:
|
||||
;; export ARDUINO_DIR=$HOME/bin/arduino-1.6.8
|
||||
;; export ARDMK_DIR=/usr/share/arduino
|
||||
;; export ARDMK_PATH=/usr/bin
|
||||
|
||||
;;; Code:
|
||||
(require 'fpkg)
|
||||
(require 'fg42/extension)
|
||||
(require 'extensions/arduino/init)
|
||||
|
||||
;; Dependencies ----------------------------------
|
||||
(depends-on 'arduino-mode)
|
||||
(depends-on 'company-arduino)
|
||||
(depends-on 'mustache)
|
||||
|
||||
;; Extension -------------------------------------
|
||||
(extension arduino
|
||||
:version "2.31"
|
||||
:on-initialize extensions/arduino-initialize)
|
||||
|
||||
(provide 'extensions/arduino)
|
||||
;;; arduino.el ends here
|
|
@ -0,0 +1,10 @@
|
|||
# If you didn't define these environment variables, uncomment these and fix the paths
|
||||
#ARDUINO_DIR=$HOME/bin/arduino-1.6.8
|
||||
#ARDMK_DIR=/usr/share/arduino
|
||||
#ARDMK_PATH=/usr/bin
|
||||
|
||||
BOARD_TAG=uno
|
||||
ARDUINO_PORT=/dev/ttyACM0
|
||||
ARDUINO_LIBS=
|
||||
|
||||
include $(ARDMK_DIR)/Arduino.mk
|
|
@ -0,0 +1,28 @@
|
|||
;;; Code:
|
||||
|
||||
;; Functions -------------------------------------------------
|
||||
|
||||
;;;###autoload
|
||||
(defun create-makefile ()
|
||||
"Create the arduino make file in the same directory as the ino file if doesn't exits"
|
||||
(let ((makefile (concat (file-name-directory buffer-file-name) "Makefile"))
|
||||
(makefile-src (concat fg42-home "/lib/extensions/arduino/Makefile")))
|
||||
(message "asdasdasd")
|
||||
(message makefile-src)
|
||||
(if (not (file-exists-p makefile))
|
||||
(progn (message "Creating arduino make file")
|
||||
(copy-file makefile-src makefile)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun extensions/arduino-initialize ()
|
||||
"Arduino development plugin initialization."
|
||||
(message "Initializing 'arduino' extension.")
|
||||
|
||||
(ability arduino-editor ('flycheck)
|
||||
"Gives FG42 the ability to edit arduino related contents."
|
||||
(add-hook 'arduino-mode-hook 'create-makefile)
|
||||
(setq auto-mode-alist (cons '("\\.\\(pde\\|ino\\)$" . arduino-mode) auto-mode-alist))
|
||||
(autoload 'arduino-mode "arduino-mode" "Arduino editing mode." t)))
|
||||
|
||||
|
||||
(provide 'extensions/arduino/init)
|
Loading…
Reference in New Issue