Reality check: location of platform.local.txt etc.

I've just upgraded 1.8.12 to 1.8.13 on (Debian) Linux x86_64. The Arduino binaries etc. are in /usr/local/lib/arduino/arduino-1.8.13, next to the older arduino-1.8.12. There's oddments in ~/Arduino and ~/.arduino15 as expected.

Using 1.8.12, I've got some extra settings in platform.local.txt found in .../arduino-1.8.12/hardware/arduino/avr/platform.local.txt

If I replicate that file to the equivalent point in the 1.8.13 tree it's ignored.

Looking at IDE output I see

/usr/local/lib/arduino/arduino-1.8.13/arduino-builder -dump-prefs -logger=machine -hardware /usr/local/lib/arduino/arduino-1.8.13/hardware -hardware /home/markMLl/.arduino15/packages -hardware /home/markMLl/Arduino/hardware -tools /usr/local/lib/arduino/arduino-1.8.13/tools-builder -tools /usr/local/lib/arduino/arduino-1.8.13/hardware/tools/avr -tools /home/markMLl/.arduino15/packages -built-in-libraries /usr/local/lib/arduino/arduino-1.8.13/libraries -libraries /home/markMLl/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=1A86_7523 -ide-version=10813 -build-path /tmp/arduino_build_855625 -warnings=none -build-cache /tmp/arduino_cache_548642 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/markMLl/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/markMLl/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/home/markMLl/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/markMLl/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/home/markMLl/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/markMLl/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /usr/local/src/arduino-examples/double-tap-and-hello/double-tap-and-hello.ino

/usr/local/lib/arduino/arduino-1.8.13/arduino-builder -compile -logger=machine -hardware /usr/local/lib/arduino/arduino-1.8.13/hardware -hardware /home/markMLl/.arduino15/packages -hardware /home/markMLl/Arduino/hardware -tools /usr/local/lib/arduino/arduino-1.8.13/tools-builder -tools /usr/local/lib/arduino/arduino-1.8.13/hardware/tools/avr -tools /home/markMLl/.arduino15/packages -built-in-libraries /usr/local/lib/arduino/arduino-1.8.13/libraries -libraries /home/markMLl/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=1A86_7523 -ide-version=10813 -build-path /tmp/arduino_build_855625 -warnings=none -build-cache /tmp/arduino_cache_548642 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/markMLl/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/markMLl/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/home/markMLl/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/markMLl/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/home/markMLl/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/markMLl/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /usr/local/src/arduino-examples/double-tap-and-hello/double-tap-and-hello.ino

Using board 'uno' from platform in folder: /home/markMLl/.arduino15/packages/arduino/hardware/avr/1.8.3

Using core 'arduino' from platform in folder: /home/markMLl/.arduino15/packages/arduino/hardware/avr/1.8.3

Detecting libraries used...

Blank lines inserted to aid readability.

Sure enough, if I copy platform.local.txt into ~/.arduino15/packages/arduino/hardware/avr/1.8.3 things work as expected.

Is that reference to 1.8.3 expected?

MarkMLl

MarkMLl: Is that reference to 1.8.3 expected?

Yes. The "1.8.3" is the version number of the latest release of the Arduino AVR Boards platform of your Uno: https://github.com/arduino/ArduinoCore-avr/releases/tag/1.8.3

It's a little bit confusing because a copy of Arduino AVR Boards comes bundled with the Arduino IDE installation at (/usr/local/lib/arduino/arduino-1.8.13/hardware/arduino/avr in your case), so we are used to thinking of the Arduino IDE version and the Arduino AVR Boards version as being linked. But Boards Manager allows any version of Arduino AVR Boards to be installed with any version of the Arduino IDE, so they are really not so coupled and they each have unrelated version numbers, which just happen to be somewhat similar.

When you install boards platforms via Boards Manager, even Arduino AVR Boards, they are installed under ~/.arduino15/packages. So if you install a version of Arduino AVR Boards via Boards Manager (which often happens when a newer version of Arduino AVR Boards is available than the one bundled with your IDE version), then the installation under ~/.arduino15/packages/arduino/hardware/avr is used and the one under /usr/local/lib/arduino/arduino-1.8.13/hardware/arduino/avr is ignored.

This can be confusing when you're trying to make modifications to the platform because any modifications made to /usr/local/lib/arduino/arduino-1.8.13/hardware/arduino/avr have no effect.

Thanks for that, as you say "a little confusing" :-)

The messages that announce which files are being used are a big improvement. After posting I noticed that a different system (which I'd upgraded from 1.8.10 to 1.8.12 to 1.8.13) was still on 1.8.2 in the ~/.arduino15 tree... interestingly, if I run a compilation I see

/usr/local/lib/arduino/arduino-1.8.13/arduino-builder -dump-prefs ...

Using board 'mega' from platform in folder: /usr/local/lib/arduino/arduino-1.8.13/hardware/arduino/avr

Using core 'arduino' from platform in folder: /usr/local/lib/arduino/arduino-1.8.13/hardware/arduino/avr

Detecting libraries used...

i.e. in this case it's looking in the binary tree rather than the user's home tree.

So the really important thing is to look at those two new message lines and trust them rather than guessing :-)

MarkMLl