...which could be displayed on the device web page:
Now that behavior has been 'featured' away: FILE no longer returns the full path. How do you get the path name of the source file?
You'll need to provide some proof of that... I've used FILE many times, and it always returns the full, absolute path of the file, exactly as the spec indicates it does.
Create a simple program, that does nothing more than print the string to Serial, and post the code, and output here.
Solaria:
I've seen references to this problem back at version 1.8.8
Version 1.8.8 of what?
Solaria:
I guess it's an ESP8266 problem?
Correct. If you use file with other boards platforms, such as the official Arduino AVR Boards, you still get the full path. So the change to FILE only containing the sketch name when compiling for an ESP8266 board was a change made by the ESP8266 boards platform authors, not by Arduino.
RayLivingston:
So likely a bug in the Huzzah Feather board package
Not at all a bug. This was an intentional change:
It's a feature (a "change in core plans") !
It is also a step towards reproducible generation of flash binaries,
it also offers smaller flash occupation with debug messages,
privacy for pre-generated core libraries,
RayLivingston:
which is most likely created by Huzzah?
"Huzzah" is Adafruit's marketing fluff alias for ESP8266 (like "NeoPixels" instead of WS2812). I haven't seen a lot of involvement by Adafruit with the ESP8266 boards platform, but I'm sure they've had some. Probably a lot of the work was done before Adafruit even came out with an ESP8266 board. I think the ESP8266 boards platform started as a volunteer project, but probably the manufacturer of the ESP8266, Espressif, has provided some support.
pert:
Correct. If you use file with other boards platforms, such as the official Arduino AVR Boards, you still get the full path. So the change to FILE only containing the sketch name when compiling for an ESP8266 board was a change made by the ESP8266 boards platform authors, not by Arduino.
Well that's odd. Yes, it works fine on a e.g. Circuit Playground Express...but: isn't FILE resolved by the C preprocessor? Seems like it wouldn't matter what board it was compiled for.
Solaria:
isn't FILE resolved by the C preprocessor? Seems like it wouldn't matter what board it was compiled for.
It does matter because the ESP8266 boards platform uses a different compiler than the Adafruit SAMD Boards platform of the Circuit Playground Express and the compiler installed on your RPi. The ESP8266 boards platform authors actually patched the compiler their platform uses to change its behavior in defining FILE.
Solaria:
Is there a hack for the compiler toolchain that will make this work?
Replace the patched version of the xtensa-lx106-elf-gcc compiler installed by the ESP8266 platform with an unpatched version. It's installed under ~/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc
pert:
I think the ESP8266 boards platform started as a volunteer project, but probably the manufacturer of the ESP8266, Espressif, has provided some support.
the esp8266 Arduino is a community project without involvement of Espressif. even the creator of the esp8266 Arduino and some of early contributors now work for Espressif, they do not contribute now to esp8266 Arduino. they work on Espressif projects like the SDKs and the esp32 Arduino
the esp8266 Arduino is based on the Espressif's NonOS SDK but not on the latest version because many parts of SDK were replaced by open source versions and some parts of SDK are patched. so no, no help from Espressif
The PlatformIO IDE will flag "PATH" as "undefined". You can ignore that, since the compile will complete without errors, or you can add this at the top of the program to make the IDE happy: