ESP32WROVER target build on Linux in Eclipse

Hi support,
I am trying to evaluate the suitability of the MicroJE environment on the ESP32.
I am currently working through the example Readme.md from “/home/user/Downloads/MicroEJ/Firmware/HDAHT/ESP32WROVER-HDAHT-fullPackaging-eval-1.4.5/platformSource/ESP32WROVER-HDAHT-platformSource/ESP32WROVER-HDAHT-1.4.5-configuration/documentation”
This runs fine in the 'Run As" Execute on Simulator, when I attempt to Execute on target to build the code image I get the error below.

=============== [ Initialization Stage ] ===============
=============== [ Launching SOAR ] ===============
=============== [ Launching Link ] ===============
Execute failed: java.io.IOException: Cannot run program “xtensa-esp32-elf-gcc”: error=2, No such file or directory
GNU toolchain not found (prefix xtensa-esp32-elf-)

FAIL
The following error occurred while executing this line:
/home/user/.microej/repositories/MicroEJ-SDK-19.05/1.6/se001/scripts/checkCompiler.microejTask:16: The following error occurred while executing this line:
/home/user/.microej/repositories/MicroEJ-SDK-19.05/1.6/se001/scripts/checkCompiler.microejTask:44: The following error occurred while executing this line:
/home/user/.microej/repositories/MicroEJ-SDK-19.05/1.6/se001/scripts/checkCompiler.microejTask:57: No message

I have installed the ESP tools to “/home/user/esp/xtensa-esp32-elf/” which is where the Preferences->Core Build Toolchains->User Defined Tool Chains is looking for it following the instructions here - https://gitdemo.readthedocs.io/en/latest/linux-setup.html.

I can’t se any issue with case sensitivity in the path.

Clearly I am missing something so any help would be appreciated.

Dave.

OK So I have eventually found specific instructions for installing the ESP32 toolchain in Linux Here:-

TLT-0832-DGI-PlatformReferenceImplementation-ESP32WROVER.pdf

I’ll see how this goes…

Nope, this now just breaks with:-

17:42:32 **** Build of configuration Default for project microej ****
Info: Configuration “Default” uses tool-chain “Cygwin GCC” that is unsupported on this system, attempting to build anyway.
python /home/user/.microej/workspaces/MicroEJ-SDK-19.05/microej…Driversesp-idf/tools/windows/python eclipse_make.py microej-build
Cannot run program “python”: Unknown reason

Error: Program “python” not found in PATH
PATH=[/home/user/.microej/workspaces/MicroEJ-SDK-19.05/microej…\Tools\msys32\usr\bin;/home/user/.microej/workspaces/MicroEJ-SDK-19.05/microej…\Tools\msys32\mingw32\bin;/home/user/.microej/workspaces/MicroEJ-SDK-19.05/microej…\Tools\msys32\opt\xtensa-esp32-elf\bin]

17:42:32 Build Finished (took 8ms)

Why is it now looking for the ESP build chain in the /tools/windows/ path ?

I am trying to use:-
MicroEJ® SDK Version 19.05

Installed is Python 2.7.12 and Python V3.5

Installed as decscribed in the document above are:-
esp32_win32_msys2_environment_and_toolchain-20180110.zip
openocd-esp32-win32-0.10.0-esp32-20190313.zip
zadig-2.3.exe

ESP-IDF obtained from:-
git clone --recursive https://github.com/espressif/esp-idf.git

Oh and the link to get more information in TLT-0832-DGI-PlatformReferenceImplementation-ESP32WROVER.pdf is broken:-
For more documentation: details, please refers to the following doc-
https://docs.espressif.com/projects/esp-idf/en/v3.1.3/get-start-ed/index.html#setup-toolchain

the compiler path that gets auto created is:-
/home/user/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-strip
which exists?

Clearly the tool chain configuration it insists on using is incorrect.

Should it really be this painful,I have basically spent 8 hours reading several different ‘getting started’ documents without any success, each document having a slightly different process.

If this is really progress, then i’m not getting it !

Very frustrated Dave.

Hi Dave,

Could you tell us what OS are you using ?

Do not use the esp-idf from the master branch of the espressif github, this platform version only support the Espressif IDF 3.1. And it is already provided in the -bsp\ project of the platform (under Drivers\esp-idf).

If you want to follow the setup documentation from Espressif go to their documentation home page : https://docs.espressif.com/projects/esp-idf/en/latest/esp32/. Then under “Switch version” select a 3.1 version of the documentation. And follow their guide for the toolchain setup according to your OS.

Once you have a compiled MicroEJ application you can link it against the BSP by building the CDT project microej.

Regards,

Benjamin

Hi Benjamin,
I’m currently using ubuntu 16.04 LTS, my current dev environment is dual boot so I have also tried the tool chain on Windows 8 with similar but different issues.

Regards Dave.

OK Benjamin, I have installed the V3.1 IDF created a global path for IDF_PATH which is persistent, I can build and flash the hello_world example as described in the Espressif getting started guide all from the command line.

This still doesn’t seem to have got me any closer to getting the MicroEJ SDK Eclipse IDE to have a path where it can actually find the Espressif tool chain it needs.

When I build the ‘ESP-MyProject’ I still get-

=============== [ Initialization Stage ] ===============
=============== [ Launching SOAR ] ===============
=============== [ Launching Link ] ===============
Execute failed: java.io.IOException: Cannot run program “xtensa-esp32-elf-gcc”: error=2, No such file or directory
GNU toolchain not found (prefix xtensa-esp32-elf-)

FAIL
The following error occurred while executing this line:
/home/user/.microej/repositories/MicroEJ-SDK-19.05/1.6/se001/scripts/checkCompiler.microejTask:16: The following error occurred while executing this line:
/home/user/.microej/repositories/MicroEJ-SDK-19.05/1.6/se001/scripts/checkCompiler.microejTask:44: The following error occurred while executing this line:
/home/user/.microej/repositories/MicroEJ-SDK-19.05/1.6/se001/scripts/checkCompiler.microejTask:57: No message

Even though it is supposedly looking in ‘/home/user/esp/xtensa-esp32-elf/bin’ for ‘xtensa-esp32-elf-strip’ which definitely exists.

Hi Dave,

Did you try to close and reopen your Eclipse ? This should refresh the environment variables (do not use “File > Restart”).

Regards,

Benjamin