user66071: I recently bought an ESP-01 as well as an FTDI programmer (3.3v-5v) and after typing AT+GMR I noticed it said:

AT version:0.40.0.0(Aug  8 2015 14:45:58)
SDK version:1.3.0
Ai-Thinker Technology Co.,Ltd.
Build:1.3.0.2 Sep 11 2015 11:48:04

I have looked and looked on a way to upgrade its firmware (on MacOS) to no avail. How can I upgrade it? I want to be able to change the baud rate to 9600. A lot of examples to do it are in windows requiring another application or something like that but how can I do it in a Macbook? Thanks.

user40646: Here is the step-by-step on upgrade the ESP-01 AT Command firmware (for running on macOS).
Wiring
For flashing the ESP-01 firmware, you need to have a USB-TTL adaptor as a programmer.
+---------------------+---------+
|                     | RxD Vcc |
|       Top View      | IO2 RST |
|                     | IO0 CPD |
|                     | GND TxD |
+---------------------+---------+

ESP-01          USB-TTL Adaptor
 VCC   ---------- 3V3
 GND   ---------- GND
 TxD   ---------- RxD
 RxD   ---------- TxD
 CH_PD ---------- see note* below
 GPIO0 ---------- Connect to a push switch (Flash button) to GND
 RST   ---------- a push switch (Reset button) to GND


Note: depend on whether you have ESP-01 or ESP-01S, for ESP-01, you will need to connect CH_PD either directly to 3v3 or via a 3k-10k resistor to 3v3. However, you don't need an extra pull-up resistor for ESP-01S as CH_PD already has on-board pull-up resistor. This picture shows the different between ESP-01 and ESP-01S, visually ESP-01 has 2 LEDs on board near the antenna, while ESP-01S have two extra resistor between header pins and ESP8266EX chip, and with only one LED.

Download and install esptool
Download and install esptool from https://github.com/espressif/esptool. esptool is a python application. You need to have python installed as well.
Download firmware 2.1
Download ESP8266 nonOS SDK - Release 2.1.x, noticed that this is not the latest version as the latest version doesn't works for ESP-01 based on my experience.
Upgrade the firmware
You will actually only need 4 files for the upgrade, I would suggest that you copy and paste those files into your esptool directory from the downloaded bin/ directory. cd into your esptool directory and run the following commands to upgrade the firmware.
To put ESP-01 into programming mode:

Press and hold BOTH buttons;
Release the Reset button while keep holding the Flash button until the upload is completed;
Press Reset to start the newly uploaded program when all upgrades are done.

./esptool.py --port /dev/cu.SLAB_USBtoUART write_flash 0x00000 boot_v1.7.bin
./esptool.py --port /dev/cu.SLAB_USBtoUART write_flash 0x01000 user1.1024.new.2.bin
./esptool.py --port /dev/cu.SLAB_USBtoUART write_flash 0x7c000 esp_init_data_default.bin
./esptool.py --port /dev/cu.SLAB_USBtoUART write_flash 0x3e000 blank.bin
./esptool.py --port /dev/cu.SLAB_USBtoUART write_flash 0x7e000 blank.bin

Please noted that /dev/cu.SLAB_USBtoUART is the USB port for my USB-TTL interface, yours might be different, run ls /dev/tty.* to find out your USB port

66071: <p>I recently bought an ESP-01 as well as an FTDI programmer (3.3v-5v) and after typing <code>AT+GMR</code> I noticed it said:</p>

<ul>
<li>AT version:0.40.0.0(Aug  8 2015 14:45:58)</li>
<li>SDK version:1.3.0</li>
<li>Ai-Thinker Technology Co.,Ltd.</li>
<li>Build:1.3.0.2 Sep 11 2015 11:48:04</li>
</ul>

<p>I have looked and looked on a way to upgrade its firmware (on MacOS) to no avail. How can I upgrade it? I want to be able to change the baud rate to 9600. A lot of examples to do it are in windows requiring another application or something like that but how can I do it in a Macbook? Thanks.</p>
 40646: <p>Here is the step-by-step on upgrade the ESP-01 AT Command firmware (for running on macOS).</p>
<h2>Wiring</h2>
<p>For flashing the ESP-01 firmware, you need to have a USB-TTL adaptor as a programmer.</p>
<pre><code>+---------------------+---------+
|                     | RxD Vcc |
|       Top View      | IO2 RST |
|                     | IO0 CPD |
|                     | GND TxD |
+---------------------+---------+

ESP-01          USB-TTL Adaptor
 VCC   ---------- 3V3
 GND   ---------- GND
 TxD   ---------- RxD
 RxD   ---------- TxD
 CH_PD ---------- see note* below
 GPIO0 ---------- Connect to a push switch (Flash button) to GND
 RST   ---------- a push switch (Reset button) to GND
</code></pre>
<blockquote>
<p>Note: depend on whether you have ESP-01 or ESP-01S, for ESP-01, you will need to connect CH_PD either directly to 3v3 or via a 3k-10k resistor to 3v3. However, you don't need an extra pull-up resistor for ESP-01S as CH_PD already has on-board pull-up resistor. This <a href="https://github.com/e-tinkers/better-way-to-use-esp-01/blob/master/images/ESP-01_versus_ESP-01S.jpg" rel="nofollow noreferrer">picture</a> shows the different between ESP-01 and ESP-01S, visually ESP-01 has 2 LEDs on board near the antenna, while ESP-01S have two extra resistor between header pins and ESP8266EX chip, and with only one LED.</p>
</blockquote>
<h2>Download and install esptool</h2>
<p>Download and install esptool from <a href="https://github.com/espressif/esptool" rel="nofollow noreferrer">https://github.com/espressif/esptool</a>. <code>esptool</code> is a python application. You need to have python installed as well.</p>
<h2>Download firmware 2.1</h2>
<p>Download <a href="https://github.com/espressif/ESP8266_NONOS_SDK/tree/release/v2.1.x" rel="nofollow noreferrer">ESP8266 nonOS SDK - Release 2.1.x</a>, noticed that this is not the latest version as the latest version doesn't works for ESP-01 based on my experience.</p>
<h2>Upgrade the firmware</h2>
<p>You will actually only need 4 files for the upgrade, I would suggest that you copy and paste those files into your esptool directory from the downloaded <code>bin/</code> directory. <code>cd</code> into your esptool directory and run the following commands to upgrade the firmware.</p>
<p>To put ESP-01 into programming mode:</p>
<ol>
<li>Press and hold BOTH buttons;</li>
<li>Release the Reset button while keep holding the Flash button until the upload is completed;</li>
<li>Press Reset to start the newly uploaded program when all upgrades are done.</li>
</ol>
<pre><code>./esptool.py --port /dev/cu.SLAB_USBtoUART write_flash 0x00000 boot_v1.7.bin
./esptool.py --port /dev/cu.SLAB_USBtoUART write_flash 0x01000 user1.1024.new.2.bin
./esptool.py --port /dev/cu.SLAB_USBtoUART write_flash 0x7c000 esp_init_data_default.bin
./esptool.py --port /dev/cu.SLAB_USBtoUART write_flash 0x3e000 blank.bin
./esptool.py --port /dev/cu.SLAB_USBtoUART write_flash 0x7e000 blank.bin
</code></pre>
<p><em><strong>Please noted that <code>/dev/cu.SLAB_USBtoUART</code> is the USB port for my USB-TTL interface, yours might be different, run <code>ls /dev/tty.*</code> to find out your USB port</strong></em></p>
