From e93944871411c8682c5b5cb2822b6331421da5b7 Mon Sep 17 00:00:00 2001 From: James Butcher Date: Sat, 1 Apr 2023 11:29:47 +0100 Subject: [PATCH 1/2] update arduino home for v1.8.6 --- company-arduino.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/company-arduino.el b/company-arduino.el index 82eb8e6..5d2a508 100644 --- a/company-arduino.el +++ b/company-arduino.el @@ -99,13 +99,12 @@ wherever you want to develop Arduino application.") (defvar company-arduino-home (file-truename (or (getenv "ARDUINO_HOME") "")) "Installed directory of Arduino IDE. Default value is $ARDUINO_HOME.") -(defvar company-arduino-header (format "%s%s" company-arduino-home "/hardware/arduino/avr/cores/arduino/Arduino.h") +(defvar company-arduino-header (format "%s%s" company-arduino-home "/cores/arduino/Arduino.h") "Place of Arduino.h, which Arduino IDE includes by default.") (defvar company-arduino-includes-dirs - (cl-loop with dirs = '("/hardware/arduino/avr/cores/arduino/" - "/hardware/tools/avr/include/" - "/hardware/arduino/avr/libraries/") + (cl-loop with dirs = '("/cores/arduino/" + "/libraries/") for include-dir in dirs collect (format "%s%s" company-arduino-home include-dir) into include-dirs finally return include-dirs) From 834cd139bdb7078b59bef2c40b232e3b999755af Mon Sep 17 00:00:00 2001 From: James Butcher Date: Sat, 1 Apr 2023 13:44:28 +0100 Subject: [PATCH 2/2] Add avr-gcc headers --- company-arduino.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/company-arduino.el b/company-arduino.el index 5d2a508..74f4e4f 100644 --- a/company-arduino.el +++ b/company-arduino.el @@ -102,12 +102,14 @@ wherever you want to develop Arduino application.") (defvar company-arduino-header (format "%s%s" company-arduino-home "/cores/arduino/Arduino.h") "Place of Arduino.h, which Arduino IDE includes by default.") +(defvar company-arduino-avr-gcc-headers (file-truename (or (getenv "ARDUINO_AVR_GCC_HEADERS") ""))) + (defvar company-arduino-includes-dirs - (cl-loop with dirs = '("/cores/arduino/" + (append (cl-loop with dirs = '("/cores/arduino/" "/libraries/") for include-dir in dirs collect (format "%s%s" company-arduino-home include-dir) into include-dirs - finally return include-dirs) + finally return include-dirs) company-arduino-avr-gcc-headers) "Arduino's specific include directories.") (defvar irony-arduino-includes-options