Page 1 of 1

Compiling with PlatformIO (on Mac...)

Posted: 17 May 2017, 22:01
by JR01
Hi all, it is clear PlatformIO is pretty important going forward.

I tried to read all the PlatformIO articles, and the wiki pages. They are not in one place, which makes it more difficult. I am on a Mac, have gone through all the Mac related install topics of the wiki, for instance on:

https://www.letscontrolit.com/wiki/inde ... Platformio
Disable Linter / Install Atom / Started Atom / Installed the PlatformIDE (IDE 2.0.0-beta.3 and Core 3.4.0b2) / Python 2.7

Then, at the bottom of the wiki you say: "If atom is slughish, hanging and giving errors, then there is probably something wrong with the gcc-linter. I had to remove platformio-* and linter-gcc and reinstall platformio-ide to fix it."

QUESTION 1 -- How does one do removal of above? Do I go find this on the OS level, and delete it? As I do have a problem, as follows:

After downoading the source for ESPEasy_v2.0.0-dev8, I open the file ESPEasy.ino, hit F7, and then do not get any response, and then after some time, the following screen pops up:

Image

What are the steps to solve this please? I would like to get PlatformIO working, it seams the investment in time will be worth it going forward.

Ohh, I did not log into PLatformIO when atom starts up, is this required?

Re: Compiling with PlatformIO (on Mac...)

Posted: 17 May 2017, 23:23
by Domosapiens
I open the file ESPEasy.ino
That's not the way in Atom.
Use File> Add Project Folder, then select the directory Source (containing .pioenvs, lib and src)
gcc-linter
can be found under Packages (I think I removed it there)

Re: Compiling with PlatformIO (on Mac...)

Posted: 17 May 2017, 23:37
by JR01
That's not the way in Atom.
Use File> Add Project Folder, then select the directory Source (containing .pioenvs, lib and src)
Thank you, that worked. Now busy compiling, want to see if I can get a .bin file to upload via the ESP OTA web interface.

Re: Compiling with PlatformIO (on Mac...)

Posted: 17 May 2017, 23:44
by JR01
Okay, I think I compiled it. I chose PIO clean (normal_1024) options, see below, it runs some scripts at the bottom, but do not find a compiled .bin file after that, does it build a .bin file? Where do search for it?

Image

Re: Compiling with PlatformIO (on Mac...)

Posted: 17 May 2017, 23:55
by JR01
<Toggle Build Panel> option, then get below, looks like successful build, but where does it put the file?

[Wed May 17 23:53:13 2017] Processing normal_1024 (platform: espressif8266; upload_speed: 460800; build_flags
: -Wl,-Tesp8266.flash.1m128.ld -D PLUGIN_BUILD_NORMAL -D BUILD_GIT='""'; board: esp12e; framework: arduino)
--------------------------------------------------------------------------------
Build environment is clean
========================= [SUCCESS] Took 0.50 seconds =========================

================================== [SUMMARY] ==================================

Environment normal_1024 [SUCCESS]
Environment normal_4096 [SKIP]
Environment normal_8285 [SKIP]
Environment test_1024 [SKIP]
Environment test_4096 [SKIP]
Environment test_8285 [SKIP]
Environment dev_1024 [SKIP]
Environment dev_4096 [SKIP]
Environment dev_8285 [SKIP]
========================= [SUCCESS] Took 0.50 seconds =========================

Re: Compiling with PlatformIO (on Mac...)

Posted: 18 May 2017, 03:58
by costo
JR01 wrote: 17 May 2017, 23:55 <Toggle Build Panel> option, then get below, looks like successful build, but where does it put the file?
In my Linux machine PlatformIO puts the binaries in a hidden folder called ¨ .pioenvs ¨ ( note the dot in front of the name, meaning it is hidden). Every compile option creates itś own subfolder in .pioenvs and places the binfile as firmware.bin there.

Re: Compiling with PlatformIO (on Mac...)

Posted: 18 May 2017, 09:24
by JR01
Thank you Costo, I do see that hidden folder, but compiled image not there...

Image

Re: Compiling with PlatformIO (on Mac...)

Posted: 18 May 2017, 14:59
by costo
My folder looks like this
platformIO.jpg
platformIO.jpg (28.03 KiB) Viewed 11535 times

To get these files in the .pioenvs folder I opened the ESPEasy2.8.ino file (renamed it myself) , then pressed F7 and choose PIO Build. Then PlatformIO was busy for a few minutes and was compiling all the different options and placed the output files in this .pioenvs folder.

As say´d my system is on Linux-OS , not MAC, so your files may be placed in another place ?

Re: Compiling with PlatformIO (on Mac...)

Posted: 30 May 2017, 00:24
by JR01
Thank you Costo. I now tried to get going with PlatformIO again. Updated atom, platformIO, etc, downloaded ESPEasy-2.0.0-dev10, went to the src file, and opened ESPEasy.ino.

Pressed F7 for the 'overview of the possible versions to build', but only get 'No target found'.

Does anybody know where the F7 instructions are controlled, and how I can move forward on using PlatoformIO on Mac?

Re: Compiling with PlatformIO (on Mac...)

Posted: 30 May 2017, 14:10
by Shardan
Try this:

Do not simply open the ESPEasy.ino.
In Atom/Platformio use "Open Project"
and add the Folder above "src", "dist",".github" etc.
Then in the left pane go to ESPEasy.ino and open it, press F7 etc etc.

Regards
Shardan

Re: Compiling with PlatformIO (on Mac...)

Posted: 30 May 2017, 19:26
by JR01
Thank you. Nope, still not working. Any other way to compile, or where are the def's carried that comes up under F7 ?

Re: Compiling with PlatformIO (on Mac...)

Posted: 30 May 2017, 20:02
by Shardan
Something in your Platformio setup has gone wrong,.. i followed the Howto in the wiki and it works.

Anyways, you may use the arduino ide for compiling, a howto is in the wiki.
Just i've seen many people run into problems when using the arduino ide for flashing.
Choose "Export Binary File" and use the flash tool delivered with the ESPEasy 2.0.0 zip file.

Regards
Shardan

Solved: Compiling with PlatformIO (on Mac...)

Posted: 01 Jun 2017, 22:22
by JR01
Thank you all, I got it working.

the instructions on wiki letscontrolit is not that clear.

Like contributor @Domosapiens earlier on this post stated, open the directory which contains:

Code: Select all

Use File> Add Project Folder, then select the directory Source (containing .pioenvs, lib and src)