esp8266 / esp8266-wiki

1.75k stars 298 forks source link

Theres no instructions for an osx toolchain #24

Open joerod-auth opened 9 years ago

joerod-auth commented 9 years ago

https://github.com/esp8266/esp8266-wiki/wiki/Toolchain doesnt have any osx instructions, I would love it if they were there!

sgielen commented 9 years ago

Finally got it working! These instructions can be added to the page:

brew install gnu-sed binutils gawk brew install grep --default-names pip install pyserial

Apply this patch to crosstool-ng: https://sourceware.org/ml/crossgcc/2014-10/msg00021.html

Since the default FS is not case sensitive, and crosstool-ng needs to run on a case sensitive FS, you probably need to create a case sensitive disk image and run crosstool-ng there. To create it, use Disk Utility and go to File > New > Empty disk image, make it at least 5 GB and case sensitive journaled. Run crosstool-ng with --prefix=/Volumes/disk\ image and don't forget to copy overlays/ and local-patches/ as mentioned. Afterwards, you can copy everything back to your main FS and remove the disk image.

A hint for flashing, I had to install a kext driver to get my USB to UART to work; check your System Information for the exact name of the USB device and Google for the driver if no /dev/tty.whatever pops up when you plug it in. For me, after kextloading the driver, /dev/tty.SLAB_USBtoUART popped up and worked perfectly. (If you don't know what kextloading is, just reboot and it should also work.)