[Solved] ESP32 - Building Micropython - Built Firmware crashes in loop

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
chibill
Posts: 47
Joined: Thu Oct 31, 2019 10:44 pm

[Solved] ESP32 - Building Micropython - Built Firmware crashes in loop

Post by chibill » Thu Oct 31, 2019 11:00 pm

Hello,
I am trying to build micropython for my esp32 because I want to try and use ulab eventually. Firstly I decided to try and just build mircopython with out any edits. I can successfully compile and build it but once I flash it to my esp32 it just crashes repeatedly with no other output.

Crash log is below. Doesn't give much information. I have attached the built firmware.bin file and also a log of the build. (firmware.bin is a going to be a url to my personal server as you can't upload files here)

Code: Select all

ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:QIO, clock div:2
load:0x3fff0018,len:4
load:0x00000008,len:839958914

https://gist.github.com/wgaylord/442d7e ... 27f0006dad Build Log
https://jwgtechs.com/firmware.bin firmware.bin

Any help is appreciated .
Last edited by chibill on Sun Nov 03, 2019 7:11 pm, edited 1 time in total.

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

Re: ESP32 - Building Micropython - Built Firmware crashes in loop

Post by Roberthh » Fri Nov 01, 2019 7:31 am

The build log looks fine, only that I simply use 'make' instead of 'make all'. How do you flash the firmware. The recommended method is using 'make deploy', eventually specifying the port name with 'make PORT=<port name> deploy'. That uses the proper target address for the image.

chibill
Posts: 47
Joined: Thu Oct 31, 2019 10:44 pm

Re: ESP32 - Building Micropython - Built Firmware crashes in loop

Post by chibill » Fri Nov 01, 2019 2:25 pm

I flash it using esptool like in the documentation for how to install the normal firmware.
I can't use the make deploy because I am building it using my linux server not on my windows laptop I use for everything else.

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

Re: ESP32 - Building Micropython - Built Firmware crashes in loop

Post by Roberthh » Fri Nov 01, 2019 3:06 pm

The firmware has to be flashed at offset 0x1000. Did you do that?

chibill
Posts: 47
Joined: Thu Oct 31, 2019 10:44 pm

Re: ESP32 - Building Micropython - Built Firmware crashes in loop

Post by chibill » Fri Nov 01, 2019 3:57 pm

Yes. I can flash the pre-built micropython perfectly fine. Thinking I should start over on trying to compile. (Like delete it all and start over) and maybe go the docker route this time.

Might be something is not up to date or something.

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

Re: ESP32 - Building Micropython - Built Firmware crashes in loop

Post by Roberthh » Fri Nov 01, 2019 4:13 pm

I tried to flash the binary you supplied to a ESP32 device, and that fails too.

chibill
Posts: 47
Joined: Thu Oct 31, 2019 10:44 pm

Re: ESP32 - Building Micropython - Built Firmware crashes in loop

Post by chibill » Fri Nov 01, 2019 4:21 pm

Later today I am going to start over fresh and try again.

chibill
Posts: 47
Joined: Thu Oct 31, 2019 10:44 pm

Re: ESP32 - Building Micropython - Built Firmware crashes in loop

Post by chibill » Sat Nov 02, 2019 5:52 pm

Is there any information or instructions on how to use the docker image stuff for building? (I can't seem to find it in the docs)

As I want to try that today instead of reinstall the whole tool chain. (I think my esp-idf might have been the wrong version)

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

Re: ESP32 - Building Micropython - Built Firmware crashes in loop

Post by Roberthh » Sat Nov 02, 2019 7:06 pm

See this link and fine instruction provided by @jimmo: viewtopic.php?f=18&t=7138#p40636

chibill
Posts: 47
Joined: Thu Oct 31, 2019 10:44 pm

Re: ESP32 - Building Micropython - Built Firmware crashes in loop

Post by chibill » Sat Nov 02, 2019 10:01 pm

Using the docket images seems to have got it working. Thanks!

Post Reply