-->
Page 1 of 5

Tool Chain in MAC OS X

PostPosted: Tue Dec 09, 2014 3:12 pm
by axiom
Hi All,

I´m new in the forum, this is my first post sorry its a question not a contribution.

I have been working with ESP8266 for a while, but only flashing others firmware and using the AT commands connected to other MCUs, I would like to try start writing my own code for these beauties and Im looking for a good IDE/enviroment to work, I´m a MAC user and already tried an Ubuntu VM with Eclipse, I would like to run native without VM.

Here the question:

Have anyone tried to compile the crosstool-NG and configure it to work in OS X with Eclipse?, any advice?

Re: Tool Chain in MAC OS X

PostPosted: Wed Dec 10, 2014 3:17 am
by calgalli
I compiled the cross tool-NG on MAC OS X and I am using it. It seems to be ok. I have compressed the cross tool-NG and the size is about 30MB. If you need, please provide me a place to upload it, You also need to build esptool for OS X. Other tools are Python so it can easily work on MAC.


I follow the steps in viewtopic.php?f=9&t=224&start=30

"
Next, some notes for those on a Mac.
Create a case-sensitive filesystem image and mount it somewhere before cloning crosstool-NG:
1 hdiutil create -size 10g -fs "Case-sensitive HFS+" -volname ESPTools ESPTools.sparsebundle
2 hdiutil attach ESPTools.sparsebundle
3 ln -s /Volumes/ESPTools/ esptools
4 Install gcc 4.9. I use macports, homebrew should also work. Note that you may also need to install other packages, I might have had them installed already. If you use macports, don't forget to set the default gcc:
5 sudo port select gcc mp-gcc49
6 When running configure, encourage it to pick the GNU version of grep (which also has to be installed via macports/homebrew):
grep=/opt/local/bin/grep ./configure --prefix=`pwd`
Before doing ct-ng build, run menuconfig ($ ./ct-ng menuconfig), go into "C compiler" and disable "Link libstdc++ statically into the gcc binary". Otherwise crosstool-NG will feed '-static' option to gcc, but on OS X gcc doesn't have it.
"

I am using an external drive formatted as cast-sensitive file system and I built the whole thing in there. You also need to install MacPorts so that you can install gcc 4.9 and other needed tools. Now, I am happy that everything are working on my MAC.

Re: Tool Chain in MAC OS X

PostPosted: Wed Dec 10, 2014 4:58 am
by igrr
Also note that libstdc++ is now liked statically by default, so the last step is no longer necessary.

Re: Tool Chain in MAC OS X

PostPosted: Mon Dec 15, 2014 1:06 am
by ahoyland
With regard to the eclipse question, my coworkers and I have been using eclipse/CDT with the ESP8266 for some time now. You need to go grab the Eclipse IDE for C/C++, then install CDT. Then you can just click file->Import and select "Existing code as makefile project." Then just point it at your code/makefile.