Go Down

Topic: Is This Mega2560+Wifi Board Broken, Or Do I Miss Something? (Read 317 times) previous topic - next topic

card5

It is better then switching the DIP switches on Uno/Mega+WiFi. They don't  last long if switched frequently.
Yes I indeed thought about how tiny they are, and how risky it is to make any change..
Thanks for pointing it out

card5

Seems that something happened to my flash tool..


I used the Flashing tool several times, and it worked well.

Today when I loaded it and tried to execute an "SpiAutoSet" on a board,
I get an error appearing in the Command Prompt window

"could not open port u" "the system cannot find the path specified"


Please see here:





This is how the Flashing tool's window looks:





What might be causing this problem?


I tried it on several different modules/boards,
and of course made sure to be in Programming (and not Communication) mode,
and pressed the Reset button before starting...


And of course I am on the correct COM Port,
since I checked it via switching to "Communication" mode, and sending AT Commands,
and I received replies successfully..


Anyone familiar with this situation, or can get any hint from the Error message displayed in the DOS window?

card5

OK there is progress.

I gave up the GUI Flashing tool,
and instead used esptool.py:
https://github.com/espressif/esptool


I followed the instructions there:
installed Python v3.7,
installed esptool.py via pip,
and now it works.

I can get status data from the board, and also flash the board successfully.


Also a Command Line tool is much better, since you can save your commands for future use,
which makes life much easier.


I flashed my Mega2560+Wifi board (32Mbit) with the following command:

Code: [Select]
esptool.py -p COM3 write_flash --flash_mode qio --flash_freq 26m --flash_size 4MB-c1
0x000000 boot_v1.7.bin
0x001000 .\at\1024+1024\user1.2048.new.5.bin
0x3FC000 esp_init_data_default_v08.bin
0x0FE000 blank.bin
0x3FE000 blank.bin
0x3FB000 blank.bin

(I broke it here to several lines, but in the command line it was sent all in one line of course)



Note that I chose there --flash_size 4MB-c1 because the board is 32Mbit, and the Firmware version (v1.7.1) only includes 1024+1024, so I had to use -C1.


It seems that I did everything well,
yet when I change the switch from Program to Communication mode,
and Connect to the device, then in the Bootloader's baudrate (74880) this is what I get:






Maybe the command parameters that I used are not good like I thought?


It looks like the last 3 lines hint the problem:
"mismatch map5,spi_size_map 6"

What do I need to change in my parameters to fix it?


Edit:
In the bottom of the esptool.py page,
they wrote a Troubleshooting section.

They recommend there changing from QIO to DIO.

I tried it:




Doesn't seem to solve the problem..

Juraj

OK there is progress.

I gave up the GUI Flashing tool,
and instead used esptool.py:
https://github.com/espressif/esptool


I followed the instructions there:
installed Python v3.7,
installed esptool.py via pip,
and now it works.

I can get status data from the board, and also flash the board successfully.


Also a Command Line tool is much better, since you can save your commands for future use,
which makes life much easier.


I flashed my Mega2560+Wifi board (32Mbit) with the following command:

Code: [Select]
esptool.py -p COM3 write_flash --flash_mode qio --flash_freq 26m --flash_size 4MB-c1
0x000000 boot_v1.7.bin
0x001000 .\at\1024+1024\user1.2048.new.5.bin
0x3FC000 esp_init_data_default_v08.bin
0x0FE000 blank.bin
0x3FE000 blank.bin
0x3FB000 blank.bin

(I broke it here to several lines, but in the command line it was sent all in one line of course)



Note that I chose there --flash_size 4MB-c1 because the board is 32Mbit, and the Firmware version (v1.7.1) only includes 1024+1024, so I had to use -C1.


It seems that I did everything well,
yet when I change the switch from Program to Communication mode,
and Connect to the device, then in the Bootloader's baudrate (74880) this is what I get:






