Some problems flashing Wroom2
-
- Posts: 11
- Joined: Tue Nov 29, 2016 11:10 am
Some problems flashing Wroom2
Postby backupluis » Tue Nov 29, 2016 12:06 pm
I got some problems with my new Wroom 02 module:
First I made a backup of my firmware with esptool, and I restore the backup with the same tool when the module reboots at startup.
All flashes, except my own backup are made with flash_download_tools_v3.4.4
I got a backup of my own boot.bin too, I flash it with esptool.
My report with the original firmware is:
2nd boot version : 1.4(b1)
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size & Map: 16Mbit(512KB+512KB)
jump to run user1 @ 1000
AT version:0.50.0.0(Sep 18 2015 20:55:38)
SDK version:1.4.0
compile time:Sep 18 2015 21:30:56
OK
flash vendor: A1h : FM
flash devID: 4016h QUAD;32Mbit
crystal:
26 Mhz
My problem is I can't update the module boot.bin:
* When I do via AT cmd I got 1 2 3 4 responses, the update finish and the module reboots, and keep rebooting with the following report:
After AT update I got:
2nd boot version : 1.4(b1)
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size & Map: 32Mbit(512KB+512KB)
jump to run user2 @ 81000
Fatal exception (0):
epc1=0x40201c04, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Looks like the same boot version, only change reported flash size and the jump address, due to jump address change I know that the update was ok.
* When I update some compiled program by myself using ESP8266_RTOS_SDK 1.5 and ESP8266_IOT_PLATFORM
1) If I try to flash
boot1.2 or 1.6 (0x0000)
user1 (0x01000)
esp_init_data_default.bin (0x3fc000)
blank.bin (0x7e000, 0x3fe000)
I can't boot anymore, just garbage displayed due to (I guess) Fatal exception errors, I can't see logs due to serial speed.
2) Flash only user1 (0x01000), or user1, blank and esp_init, the module works ok. (Compiled with the same SDK).
*If I flash boot_v1.2.bin or boot_v1.6.bin at 0x0000, the module keeps rebooting.
* I made a test flashing NodeMCU, works ok.
Resuming, Only my own boot.bin works well with my module, Why?
Regards
Luis
First I made a backup of my firmware with esptool, and I restore the backup with the same tool when the module reboots at startup.
All flashes, except my own backup are made with flash_download_tools_v3.4.4
I got a backup of my own boot.bin too, I flash it with esptool.
My report with the original firmware is:
2nd boot version : 1.4(b1)
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size & Map: 16Mbit(512KB+512KB)
jump to run user1 @ 1000
AT version:0.50.0.0(Sep 18 2015 20:55:38)
SDK version:1.4.0
compile time:Sep 18 2015 21:30:56
OK
flash vendor: A1h : FM
flash devID: 4016h QUAD;32Mbit
crystal:
26 Mhz
My problem is I can't update the module boot.bin:
* When I do via AT cmd I got 1 2 3 4 responses, the update finish and the module reboots, and keep rebooting with the following report:
After AT update I got:
2nd boot version : 1.4(b1)
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size & Map: 32Mbit(512KB+512KB)
jump to run user2 @ 81000
Fatal exception (0):
epc1=0x40201c04, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Looks like the same boot version, only change reported flash size and the jump address, due to jump address change I know that the update was ok.
* When I update some compiled program by myself using ESP8266_RTOS_SDK 1.5 and ESP8266_IOT_PLATFORM
1) If I try to flash
boot1.2 or 1.6 (0x0000)
user1 (0x01000)
esp_init_data_default.bin (0x3fc000)
blank.bin (0x7e000, 0x3fe000)
I can't boot anymore, just garbage displayed due to (I guess) Fatal exception errors, I can't see logs due to serial speed.
2) Flash only user1 (0x01000), or user1, blank and esp_init, the module works ok. (Compiled with the same SDK).
*If I flash boot_v1.2.bin or boot_v1.6.bin at 0x0000, the module keeps rebooting.
* I made a test flashing NodeMCU, works ok.
Resuming, Only my own boot.bin works well with my module, Why?
Regards
Luis
Re: Some problems flashing Wroom2
Postby pratik » Wed Nov 30, 2016 10:34 pm
I can't boot anymore, just garbage displayed due to (I guess) Fatal exception errors, I can't see logs due to serial speed.
Please try a serial terminal baud rate of 74880 and let me know if you find something?
Also, what do you mean by "my own boot.bin"? What is the source of the boot file?
By the way, when you compile a program, please select the appropriate boot version when compiling the program. If you compile a program for boot 1.6 and have an old boot in the ESP8266, you may get issues like these!
-
- Posts: 11
- Joined: Tue Nov 29, 2016 11:10 am
Re: Some problems flashing Wroom2
Postby backupluis » Thu Dec 01, 2016 3:31 am
Hi Pratik, thanks for your response.
* With my own boot I mean the boot backup that I made before start to flashing the board, so, is the original boot.bin that came with the module, also I made a whole backup of the memory with esptool too.
* I can't set my serial port to 74880, even using tera term, garbage is displayed allways on the firsts lines of boot or after a reset until the firmware set the speed to 115200, even with a working version of the firmware and with another terminal programs like putty or something else, I got error opening the com port at such speed.
But you can take the example of error when I upgrade via AT+ command:
* I don't know how to select the boot.bin version when compiling, my toolchain, the provided with lubuntu says:
I guess that "boot_v1.2+" means that boot v1.2 and superior can be used, so I use boot v1.6 that came with the toolchain and no luck,
anyway the toolchain don't let me choose a version for boot.bin, just says v1.2+ and came with v1.6.bin
* A few hours ago I made some test and take a deeper look at logged data from serial port since days ago, but I can't understand it:
Original firmware says: SPI Flash Size & Map: 16Mbit(512KB+512KB)
After the AT+ upgrade
Firmware says:
And throw an exception:
Fatal exception (0):
epc1=0x40201c04, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
---- Why AT upgrade change the memory size and map?
Today I found a combination that works:
2nd boot version : 1.6
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size & Map: 16Mbit(1024KB+1024KB)
jump to run user1 @ 1000
I compile for 16Mbit(1024KB+1024KB), use boot_1.6.bin and everything works well, But why flash download tool says that the flash chip
is "flash vendor: A1h : FM flash devID: 4016h QUAD;32Mbit" and I can't upload compiled bin with 32MB option?
So, the questions remaining here are:
* Why AT upgrade from the original firmware leave the module unusable?
* Why or what I'm missing that I cant run firmware compiled with 32MBits options if flash tool say that I have a 32Mb flash?
In part I can, just uploading only user1 at 0x1000 using the original firmware as base, but this lead me to think about some data in non rigth positions, I don't know where are esp_init_data or some thing else at flash memory, in fact I know dumping the backup.bin but is not official.
But I can't use it uploading with boot.bin user1.bin and esp_init and blank.bin at the positions that 2a-esp8266-sdk_getting_started_guide_en.pdf says in page 16 Table 4-4 Download address for FOTA Firmware Column 4096(1024+1024)
*Why I can run using 16Mb(1024+1024) and not 32Mb?
Too many why's, I have a lot to learn yet and I like it, maybe I'm missing something about the platform but due to documentation I'm doing the things in the right way, so I need some explanations.
Regards and thanks for your answer again.
Luis
* With my own boot I mean the boot backup that I made before start to flashing the board, so, is the original boot.bin that came with the module, also I made a whole backup of the memory with esptool too.
* I can't set my serial port to 74880, even using tera term, garbage is displayed allways on the firsts lines of boot or after a reset until the firmware set the speed to 115200, even with a working version of the firmware and with another terminal programs like putty or something else, I got error opening the com port at such speed.
But you can take the example of error when I upgrade via AT+ command:
Code: Select all
jump to run user2 @ 81000
Fatal exception (0):
epc1=0x40201c04, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
* I don't know how to select the boot.bin version when compiling, my toolchain, the provided with lubuntu says:
Please follow below steps(1-5) to generate specific bin(s):
STEP 1: use boot_v1.2+ by default
boot mode: new
I guess that "boot_v1.2+" means that boot v1.2 and superior can be used, so I use boot v1.6 that came with the toolchain and no luck,
anyway the toolchain don't let me choose a version for boot.bin, just says v1.2+ and came with v1.6.bin
* A few hours ago I made some test and take a deeper look at logged data from serial port since days ago, but I can't understand it:
Original firmware says: SPI Flash Size & Map: 16Mbit(512KB+512KB)
After the AT+ upgrade
Firmware says:
SPI Flash Size & Map: 32Mbit(512KB+512KB)
And throw an exception:
Fatal exception (0):
epc1=0x40201c04, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
---- Why AT upgrade change the memory size and map?
Today I found a combination that works:
2nd boot version : 1.6
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size & Map: 16Mbit(1024KB+1024KB)
jump to run user1 @ 1000
I compile for 16Mbit(1024KB+1024KB), use boot_1.6.bin and everything works well, But why flash download tool says that the flash chip
is "flash vendor: A1h : FM flash devID: 4016h QUAD;32Mbit" and I can't upload compiled bin with 32MB option?
So, the questions remaining here are:
* Why AT upgrade from the original firmware leave the module unusable?
* Why or what I'm missing that I cant run firmware compiled with 32MBits options if flash tool say that I have a 32Mb flash?
In part I can, just uploading only user1 at 0x1000 using the original firmware as base, but this lead me to think about some data in non rigth positions, I don't know where are esp_init_data or some thing else at flash memory, in fact I know dumping the backup.bin but is not official.
But I can't use it uploading with boot.bin user1.bin and esp_init and blank.bin at the positions that 2a-esp8266-sdk_getting_started_guide_en.pdf says in page 16 Table 4-4 Download address for FOTA Firmware Column 4096(1024+1024)
*Why I can run using 16Mb(1024+1024) and not 32Mb?
Too many why's, I have a lot to learn yet and I like it, maybe I'm missing something about the platform but due to documentation I'm doing the things in the right way, so I need some explanations.
Regards and thanks for your answer again.
Luis
Re: Some problems flashing Wroom2
Postby pratik » Sun Dec 11, 2016 12:53 pm
Hi Luis,
Please don't trust what the module comes in by default, might be corrupt or empty as well sometimes!
Your serial port adapter or driver does not support weird baud rates like 74880 I guess! I use a CH340/FT232/CP2102, all seem to work fine by default on Windows 10 x64!
This is because the SDK version requires you to use a recent boot!
Really cannot simulate your issue here! Use the AT command set firmware with 32MBit (512+512) and use a recent boot. Also, in ESPtool or whatever you use, make sure you use setting of 32MBit (512+512). I mean don't use conflicting flash sizes or info anywhere.
If still causing issues - erase your entire flash using blank binaries.
An article by me here:
http://www.pratikpanda.com/completely-f ... sh-memory/
A potential flash memory chip defect or issue? Highly unlikely but you never know! Did you try another module?
* With my own boot I mean the boot backup that I made before start to flashing the board, so, is the original boot.bin that came with the module, also I made a whole backup of the memory with esptool too.
Please don't trust what the module comes in by default, might be corrupt or empty as well sometimes!
* I can't set my serial port to 74880, even using tera term, garbage is displayed allways on the firsts lines of boot
Your serial port adapter or driver does not support weird baud rates like 74880 I guess! I use a CH340/FT232/CP2102, all seem to work fine by default on Windows 10 x64!
* I don't know how to select the boot.bin version when compiling, my toolchain, the provided with lubuntu says:
This is because the SDK version requires you to use a recent boot!
* Why AT upgrade from the original firmware leave the module unusable?
Really cannot simulate your issue here! Use the AT command set firmware with 32MBit (512+512) and use a recent boot. Also, in ESPtool or whatever you use, make sure you use setting of 32MBit (512+512). I mean don't use conflicting flash sizes or info anywhere.
If still causing issues - erase your entire flash using blank binaries.
An article by me here:
http://www.pratikpanda.com/completely-f ... sh-memory/
*Why I can run using 16Mb(1024+1024) and not 32Mb?
A potential flash memory chip defect or issue? Highly unlikely but you never know! Did you try another module?
Who is online
Users browsing this forum: No registered users and 56 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.