All-in-one Windows zip env incorrectly reports compiler version issue

MarcusW
Posts: 6
Joined: Fri Dec 23, 2016 5:00 am

All-in-one Windows zip env incorrectly reports compiler version issue

Postby MarcusW » Sat Jan 14, 2017 2:28 am

The latest all-in-one windows environment (esp32_win32_mysys2_environment_and_toolchain-20170111.zip), when executing the make command incorrectly reports that the wrong tool chain has been installed.

The cause is in code added to esp-idf/make/project.mk which checks the version number of the compiler does not take into account that programs under windows end in a .exe extension.

This can be corrected, probably without ill effects in Linux environments by changing lines 432-433 in the make file from:
TOOLCHAIN_COMMIT_DESC := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc\ \(([^)]*).*|\1|gp')
TOOLCHAIN_GCC_VER := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc\ \(.*\)\ (.*)|\1|gp')

to:

TOOLCHAIN_COMMIT_DESC := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc.*\ \(([^)]*).*|\1|gp')
TOOLCHAIN_GCC_VER := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc.*\ \(.*\)\ (.*)|\1|gp')

the extra ./ after "gcc" should swallow up the extension if it exists, and not change anything if it does not.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: All-in-one Windows zip env incorrectly reports compiler version issue

Postby kolban » Sat Jan 14, 2017 3:23 pm

Howdy MarcusW,
This sounds like an issue that may have been previously reported ... see:

https://github.com/espressif/esp-idf/issues/226

The Espressif team have said in the issue that they seem to see the problem and hope to have a resolution/fix shortly.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: No registered users and 31 guests