compilation on windows without MSYS2

sanukrishnan
Posts: 6
Joined: Tue Apr 24, 2018 1:53 pm

compilation on windows without MSYS2

Postby sanukrishnan » Tue Apr 24, 2018 2:42 pm

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??

chegewara
Posts: 2362
Joined: Wed Jun 14, 2017 9:00 pm

Re: compilation on windows without MSYS2

Postby chegewara » Wed Apr 25, 2018 2:56 am

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.

sanukrishnan
Posts: 6
Joined: Tue Apr 24, 2018 1:53 pm

Re: compilation on windows without MSYS2

Postby sanukrishnan » Wed Apr 25, 2018 10:34 am

But this also adds more dependency and needs additional download.

I am searching about a standalone lightweight ecosystem to develop esp32 applications.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: compilation on windows without MSYS2

Postby fly135 » Wed Apr 25, 2018 4:35 pm

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

sanukrishnan
Posts: 6
Joined: Tue Apr 24, 2018 1:53 pm

Re: compilation on windows without MSYS2

Postby sanukrishnan » Thu Apr 26, 2018 6:24 am

Is there any way to know the procedure used in Arduino that compiles esp32 projects without MSYS?

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: compilation on windows without MSYS2

Postby ESP_igrr » Thu Apr 26, 2018 7:42 am

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.

sanukrishnan
Posts: 6
Joined: Tue Apr 24, 2018 1:53 pm

Re: compilation on windows without MSYS2

Postby sanukrishnan » Thu Apr 26, 2018 12:38 pm

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? :P
Will it compile if I add set some environment variables and run 'make' ?

Or should I modify arduino-builder source file to achieve this?

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: compilation on windows without MSYS2

Postby ESP_igrr » Thu Apr 26, 2018 1:02 pm

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.

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: compilation on windows without MSYS2

Postby ESP_igrr » Thu Apr 26, 2018 1:06 pm

Also there seems to be a way to have a portable install of platformio: https://community.platformio.org/t/plat ... tion/308/6

sanukrishnan
Posts: 6
Joined: Tue Apr 24, 2018 1:53 pm

Re: compilation on windows without MSYS2

Postby sanukrishnan » Sun Apr 29, 2018 6:53 am

Thank you so much.

Let me try both ways, and I will update that here.

Who is online

Users browsing this forum: No registered users and 75 guests