How to recompile framework or update it?

Hi,

A while ago i reported this issue. mDNS wasn’t resolving .local domains properly in my case.

That issue has been fixed.
Annoyingly, only in the next feature for arduino-esp32, not as a bugfix release.

The actual fix:
Compiling “LWIP” with the flag -DLWIP_DNS_SUPPORT_MDNS_QUERIES=1

The added pain is that arduino-esp32 requires an updated toolchain too. It requires GCC 8.4. I’ve tried so many different combinations and nothing seems to be working properly. Therefore i have a couple of questions:

  1. How do i recompile a toolchain with just this one darn flag set? It seems frustratingly complicated!
  2. If 1 is too difficult, which toolchain and framework do i need to set in platform_packages? I have the following but i’m not entirely sure if it’s even correct.
 platform_packages =
     ?? which toolchain ??
     platformio/framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git

I prefer to go the updated toolchain route for the added C++17 capabilities.

I would expect toolchain-xtensa32@2.80400.0 to work, but filling that in as toolchain gives me this error:

Error: Could not find the package with 'platformio/toolchain-xtensa32 @ 2.80400.0' requirements for your system 'linux_x86_64

While that toolchain version does seem to be existing: platform-espressif32/platform.json at develop · platformio/platform-espressif32 · GitHub Though i’m not sure at all how that version is magically going to work in my platformio.ini file.

And for completeness, i’m trying to build this for the ESP32-WROOM-32D.
My platformio.ini file looks as follows:

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
;upload_port = /dev/ttyUSB0
;force_verbose = yes
lib_deps = 
	https://github.com/tzapu/WiFiManager.git#development
	adafruit/Adafruit INA260 Library@^1.3.5

build_flags = 
    -DWM_MDNS=1
    -DLWIP_DNS_SUPPORT_MDNS_QUERIES=1
    -DESP32=1
    -DARDUINO_ARCH_ESP32=1
    -DBOARD_HAS_PSRAM
    -std=c++17
    -std=gnu++17
build_unflags =
    -std=gnu++11
monitor_flags = 
	--eol
	LF

Thank you!
Mark

Available versions are listed here. The date code (last number after the .) is probably never 0, so you should be using the expression toolchain-xtensa32@~2.80400.0 instead to get 2.80400.x. That should give you 2.80400.210211.

1 Like

One character… 1… :face_with_symbols_over_mouth:

Thank you so much for your help!
It works perfectly (with a tilde), hehe.

Yes but a very special one that if you don’t know it you can’t possibly see that you need it :sweat_smile:.

For reference, our docs on that are here and a general cheat sheet also exists.

Sorry for resurrecting/abducting the post, but I have a similar problem:
I have expanded the project related platformio.ini:

[platformio]
default_envs = wemos_d1_mini32_serial

[common_env_data]
upload_speed = 921600
monitor_speed = 115200

[env:wemos_d1_mini32_serial]
platform = espressif32
board = wemos_d1_mini32
framework = arduino
upload_port = COM*
monitor_speed = 115200
 platform_packages =
    toolchain-xtensa32@~2.80400.0
    platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git

build_flags =
    -DWM_MDNS=1
    -DLWIP_DNS_SUPPORT_MDNS_QUERIES=1
    -DESP32=1
    -DARDUINO_ARCH_ESP32=1
    -DBOARD_HAS_PSRAM
    -std=c++17
    -std=gnu++17

build_unflags =
    -std=gnu++11

Does anyone have a tip, what could be the cause or you can solve this?

PACKAGES:
 - framework-arduinoespressif32 0.0.0+sha.b94b38c
 - tool-esptoolpy 1.30100.210531 (3.1.0)
 - toolchain-xtensa32 2.80400.210211 (8.4.0)
[...]
Linking .pio\build\wemos_d1_mini32_serial\firmware.elf
c:/users/xxx/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: final link failed: bad value
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\wemos_d1_mini32_serial\firmware.elf] Error 1`

You should wait for Support for the latest Arduino v2.0 · Issue #619 · platformio/platform-espressif32 · GitHub to be closed officially before using the bleeding-edge Arduino core.

1 Like

Thanks for the quick answer!