Page 1 of 2
compilation on windows without MSYS2
Posted: Tue Apr 24, 2018 2:42 pm
by sanukrishnan
Hi,
I am a beginner in ESP32 platform trying to implement few ideas on esp32 hardware.
My first sample project compiles and gets downloaded well on both Ubuntu and windows with MSYS2.
But "esp32_win32_msys2_environment_and_toolchain-20180110.zip" with size 500MB seems too much for me. Is there any alternative for this? Any method, that compiles esp32 projects on windows without this heavy file?
I tried cygwin, mingw32, ESPArduinoMakefile etc.. But didn't work for me.
But Arduino IDE compiles esp32 projects without MSYS2. How does this work? I checked the boards.txt and platform.txt files and found the recipes used by the compiler there, but couldn't figure out the exact method or compiler used.
Is there any method or makefile that compiles esp32 projects on windows directly??
Re: compilation on windows without MSYS2
Posted: Wed Apr 25, 2018 2:56 am
by chegewara
I dont know if this is good idea but you can install Ubuntu on windows 10.
https://docs.microsoft.com/en-us/window ... tall-win10
I would suggest eclipse, but even with eclipse you need to build menuconfig and without msys i think its not possible.
Arduino has prebuild/hardcoded menuconfig, if you ask.
Re: compilation on windows without MSYS2
Posted: Wed Apr 25, 2018 10:34 am
by sanukrishnan
But this also adds more dependency and needs additional download.
I am searching about a standalone lightweight ecosystem to develop esp32 applications.
Re: compilation on windows without MSYS2
Posted: Wed Apr 25, 2018 4:35 pm
by fly135
I found it extremely easy to use MSYS installation. Works right out of the box on win 7,8.1, and 10. Only the usb driver needed an update with 10. Personally I think if you are a beginner it's the easiest way to go short of sticking with Arduino.
Just follow the instructions here...
https://esp-idf.readthedocs.io/en/lates ... setup.html
John A
Re: compilation on windows without MSYS2
Posted: Thu Apr 26, 2018 6:24 am
by sanukrishnan
Is there any way to know the procedure used in Arduino that compiles esp32 projects without MSYS?
Re: compilation on windows without MSYS2
Posted: Thu Apr 26, 2018 7:42 am
by ESP_igrr
Arduino uses a tool called
arduino-builder, which gets build rules from
platform.txt file. Arduino-builder makes calls to the compiler and linker to produce the output. In the end it also runs
esptool.py, a python tool which generates binary in a format suitable for uploading to the ESP32. This tool brings in Python as a dependency.
Arduino-builder can only build Arduino sketches and libraries, though. It can not build ESP-IDF projects. Currently ESP-IDF uses Make to power its build system, and Make does not run on Windows natively. This is why we have a dependency on MSYS. This will be changing very soon, and we will be dropping the dependency on MSYS and replacing it with dependencies on some other things
You may also want to look at PlatformIO, which is an environment based on SCons build system, written in Python. I don't know what is the size of python packages it will download and install, but that will probably be much less than an MSYS download.
Re: compilation on windows without MSYS2
Posted: Thu Apr 26, 2018 12:38 pm
by sanukrishnan
Wow. That's a lot of information. Thank you so much
Platform IO seems comparatively better. But the problem is it is not portable. I would like to have that "dream zip folder" that could be copied to a number of PCs and can directly start programming esp32.
I found the recipes in platform.txt file.
How can I cook those recipes?
Will it compile if I add set some environment variables and run 'make' ?
Or should I modify arduino-builder source file to achieve this?
Re: compilation on windows without MSYS2
Posted: Thu Apr 26, 2018 1:02 pm
by ESP_igrr
First you need to decide which environment you are going to use — Arduino or ESP-IDF. If you use Arduino, then you can make a portable install of Arduino (search "arduino ide portable"), and use it on different computers. If you don't want to invoke the compilation from Arduino IDE GUI, you can run arduino-builder from command line. Refer to arduino-builder docs for that. Recipes in platform.txt are the rules which arduino-builder uses to compile and link source files.
If you decide to use IDF, then using 'make' is pretty much the only option at the moment.
Re: compilation on windows without MSYS2
Posted: Thu Apr 26, 2018 1:06 pm
by ESP_igrr
Also there seems to be a way to have a portable install of platformio:
https://community.platformio.org/t/plat ... tion/308/6
Re: compilation on windows without MSYS2
Posted: Sun Apr 29, 2018 6:53 am
by sanukrishnan
Thank you so much.
Let me try both ways, and I will update that here.