Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 09:04 26 Jun 2022 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Flashing the ESP-01

     Page 1 of 2    
Author Message
toml_12953
Senior Member

Joined: 13/02/2015
Location: United States
Posts: 251
Posted: 02:47am 09 Aug 2021
Copy link to clipboard 
Print this post

Can the device pictured below be used to flash new firmware into the ESP-01? I don't see a switch on it to allow that. Also, what is the URL of the latest firmware? I see 1.7.4 listed in this forum but when I go to the Espressif website it looks like the latest version is 2.1 or 2.2 and there's a choice of VROOM, WROVER, PICO, and SOLO. Which one (if any) can we use?


 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 374
Posted: 03:56am 09 Aug 2021
Copy link to clipboard 
Print this post

Yes if you add a tack switch and a jumper per this YouTube video.  https://www.youtube.com/watch?v=6uaIWZCRSz8&ab_channel=CsongorVarga  It works for me.  I am not sure if that bodge wire is necessary but I did it anyway and it works fine.  It also works as the serial link if you do not push the switch while plunging it in.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 4697
Posted: 04:54am 09 Aug 2021
Copy link to clipboard 
Print this post

You need firmware for the ESP8266 not ESP32
I think that you also have to stick to the NonOS branch so

"ESP8266 NonOS AT Bin V1.7.4"

is the latest.

Jim
VK7JH
MMedit   MMBasic Help
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 6225
Posted: 07:08am 09 Aug 2021
Copy link to clipboard 
Print this post

  Quote  Can the device pictured below be used to flash new firmware into the ESP-01?


Don't buy this version. Look for the same but with a switch


 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2092
Posted: 12:16pm 09 Aug 2021
Copy link to clipboard 
Print this post

Toml--this link shows how to solder two wires (fiddly) to the module you showed and then flash mode is automatically set--no need for a switch.

I've used it many times, and it has greatly reduced my frustration level in flashing ESP-01s.

Use a fine (for smd) soldering iron tip.

~
Edited 2021-08-09 22:18 by lizby
 
toml_12953
Senior Member

Joined: 13/02/2015
Location: United States
Posts: 251
Posted: 10:29pm 10 Aug 2021
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Can the device pictured below be used to flash new firmware into the ESP-01?


Don't buy this version. Look for the same but with a switch




OK, I got one of those. It works fine in UART mode. I'd like to use it to update my firmware but I can't seem to find exactly which file(s) to use on the espressif site. Do you have a URL to the latest version?
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2092
Posted: 11:17pm 10 Aug 2021
Copy link to clipboard 
Print this post

Two months ago I used this 2017 link: flash esp8266

I used flash_download_tools_v3.8.8.exe with this setup:



I didn't save the exact url I used to get the NONOS_SDK files.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 4697
Posted: 02:00am 11 Aug 2021
Copy link to clipboard 
Print this post

https://www.espressif.com/sites/default/files/ap/ESP8266_NonOS_AT_Bin_V1.7.4.zip
VK7JH
MMedit   MMBasic Help
 
toml_12953
Senior Member

Joined: 13/02/2015
Location: United States
Posts: 251
Posted: 02:11am 11 Aug 2021
Copy link to clipboard 
Print this post

  toml_12953 said  
  matherp said  
  Quote  Can the device pictured below be used to flash new firmware into the ESP-01?


Don't buy this version. Look for the same but with a switch



OK, I got one of those. It works fine in UART mode. I'd like to use it to update my firmware but I can't seem to find exactly which file(s) to use on the espressif site. Do you have a URL to the latest version?


I found a download site for Non-OS v1.7.4. I don't know what addresses to use, however.

My unit has this configuration:
flash vendor:
20h : N/A
flash devID:
4016h
QUAD;32Mbit
crystal:
26 Mhz


No matter what addresses I use for the files, when I change back to UART mode and start my terminal program (TeraTerm), all I get is a constantly scrolling display of garbage. My flash size is 32Mbit. Does this use different addresses from 32Mbit-C1? The docs don't say what addresses to use for 32Mbit, only 32Mbit-C1. I tried flashing using the 32Mbit-C1 addresses but still get only the scrolling garbage.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 4697
Posted: 03:32am 11 Aug 2021
Copy link to clipboard 
Print this post

https://www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf

The manual has a section on firmware loading.
Have you tried those settings?

Jim

Edit:


Edited 2021-08-11 13:53 by TassyJim
VK7JH
MMedit   MMBasic Help
 
toml_12953
Senior Member

Joined: 13/02/2015
Location: United States
Posts: 251
Posted: 06:08am 11 Aug 2021
Copy link to clipboard 
Print this post

  TassyJim said  https://www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf

The manual has a section on firmware loading.
Have you tried those settings?

Jim

Edit:



Thanks. I did try that. Here's what it looks like:



Here's what I see in the uploader text:
CONNECT BAUD: 115200
============
Stub is already running. No upload is necessary.
-----------------------
crc_efuse_4bit: 0
crc_calc_4bit: 2
48bit mac
Compressed 4080 bytes to 2936...
Compressed 413444 bytes to 296955...
Compressed 4096 bytes to 26...
Compressed 4096 bytes to 26...
Compressed 128 bytes to 75...
Compressed 4096 bytes to 26...

