user8072: BACKGROUND
To test the capability of uploading program to ESP8266,  I use an empty program with only a blank setup function and a blank loop function. The result showed me that there are a espcomm_sync error and a espcomm_open error. Any idea to solve this problem?

HARDWARE
 

PIN CONNECTION
  Foca v2.2 <-> ESP8266
        TXD <-> RXD
        RXD <-> TXD
        DTR <-> RST

Arduino UNO <-> ESP8266
        GND <-> GND
       3.3V <-> Vcc


PIN DIAGRAMS
Foca v2.2

ESP8266


ON LINUX UBUNTU 15.04


ON WINDOWS 10

REFERENCE

Bring IoT to Arduino, together [Getting Started] - http://www.arduinesp.com/getting-started

user6826: by the comments I think you are not understanding correctly how to connect Reset and GPIO_0 of ESP. To set esp-01 into flash mode (to program) you need to set GPIO_0 Low (GND) and then also apply Low on RST ESP pin.
To debug the things and be certain that there is no hardware problem let just start by doing these connections:
Foca v2.2 <-> ESP =1
      TXD <-> RXD
      RXD <-> TXD
      GND <-> GND
  Arduino <-> ESP 01
     3.3V <-> 3.3V
     3.3V <-> CH_PD
     GND  <-> GND

Now, with a wire, connect GPIO_0 to ground. With another wire, briefly connect RST of the ground to make ESP reset. You should be now in flash mode. Remove the connection on GPIO_0 and make it float. Now upload the code.
Note: this is basically the option C on the link you provide. If you have some buttons you can make it too:

(source: arduinesp.com) 
Now, does the code upload in Arduino IDE?
If the answer is still no, try to add a small capacitor between 3.3v and ground.
If the answer is yes, now you can move on and try the other options described in the link you provide. I recommend using the option A:

(source: arduinesp.com) 
Any generic npn transistor should work

8072: <h2>BACKGROUND</h2>

<p>To test the capability of uploading program to ESP8266,  I use an empty program with only a blank setup function and a blank loop function. The result showed me that there are a <strong>espcomm_sync error</strong> and a <strong>espcomm_open error</strong>. Any idea to solve this problem?</p>

<hr>

<h2>HARDWARE</h2>

<h2><a href="https://i.stack.imgur.com/jHQP2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jHQP2.jpg" alt="Foca v2.2"></a> <a href="https://i.stack.imgur.com/6Z1PO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Z1PO.jpg" alt="ESP8266"></a></h2>

<hr>

<h2>PIN CONNECTION</h2>

<pre><code>  Foca v2.2 &lt;-&gt; ESP8266
        TXD &lt;-&gt; RXD
        RXD &lt;-&gt; TXD
        DTR &lt;-&gt; RST

Arduino UNO &lt;-&gt; ESP8266
        GND &lt;-&gt; GND
       3.3V &lt;-&gt; Vcc
</code></pre>

<hr>

<h2>PIN DIAGRAMS</h2>

<p>Foca v2.2<br>
<a href="https://i.stack.imgur.com/8s6D0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8s6D0.jpg" alt="enter image description here"></a></p>

<p>ESP8266<br>
<a href="https://i.stack.imgur.com/1Ksvu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Ksvu.jpg" alt="enter image description here"></a></p>

<hr>

<h2>ON LINUX UBUNTU 15.04</h2>

<p><a href="https://i.stack.imgur.com/R8SPR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R8SPR.jpg" alt="enter image description here"></a></p>

<hr>

<h2>ON WINDOWS 10</h2>

<p><a href="https://i.stack.imgur.com/eq5MJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eq5MJ.png" alt="enter image description here"></a></p>

<h2>REFERENCE</h2>

<hr>

<p>Bring IoT to Arduino, together [Getting Started] - <a href="http://www.arduinesp.com/getting-started" rel="nofollow noreferrer">http://www.arduinesp.com/getting-started</a></p>
 6826: <p>by the comments I think you are not understanding correctly how to connect Reset and GPIO_0 of ESP. To set esp-01 into flash mode (to program) you need to set GPIO_0 Low (GND) and then also apply Low on RST ESP pin.
To debug the things and be certain that there is no hardware problem let just start by doing these connections:</p>

<pre><code>Foca v2.2 &lt;-&gt; ESP =1
      TXD &lt;-&gt; RXD
      RXD &lt;-&gt; TXD
      GND &lt;-&gt; GND
  Arduino &lt;-&gt; ESP 01
     3.3V &lt;-&gt; 3.3V
     3.3V &lt;-&gt; CH_PD
     GND  &lt;-&gt; GND
</code></pre>

<p>Now, with a wire, <strong>connect GPIO_0 to ground</strong>. With another wire, <strong>briefly</strong> connect <strong>RST of the ground</strong> to make ESP reset. You should be now in flash mode. Remove the connection on GPIO_0 and make it float. Now upload the code.</p>

<p><strong>Note:</strong> this is basically the option C on the link you provide. If you have some buttons you can make it too:
<a href="https://i.stack.imgur.com/9SBe2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9SBe2.jpg" alt="Manually Flash"></a><br>
<sub>(source: <a href="http://www.arduinesp.com/arduinesp/wp-content/uploads/2015/04/TTL-to-ESP01-blink-upload-and-reset-button.jpg" rel="nofollow noreferrer">arduinesp.com</a>)</sub>  </p>

<p><strong>Now, does the code upload in Arduino IDE?</strong></p>

<p>If the answer is still no, try to add a small capacitor between 3.3v and ground.</p>

<p>If the answer is yes, now you can move on and try the other options described in the link you provide. I recommend using the option A:</p>

<p><a href="https://i.stack.imgur.com/bE5r0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bE5r0.png" alt="Automatic Upload"></a><br>
<sub>(source: <a href="http://www.arduinesp.com/arduinesp/wp-content/uploads/2015/07/TTL-to-ESP01-blink-NPN.png" rel="nofollow noreferrer">arduinesp.com</a>)</sub>  </p>

<p>Any generic npn transistor should work</p>
