-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Erasing flash failed (ESF-108) #93
Comments
Its possible, someone could help me please? |
Hello @caiubistaffoker , there appear to be some missing command responses in your logs, for instance responses to Also, we recently had a version bump fixing flash chip detection for some models which were missing support, are you using the latest release? Regarding |
Hello @DNedic! |
The SPI communication is initiated between the target running the Boot ROM and the flash chip of the target, as we need to flash the target flash chip. If you want to upload to RAM of the ESP chip instead you can use the I could not see the response for the SPI_ATTACH commands in the log, only the outgoing command is being logged. Judging by the Can you upload your binary that you're trying to flash, or at least share the size of it? Also, try using |
In this case, are you saying that the SPI is an internal update to the ESP32-WROOM-32E module?
Here is the binary I am trying to burn to the esp32. This binary is the same one that you made available some time ago here on github for the Hello-world example. |
Yes, the module contains the ESP chip and the flash chip containing the second stage bootloader, partition table and the app (or perhaps more apps depending on the config). When we 'flash' the ESP chip we actually flash the flash chip connected to the ESP chip over SPI.
Thank you, I will try reproducing the issue. |
|
Hello @caiubistaffoker , I could not reproduce your issue. Can you please post the output of Additionally, please provide the info on the version of Regarding comparing the output of flashing with
|
Hello @DNedic!
Sorry, but I didn't understand what you meant by the esptool command output. Would it be possible for you to explain better? Or do you have an example?
I'm using the latest version of the serial flasher. Regarding these differences between esptool and esp serial flasher commands, I thought I could find some relationship in the commands and find out where my esp serial flasher was failing. |
Sorry if I didn't explain it very well, Connect the module you're trying to flash to the PC, install Also, please try to also provide missing log parts I already mentioned, or a logic analyzer trace. |
Thanks for this info, it is possible this is related to #92, due to flash size being 16MB, however the 'Flash size detection failed' error is concerning. Can you try flashing the same binary you wanted to flash with |
Hello, @DNedic.
esptool -p COM11 -b 115200 --before default_reset --after hard_reset --no-stub --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 bootloader.bin 0x8000 partition-table.bin 0x10000 hello_world.bin I even included the trace to check the messages, but I couldn't capture it via CMD because it was too much information. The last message says that the recording was successful and below is the photo of this message. So, with this new information, do you think is possible to discover where is the problem with my esp-serial-flasher? |
Try piping the output with tracing to a text file using > and upload it if you can. That might help us even further. |
Below is all the trace from ESPTOOL. A new question has now arisen for me: Does NXP's MCU not necessarily need to use Zephyr OS? Because I'm not using that tool. |
Hello @DNedic, Thank you very much. |
Hello @caiubistaffoker , I have taken a look at the logs again, and while they are only logging one or other side of the transaction, it strikes me as very weird that the last response from the ESP when you're flashig it with your port is Can you provide a log for flashing with your port that covers both TX and RX sides? Additionally maybe you can provide the high-level code you are using for flashing. |
Hello @DNedic! This last answer that you checked, I believe it refers to the recording trace that the Arduino performs on the ESP32. I generated another trace from ESPTOOL, but I can't see how this can help me correctly apply the ESP_SERIAL_FLASHER library. Sorry, but I don't understand what high-level code you would like me to provide you. |
In that case please provide the
I am reffering to the code that is actually using the |
@DNedic |
Of course, you can always contact me at [email protected]. |
Thank you very much, @DNedic . I sent you an email, please check your email box. |
Is your feature request related to a problem?
I'm trying to record the ESP32 through Serial UART mode. I carried out a port to the NXP LPC54628 and the reading/writing of the serial is occurring correctly, however, when the NXP detects the size of the flash in order to load the Flash, an error problem occurs. I understand that this error occurs because the code tries to access the ESP32's Flash via SPI, when in fact it should be via serial UART.
Below is my entire log for you to check the path that is taking place.
`
TEST GRAV ESP32 BY NXP
Entered recording mode...
--- WRITE ---
0xc0 0x 0 0x 8 0x24 0x 0 0x 0 0x 0 0x 0 0x 0 0x 7 0x 7 0x12 0x20 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55
0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0xc0
0xc0 0x 0 0x 8 0x24 0x 0 0x 0 0x 0 0x 0 0x 0 0x 7 0x 7 0x12 0x20 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55
0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0xc0
0xc0 0x 0 0x 8 0x24 0x 0 0x 0 0x 0 0x 0 0x 0 0x 7 0x 7 0x12 0x20 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55
0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0xc0
0xc0 0x 0 0x 8 0x24 0x 0 0x 0 0x 0 0x 0 0x 0 0x 7 0x 7 0x12 0x20 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55
0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0xc0
--- READ ---
0xc0 0x 1 0x 8 0x 4 0x 0 0x 7 0x12 0x20 0x55 0x 0 0x 0 0x 7 0x12 0x20 0x55 0x 0 0x 0 0x 0 0x 0 0xc0
Connection initialized...
--- WRITE ---
0xc0 0x 0 0x a 0x 4 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x10 0x 0 0x40 0xc0
--- READ ---
0xc0 0x 1 0x a 0x 4 0x 0 0x83 0x1d 0xf0 0x 0 0x 0 0x 0 0x 0 0x 0 0xc0
Chip detected...
Target: 1
READ SPI MODE...
--- WRITE ---
0xc0 0x 0 0x a 0x 4 0x 0 0x 0 0x 0 0x 0 0x 0 0x14 0xa0 0xf5 0x3f 0xc0
--- READ ---
0xc0 0x 1 0x a 0x 4 0x 0 0x 0 0x 0 0x10 0x 0 0x 0 0x 0 0x 0 0x 0 0xc0
--- WRITE ---
0xc0 0x 0 0x a 0x 4 0x 0 0x 0 0x 0 0x 0 0x 0 0x c 0xa0 0xf5 0x3f 0xc0
--- READ ---
0xc0 0x 1 0x a 0x 4 0x 0 0x 0 0xa2 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0xc0
--- WRITE ---
0xc0 0x 0 0x d 0x 8 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0xc0
--- READ ---
0xc0 0x 1 0x d 0x 4 0x 0 0x 0 0xa2 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0xc0
Connected to target...
--- WRITE ---
0xc0 0x 0 0x f 0x 8 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x84 0x 3 0x 0 0x 0 0x 0 0x 0 0x 0 0xc0
--- READ ---
0xc0 0x 1 0x f 0x 4 0x 0 0x 0 0xa2 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0xc0 CHANGE BAUD RATE
Transmission rate changed changed
GET BINARIES...
Erasing flash (this may take a while)...
--- WRITE ---
0xc0 0x 0 0x a 0x 4 0x 0 0x 0 0x 0 0x 0 0x 0 0x1c 0x20 0xf4 0x3f 0xc0 DEBUG: Flash size detection failed,
falling back to default 0xc0 0x 0 0x 2 0x10 0x 0 0x 0 0x 0 0x 0 0x 0 0x30 0x61 0x 0 0x 0 0x19 0x 0 0x 0
0x 0 0x 0 0x 4 0x 0 0x 0 0x 0 0x10 0x 0 0x 0 0xc0 Erasing flash failed with error 2.
GO TO FLASH PARTITION TABLE BINARY...
Erasing flash (this may take a while)...
0xc0 0x 0 0x a 0x 4 0x 0 0x 0 0x 0 0x 0 0x 0 0x1c 0x20 0xf4 0x3f 0xc0 DEBUG: Flash size detection failed,
falling back to default 0xc0 0x 0 0x 2 0x10 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x c 0x 0 0x 0 0x 3 0x 0 0x 0
0x 0 0x 0 0x 4 0x 0 0x 0 0x 0 0x80 0x 0 0x 0 0xc0 Erasing flash failed with error 2.
GO TO FLASH HELLO WORLD BINARY...
Erasing flash (this may take a while)...
0xc0 0x 0 0x a 0x 4 0x 0 0x 0 0x 0 0x 0 0x 0 0x1c 0x20 0xf4 0x3f 0xc0 DEBUG: Flash size detection failed,
falling back to default 0xc0 0x 0 0x 2 0x10 0x 0 0x 0 0x 0 0x 0 0x 0 0xf0 0x2b 0x 2 0x 0 0x8b 0x 0 0x 0
0x 0 0x 0 0x 4 0x 0 0x 0 0x 0 0x 0 0x 1 0x 0 0xc0 Erasing flash failed with error 2.
`
Describe the solution you'd like
I believe that the recording of the ESP32's FLASH should all be carried out by the UART, that's why there is that define SERIAL_FLASHER_INTERFACE_UART or would it be for another purpose?
Would it be possible to explain to me in more detail how this ESP32 UART serial recording works?
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: