how to fix runtime.platform.path for a boards.txt-only esp8266 board definition

I’m trying to create a new board definition for an esp8266 board, using just a boards.txt as described in Arduino IDE 1.5 3rd party Hardware specification · arduino/Arduino Wiki · GitHub

My immediate problem is that runtime.platform.path refers to the directory containing the boards.txt file, not to the platform directory from the esp8266 package, so the SDK and libc paths are being set relative to my boards.txt (and hence builds all fail). As far as I’ve been able to find, the only way to work around this is to duplicate the platform.txt from the upstream esp8266 package and edit it, but this seems to defeat the purpose of allowing minor board variants to just provide a boards.txt while inheriting everything else from an existing platform.

Attached are my boards.txt (installed in ~/Documents/Arduino/hardware/xyzzy/esp8266/boards.txt) and the compiler error output

Before calling the compiler, it reports:

Using board ‘xyzzy’ from platform in folder: /Users/russm/Documents/Arduino/hardware/xyzzy/esp8266
Using core ‘esp8266’ from platform in folder: /Users/russm/Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta2

and then correctly finds xtensa-lx106-elf-g++ but calls it with include paths set like


instead of the desired


These appear to come from the esp8266 platform.txt which includes

compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ “-I{compiler.sdk.path}/include” “-I{compiler.sdk.path}/{build.lwip_include}” “-I{compiler.libc.path}/include” “-I{build.path}/core”

Is there any way to reset runtime.platform.path to point where I want it to? Is there some other way to make this work? Is it a problem in the esp8266 platform config, and if so is there a solution I can try to push upstream to them?

boards.txt (240 Bytes)

arduino-error.txt (5.34 KB)