ESP01 MicroPython install

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

Re: ESP01 MicroPython install

Post by mcauser » Thu Sep 22, 2016 8:39 am

Another difficult but not impossible task would be to replace the SPI flash chips on your fleet of ESP-01s with 4MB chips. 16MB chips are not as easy as they are physically larger, but 4MB ones are the same size.

The price for ordering 4MB flash chips is close to just buying new ESP-12E chips, so its more of a fun exercise in smt soldering than an economical solution.

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: ESP01 MicroPython install

Post by kfricke » Thu Sep 22, 2016 12:41 pm

Just for bringing this thread back to topic...

The ESP-01 module mentioned by the OP has 1 MByte of flash available. Following the OPs link yields this:
Addicore ESP8266 ESP-01 WiFi Wireless Tranceiver Module 1MB (8Mbit) Flash Memory - Google Chrome_033.jpg
Addicore ESP8266 ESP-01 WiFi Wireless Tranceiver Module 1MB (8Mbit) Flash Memory - Google Chrome_033.jpg (110.07 KiB) Viewed 9152 times

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: ESP01 MicroPython install

Post by kfricke » Thu Sep 22, 2016 12:53 pm

kodefoo wrote:...
This repeats over and over until I power cycle the ESP01. After the power cycle the unit has the usual red light lit and will not respond to any input even after moving it out of boot loading mode....
So while in flashing mode with all the needed pins tied high or low everything seems to work. I do assume that after flashing you did simply disconnect everything?

There are some dependencies of these modules on a defined pin state and they often dislike floating pins. You should wire them as needed for normal operation, when not programming the module.

CH_PD - high
GPIO 2 - high
GPIO 0 - low

As a side note: These modules are not intended for the modules best low power mode called "deep sleep". They do miss the access to GPIO 16 which needs to be tied to the RST pin. The module will never wake up from that power mode by itself.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: ESP01 MicroPython install

Post by deshipu » Thu Sep 22, 2016 3:22 pm

GPIO0 has to be low for programming, high for use.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: ESP01 MicroPython install

Post by dhylands » Thu Sep 22, 2016 3:33 pm

Actually, the makefile probably isn't quite as useful.

Comparing mpconfigport.h from say minimal and mpconfigport.h from esp8266 would probably be more useful.

We include many C files in the Makefile which have #if FEATURE_ENABLED at the beginning and #endif at the end, so it looks like its being included in the build, but to the compiler its essentially an empty file.

The linker map will give you an idea of what's actually being included and how much space is being taken up.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP01 MicroPython install

Post by Roberthh » Thu Sep 22, 2016 3:52 pm

For convenience of loading the ESP01 board, I purchased this little part:
http://www.ebay.com/itm/ESP8266-ESP-01- ... 1819907565
You can plug in an ESP01 and a USB/serial converter, and have a switch to start programming.
Update; I just used that board and loaded the actual build to a 1MByte ESP-01. On the first attempt, I had no file system. Erasing flash and re-loading fixed that.

kodefoo
Posts: 10
Joined: Wed Sep 21, 2016 3:56 am

Re: ESP01 MicroPython install

Post by kodefoo » Fri Sep 23, 2016 6:27 am

Thank you for the input.

I have double checked the lines to the ESP01 twice and reflashed it many many times with all the v1.8 firmwares. I also tried multiple SPI modes, but that didn't make any difference. They all do the same thing as I mentioned originally. They finish loading and then spew Fatal exceptions until I reboot them. Once rebooted there is no AP and no serial CLI I can access. I am moving GPIO0 high after the reboot. Debugging says the following.

--- Miniterm on COM5 76800,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

Could this be a power issue from the 3.3v on the Arduino UNO I am using as the bridge to the ESP01? I have seen some folks mention power as a problem. Unfortunately I don't have anything else readily available to power it.

Pin layout is as follows for programming:
ESP01 PIN#/Name-----Arduino PIN#/Name
1 TX 1 TX
2 GND BB GND (common on breadboard)
3 CH_PD BB 3.3v (common on breadboard)
4 GPIO2 BB 3.3v (common on breadboard)
5 RST BB 3.3v (common on breadboard)
6 GPIO0 BB GND (common on breadboard)
7 VCC BB 3.3v (common on breadboard)
8 RX 0 RX

Pin layout is as follows for running:
ESP01 PIN#/Name-----Arduino PIN#/Name
1 TX 1 TX
2 GND BB GND (common on breadboard)
3 CH_PD BB 3.3v (common on breadboard)
4 GPIO2 BB 3.3v (common on breadboard)
5 RST BB 3.3v (common on breadboard)
6 GPIO0 BB 3.3v (common on breadboard)
7 VCC BB 3.3v (common on breadboard)
8 RX 0 RX

Thanks!

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP01 MicroPython install

Post by Roberthh » Fri Sep 23, 2016 7:38 am

For the ESP port, the serial speed must be 115200 for operation, and > 400000 for programming. Better use a dedicated USB/Serial adapter.
And, obviously, TX and RX must be crossed. RX(ESP) -> TX(Adapter). TX(ESP)->RX(Adapter)

User avatar
platforma
Posts: 258
Joined: Thu May 28, 2015 5:08 pm
Location: Japan

Re: ESP01 MicroPython install

Post by platforma » Fri Sep 23, 2016 8:27 am

I would take the Arduino out of the equation. Get a cheap USB to serial adapter and a breadboard usb power supply (just don't power it from the usb2serial adapter). I used to flash my esp-01 through a buspirate and that caused all sorts of headaches.

User avatar
platforma
Posts: 258
Joined: Thu May 28, 2015 5:08 pm
Location: Japan

Re: ESP01 MicroPython install

Post by platforma » Fri Sep 23, 2016 8:29 am

ESP01 PIN#/Name-----Arduino PIN#/Name
1 TX 1 TX
...
8 RX 0 RX
As Roberthh mentioned, TX/RX should be crossed. It's not clear from your post if they are :)

Post Reply