Maybe the command parameters that I used are not good like I thought?


It looks like the last 3 lines hint the problem:
"mismatch map5,spi_size_map 6"

What do I need to change in my parameters to fix it?
this is why I recommend the FDT.

I too was not successful with the esptool and the prebuild binaries of 1.7. there are several reports that the build is strange. the FDT corrects it somehow.

the Lobo builds are good and there is a script to call esptool

card5

ESP8266_NonOS_AT_Bin_V1.7.1 is categorized as a Prebuild?

and what is FDT?

Juraj

ESP8266_NonOS_AT_Bin_V1.7.1 is categorized as a Prebuild?

and what is FDT?
sorry, I call the AT firmware binaries from the Espressif site 'prebuild'. Originally the AT firmware is in examples of the SDK as source code for module manufacturers like for example AI Thinker. (the example is only a layer over closed source AT command library). Later Espressif started to provide binaries. The build of the firmware must know the size of the flash memory of the target to use a correct partitioning, but Flash Download Tool (FDT) can correct it.


card5

I see.


Due to what you said, I tried now with v1.6.2...





It worked on the first time..
(and with QIO)



BTW,
I used the files in the 1024+1024 folder, and of course chose --flash_size 4MB-c1.
Technically I can also use the files in the 512+512 folder, and choose --flash_size 4MB without -C1.


I assume both would work,
so what would be better?

Juraj

I think the 1.7 'prebuild' binaries are for 16 Mbit flash and the esptool would flash it right with addresses for 16 Mbit flash.

card5

Hmm, makes sense, since another person that I know said he succeeded with 16Mbit-C1, despite having a 32Mbit ESP8266..

Your knowledge is amazing Juraj.


And it turns out that Espressif simply cannot be trusted..

Juraj

Hmm, makes sense, since another person that I know said he succeeded with 16Mbit-C1, despite having a 32Mbit ESP8266..

Your knowledge is amazing Juraj.


And it turns out that Espressif simply cannot be trusted..
and right now I got it flashed with esptool as 2MB-c1

for 4MB-c1 it prints
mismatch map 5,spi_size_map 6
system param partition error
system_partition_table_regist fail

I guess the 5 is one of the partition options. it is in the bin name. It was always so but everybody used the 512 kB version which fits in any partitioning

the FDT corrects the partitioning because it changes the bin files before flashing according to settings

card5

and right now I got it flashed with esptool as 2MB-c1

for 4MB-c1 it prints
mismatch map 5,spi_size_map 6
system param partition error
system_partition_table_regist fail
Yes exactly what I got.. It's in the screenshot..


Say, does Espressif have a Version History somewhere,
so people can see the changes that happened between v1.6.2 and v1.7.1?

Juraj

https://github.com/espressif/ESP8266_NONOS_SDK/releases

card5

Thank you so much.


How ironic that they write this in SDK v3.0.0's details:
Quote
Limited by the size of the AT bin files, only 1024+1024 flash map is supported by default.
Therefore, please choose 16Mbit/32Mbit-C1 flash size when flashing these AT bin files with Espressif's Flash Download Tools.
Too bad they never tested their own advice..
They would've discovered that only 16 works and 32 doesn't..

Juraj

Thank you so much.


How ironic that they write this in SDK v3.0.0's details:Too bad they never tested their own advice..
They would've discovered that only 16 works and 32 doesn't..
with FDT it works for 4MB-c1, because the tool modifies the bin file from map 5 to 6

card5

I understand.

I completely abandoned that tool,
the Command Line esptool.py has a huge advantage that If you flashed something once,
and you need to do it again with the same settings (on another identical device, or on the same device in the future) then you can save your command line, and then re-use it.


The concept here is similar to creating tables in a Database:
the command line way is better for automation, than the GUI way..

(and also in my case the GUI tool stopped working, and truly I am happy it happened - it made me try esptool.py)

Go Up