1

Bakground:

When compiling a demo project about e-paper, I got this problem

./GxEPD/src/GxIO/GxIO_SPI/GxIO_SPI.h:39:5: error: ‘SPISettings’ does not name a type
     SPISettings _spi_settings;
     ^

which on the Internet, people often say your Arduino core is not up-to-date and the one installed from

sudo apt install arduino-core

is ancient. And you have to install the latest version.

Regardless of whether this solves my original problem or not, I want to have the latest Arduino core on my laptop. From arduino.cc I grabbed a zipped file and ran ./install.sh which did not provide enough results to know what it exactly did. Now, I am concerned that I have multiple installation in several places.

Main question:

When I run my make file and it is processed by arduino-mk, which version of arduino-core is it referred to and where is it located?

I am looking for a full proof method. I do not want to open somewhere from / directory accidentally. Because maybe this is not the arduino-core in use.

5
  • On Linux install.sh creates a shortcut on Desktop. A version of AVR boards package is part of IDE installation, but other version and other boards packages managed with Boards Manager are in ~/.arduino15
    – Juraj
    Dec 7 '19 at 6:19
  • @Juraj, Actually, I do not use AVR board package. I use make file which calls avr-gcc. I think I could find the answer a bit easier by paying attention to the logs coming out of make such as /usr/share/arduino/hardware/tools/avr/bin/avr-gcc -MMD -c -mmcu=atmega328p ... as well as ARDUINO_DIR = /usr/share/arduino and ARDUINO_VERSION = 105. Now the question is whether my Arduino core is recent?
    – ar2015
    Dec 7 '19 at 7:05
  • @Juraj, at arduino.cc, the version of Arduino Software (IDE) is 1.6.2. Is this only the version of IDE or is it the version of core too?
    – ar2015
    Dec 7 '19 at 7:11
  • IDE is at version 1.8.10 on arduino.cc. AVR core is at 1.8.1, but last good version in my opinion is right now 1.6.21
    – Juraj
    Dec 7 '19 at 7:14
  • /usr/share/arduino/hardware is the location of boards packages bundled with IDE
    – Juraj
    Dec 7 '19 at 7:17
1

The ancient version installed by apt lives in /usr/share/arduino/hardware/arduino/cores/arduino.

If you download and unpack a recent version, it will stay wherever you left it. For example, I have an Arduino core in /home/edgar/Downloads/arduino-1.8.10/hardware/arduino/avr/cores/arduino. The installation script doesn't really install those files. It does install some icons and desktop shortcuts, but neither the core nor the Arduino IDE. Instead, it assumes the downloaded package will stay wherever it was when you ran the script.

If you want a somewhat cleaner installation, I suggest you move the package to /opt, recursively chown it to root, and run the setup script there. The core will then be in /opt/arduino-<version>/hardware/arduino/avr/cores/arduino.

3
  • Thank you very much. Then how to tell arduino-mk to which version to use?
    – ar2015
    Dec 7 '19 at 21:56
  • Can I insall it in a temp directory and then overwrite it on the ancient arduino core?
    – ar2015
    Dec 7 '19 at 21:57
  • @ar2015: Read the comments at the beginning of /usr/share/arduino/Arduino.mk. They tell you the variables you can use for selection the version. It would seem ARDUINO_DIR is the main one. Dec 7 '19 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.