is stub and send flash finish


I still get nothing but garbage in the terminal. It could be a defective ESP-01 or maybe the cheap uploader interface. I have a bunch of ESP-01s coming in soon so at least I can check that possibility.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 1409
Posted: 07:16am 11 Aug 2021
Copy link to clipboard 
Print this post

Honestly, I just tried to program my ESP-01 (512+512 version) with the 1.7.4 no-OS version, and it only outputs garbage. I took the image files from the 512 folder, and burned them using esptool (linux).
I got a success message after programming. But when I powered them the blue LED kept flashing, and garbage came out of the USB port. Tried several baudrates, tried interrupting, tried blindly typing AT+RESTORE, nothing worked.

Tried 2 times, then I could not program the esp-01 anymore. It simply came with a error message, cannot write bootloader (the first to get programmed).

Then I made the modification lizby suggested (2 diodes) and using the Arduino toolchain I could write the esp-01 (blink program). So the esp-01 is not dead.

I already downloaded the 1.6.2 no-OS version (the last said to fit in 512k chips) and may try this tonight.

I did some googling, and there may be an issue with the programming button (GP0) rework of the UART interface. The original bootloader seemed happy with pressing the button during powerup. There have been people suggesting that the newer bootloaders need this pin low constantly during programming. Maybe that is why the diode rework may have worked.

I used esptool in the ubuntu repository (sudo apt-get install esptool). This is not the esptool.py everybody else is using, it has a different command set.
If nothing goes right ... turn left
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 2777
Posted: 07:59am 11 Aug 2021
Copy link to clipboard 
Print this post

Could the garbage mean its baud rate is not what you think?

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 6225
Posted: 09:19am 11 Aug 2021
Copy link to clipboard 
Print this post

ESPs do their initial initialisation at some strange baudrate around 76K then they settle to the programmed level. It is critical you don't try and load a 1Mb image on to a 512K part. Check the legend on the flash chip
 
toml_12953
Senior Member

Joined: 13/02/2015
Location: United States
Posts: 251
Posted: 10:47am 11 Aug 2021
Copy link to clipboard 
Print this post

  matherp said  ESPs do their initial initialisation at some strange baudrate around 76K then they settle to the programmed level. It is critical you don't try and load a 1Mb image on to a 512K part. Check the legend on the flash chip


I manually tried setting TeraTerm's baud rate to 76000 and sure enough, all that garbage is error messages.

correct flash map
mismatch map 5,spi_size_map 0
system param partition error
--- The partition table size is larger than flash size 0x80000 ---
please check partition type 6 addr:1fd000 len:3000
system_partition_table_regist fail
V2
Mo
rf_cal[0] !=0x05,is 0x00

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

load 0x40100000, len 2592, room 16
tail 0
chksum 0xf3
load 0x3ffe8000, len 764, room 8
tail 4
chksum 0x92
load 0x3ffe82fc, len 676, room 4
tail 0
chksum 0x22
csum 0x22

2nd boot version : 1.7(5d6f877)
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size & Map: 4Mbit(256KB+256KB)
jump to run user1 @ 1000
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 6225
Posted: 10:57am 11 Aug 2021
Copy link to clipboard 
Print this post

  Quote  The partition table size is larger than flash size 0x80000


That looks like the answer

  Quote  It is critical you don't try and load a 1Mb image on to a 512K part. Check the legend on the flash chip


or 4Mb image on 1Mb chip
Edited 2021-08-11 20:57 by matherp
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2092
Posted: 11:39am 11 Aug 2021
Copy link to clipboard 
Print this post

  toml_12953 said  My unit has this configuration:
flash vendor:
20h : N/A
flash devID:
4016h
QUAD;32Mbit
crystal:
26 Mhz


Are you sure that the Flash size of 32MBit is correct rather than the 8MBit my ESP-01s report? (Maybe that's matherp's suggestion that you may be trying to pour 4MB into a 1MB bucket.)

Interesting that the output garbage (which I have seen before) reads as error messages at 76000 baud. That's a valuable insight.

~
Edited 2021-08-11 21:48 by lizby
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 6225
Posted: 12:00pm 11 Aug 2021
Copy link to clipboard 
Print this post

Baudrate is properly 74880 = 115200/40*26 (26Mhz xtal when expecting 40Mhz)
 
toml_12953
Senior Member

Joined: 13/02/2015
Location: United States
Posts: 251
Posted: 01:26pm 11 Aug 2021
Copy link to clipboard 
Print this post

I'm most concerned with this part of the error message:

--- The partition table size is larger than flash size 0x80000 ---
please check partition type 6 addr:1fd000 len:3000
system_partition_table_regist fail


I don't know how to change the partition table
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 6225
Posted: 01:51pm 11 Aug 2021
Copy link to clipboard 
Print this post

  Quote  I don't know how to change the partition table


Look at the post by lizby above. Use the 512+512 image and his address settings. If you have a black ESP01 it is almost certainly 8Mbit/1Mbyte
 
     Page 1 of 2    
Print this page
© JAQ Software 2022