-->
Page 1 of 1

Ubuntu / Arduino ESP 8266 - Won't write to chip

PostPosted: Sun Mar 29, 2015 7:20 am
by sgoggin
Hello All,

Absolutely awesome to see an Arduino UI for the ESP8266!

Ran in to some issues.
I'm running ubuntu and have installed both the prebuilt linux version - and also built from scratch. At first I could not compile, but that was solved by moving the esp SDK into the directory that the compiler was looking for. Now compile works fine. But it won't write the ESP8266. I think the call it's making to esptool is not working.

From the terminal window I can see that it's calling this command line:

/home/pat/arduinoesp8266/Arduino/build/linux/work/hardware/tools/esp8266/esptool -vv -cd none -cb 115200 -cp /dev/ttyUSB0 -ca 0x00000 -cf /tmp/build8404552834300051463.tmp/sketch_mar29a.cpp_00000.bin -ca 0x40000 -cf /tmp/build8404552834300051463.tmp/sketch_mar29a.cpp_40000.bin


However I can't get that command to work under linux. If I call it directly from another window I get this:

pat@TheJBox:~/arduinoesp8266/Arduino$ /home/pat/arduinoesp8266/Arduino/build/linux/work/hardware/tools/esp8266/esptool -vv -cd none -cb 115200 -cp /dev/ttyUSB0 -ca 0x00000 -cf /tmp/build8404552834300051463.tmp/sketch_mar29a.cpp_00000.bin -ca 0x40000 -cf /tmp/build8404552834300051463.tmp/sketch_mar29a.cpp_40000.bin
Info: esptool v0.0.2 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
Info: This program is licensed under the GPL v2
Info: See the file LICENSE for details



ie nothing - which is what I get from the Arduino UI - nothing.

On my linux box I have previosuly been using the SDK and the following command does work:

sudo /opt/Espressif/esptool-py/esptool.py --port /dev/ttyUSB0 write_flash 0x00000 firmware/0x00000.bin 0x40000 firmware/0x40000.bin


Have I got the wrong esptool installed?

Re: Ubuntu / Arduino ESP 8266 - Won't write to chip

PostPosted: Sun Mar 29, 2015 8:36 am
by igrr
This Arduino version uses another version of esptool, 0.4.2.
It should be downloaded and installed automatically when you build the IDE. You can see it bring downloaded in build.xml (search for esptool).

Re: Ubuntu / Arduino ESP 8266 - Won't write to chip

PostPosted: Mon Mar 30, 2015 4:55 am
by sgoggin
Thank you - I found the right version

I tried running ant dist again - but it did not seem to download the esptools.
Instead I did

git clone https://github.com/igrr/esptool-ck.git
then ran make
then cp build/esptool-ck/esptool ./build/linux/work/hardware/tools/esp8266
finally verified the version by

./build/linux/work/hardware/tools/esp8266/esptool -v

esptool v0.4.2 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>

Now it's working perfectly! Thank you!

Re: Ubuntu / Arduino ESP 8266 - Won't write to chip

PostPosted: Thu Apr 02, 2015 8:27 am
by erniberni
Hi,
because there is no packed version for 32-bit Linux (Ubuntu) I tried to build one from source.
When trying to compile I found there is something missing.
By comparing this version to the packed 64-bit version I found that esptool and the xtensa-lx106-elf directory were missing.
So this post helped a lot. I build both from source with following instructions on the git stores (you have to install some other files before, follow instructions on git)
git clone https://github.com/pfalcon/esp-open-sdk.git
and
git clone https://github.com/igrr/esptool-ck.git
I moved the esptool file and the xtensa-lx106-elf directory to the same location where I found it in the 64-bit installation.
Now it seems to work