Frozen ESP32

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
User avatar
MorseIot
Posts: 38
Joined: Fri Jun 29, 2018 12:32 am

Frozen ESP32

Post by MorseIot » Wed Aug 22, 2018 3:10 am

Let's get into the problem.

1. I made the micropython clone

Code: Select all

git clone https://github.com/micropython/micropython.git
checkout in version v1.9.4 
2. in ports / esp32 I made the esp-idf clone

Code: Select all

git clone --recursive https://github.com/espressif/esp-idf.git
git checkout v.3.0
git submodule update -init
3. When doing make, it presents the following error

Code: Select all

/home/vagrant/micropython/ports/esp32/esp-idf/components/bootloader_support/src/bootloader_flash.c:16:30: fatal error: bootloader_flash.h: No such file or directory

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Frozen ESP32

Post by jickster » Thu Aug 23, 2018 3:02 am

Does the file actually exist in the repository on the website?

User avatar
MorseIot
Posts: 38
Joined: Fri Jun 29, 2018 12:32 am

Re: Frozen ESP32

Post by MorseIot » Thu Aug 23, 2018 4:52 am

jickster wrote:
Thu Aug 23, 2018 3:02 am
Does the file actually exist in the repository on the website?
I need to know which branch of esp-idf works with micropython for esp32

esp-idp
git checkout <branch>

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

Re: Frozen ESP32

Post by Roberthh » Thu Aug 23, 2018 5:57 am

You can see that in the ESP32 Makefile at the line:
ESPIDF_SUPHASH := 30545f4cccec7460634b656d278782dd7151098e
So it's the one with the hash 30545f4cccec7460634b656d278782dd7151098e
I recall having used the command:
git submodule update --init --recursive
in both the esp-idf source tree and in the micropython tree AFTER the checkout of the respective version. And reecntly the esp-idf tree was kind of messed up, so I reinstalled it. But that should not yet be your situation.

User avatar
MorseIot
Posts: 38
Joined: Fri Jun 29, 2018 12:32 am

Re: Frozen ESP32

Post by MorseIot » Thu Aug 23, 2018 4:02 pm

Roberthh wrote:
Thu Aug 23, 2018 5:57 am
You can see that in the ESP32 Makefile at the line:
ESPIDF_SUPHASH := 30545f4cccec7460634b656d278782dd7151098e
So it's the one with the hash 30545f4cccec7460634b656d278782dd7151098e
I recall having used the command:
git submodule update --init --recursive
in both the esp-idf source tree and in the micropython tree AFTER the checkout of the respective version. And reecntly the esp-idf tree was kind of messed up, so I reinstalled it. But that should not yet be your situation.
I opened the Makefile file and my hash is:
ESPIDF_SUPHASH: = 3ede9f011b50999b0560683f9419538c066dd09e

Code: Select all

cd esp-idf
git checkout 3ede9f011b50999b0560683f9419538c066dd09e
git submodule update --init --recursive

Code: Select all

cd micropython
git checkout v1.9.4
git submodule update --init --recursive

Code: Select all

cd ports / esp32
make
compilation success
I recorded firmware
but when resetting the esp32 by software (machine.reset ()), it presents the following error:

Code: Select all

Guru Meditation Error: Core 0 panic'ed (IllegalInstruction)
. Exception was unhandled.
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction)
. Exception was unhandled.
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction)
. Exception was unhandled.
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction)
. Exception was unhandled.
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction)
. Exception was unhandled.
I do not know what else to do.

thankful

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

Re: Frozen ESP32

Post by Roberthh » Thu Aug 23, 2018 5:16 pm

I recorded firmware
Do you mean you flashed the firmare to the device.
By which means did you do that. A convenient way is to use the command:

make deploy

And after flashing the firmware to the device you get a REPL prompt?

User avatar
MorseIot
Posts: 38
Joined: Fri Jun 29, 2018 12:32 am

Re: Frozen ESP32

Post by MorseIot » Thu Aug 23, 2018 7:13 pm

Roberthh wrote:
Thu Aug 23, 2018 5:16 pm
I recorded firmware
Do you mean you flashed the firmare to the device.
By which means did you do that. A convenient way is to use the command:

make deploy

And after flashing the firmware to the device you get a REPL prompt?
I'm using esptool (windows), example:

Code: Select all

esptool.py - esp32 chip --port com6 write_flash 0x01000. \ firmware.bin
PS1. Because the server is distant, I compile the firmware, transfer it via FTP and record it as a esptool in Windows.
PS2. I already use this method to write esp8266 firmware without any problem

yes repl works

when exec repl, after password confirmation

Would you like to reboot now? (y / n)

I receive the following error message

Code: Select all

Guru Meditation Error: Core 0 panic'ed (IllegalInstruction)
. The exception was unhandled.
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction)
. The exception was unhandled.
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction)
. The exception was unhandled.
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction)
. The exception was unhandled.
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction)
. The exception was unhandled.
The same applies to

Code: Select all

import machine
machine.reset ()
otherwise esp32 works normally
Last edited by MorseIot on Thu Aug 23, 2018 7:19 pm, edited 2 times in total.

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

Re: Frozen ESP32

Post by Roberthh » Thu Aug 23, 2018 7:16 pm

when exec repl, after password confirmation

Would you like to reboot now? (y / n)

I receive the following error message
Where does that come from? The ESP32 does not ask for a password and the reboot question.

User avatar
MorseIot
Posts: 38
Joined: Fri Jun 29, 2018 12:32 am

Re: Frozen ESP32

Post by MorseIot » Thu Aug 23, 2018 7:20 pm

Roberthh wrote:
Thu Aug 23, 2018 7:16 pm
when exec repl, after password confirmation

Would you like to reboot now? (y / n)

I receive the following error message
Where does that come from? The ESP32 does not ask for a password and the reboot question.
yes password e password confirmation, repl works
I connect and download files

User avatar
MorseIot
Posts: 38
Joined: Fri Jun 29, 2018 12:32 am

Re: Frozen ESP32

Post by MorseIot » Thu Aug 23, 2018 7:22 pm

to complete

I'm using esptool (windows), example:

Code: Select all

esptool.py - esp32 chip --port com6 write_flash 0x01000. \ firmware.bin

PS1. Because the server is distant, I compile the firmware, transfer it via FTP and record it as a esptool in Windows.
PS2. I already use this method to write esp8266 firmware without any problem

Post Reply