Restarts after loading micropython to esp32

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
pja
Posts: 2
Joined: Tue Apr 11, 2017 3:34 am

Restarts after loading micropython to esp32

Post by pja » Tue Apr 11, 2017 3:44 am

I'm new to the esp32 board. Trying to compile and load the micropython image to an ESP-WROOM-32. I have an Ubuntu 16.04 machine and have performed the following steps to build and load micropython

- sudo apt-get install git wget make libncurses-dev flex bison gperf python python-serial
- download pre built binary from https://dl.espressif.com/dl/xtensa-esp3 ... 2.0.tar.gz
- mkdir /media/scratch/esp32
- Copy to /media/scratch/esp32
- cd /media/scratch/esp32
- tar zxvf xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz
- export PATH=$PATH:/media/scratch/esp32/xtensa-esp32-elf/bin
- git clone --recursive https://github.com/espressif/esp-idf.git
- export ESPIDF=/media/scratch/esp32/esp-idf
- /media/scratch/esp32
- git clone https://github.com/micropython/micropython-esp32.git
- cd micropython-esp32/mpy-cross
- make
- cd ../esp32
- Edit the Makefile
PORT ?= /dev/ttyUSB1
BAUD ?= 115200
FLASH_MODE ?= dio
- make
- Boot esp32 with GPIO0 low
- make erase
- Boot esp32 with GPIO0 low
- make flash

The code build and loads the ESP32 but I get the following from the serial port after loading

I (1310) cpu_start: Pro cpu up.
I (1310) cpu_start: Single core mode
I (1311) heap_alloc_caps: Initializing. RAM available for dynamic allocation:
I (1324) heap_alloc_caps: At 3FFAE2A0 len 00001D60 (7 KiB): DRAM
I (1345) heap_alloc_caps: At 3FFD03E8 len 0000FC18 (63 KiB): DRAM
I (1366) heap_alloc_caps: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (1387) heap_alloc_caps: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1409) heap_alloc_caps: At 4009ACC0 len 00005340 (20 KiB): IRAM
I (1430) cpu_start: Pro cpu start user code
I (1490) cpu_start: Starting scheduler on PRO CPU.
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)
Register dump:
PC : 0x40081be0 PS : 0x00060034 A0 : 0x80084d34 A1 : 0x3ffaea40
A2 : 0x3ffae5e0 A3 : 0x3ffaeb74 A4 : 0x00060023 A5 : 0x3f41452e
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x3ffaeb74 A9 : 0x00000001
A10 : 0x3ffaeb74 A11 : 0x00000001 A12 : 0x00060020 A13 : 0x3ffe3b60
A14 : 0x3ffb0c84 A15 : 0x80000168 SAR : 0x00000000 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000

Backtrace: 0x40081be0:0x3ffaea40 0x40084d34:0x3ffaea60 0x40083e9e:0x3ffaea80 0x40081c0e:0x3ffaeac0

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0008,len:8
load:0x3fff0010,len:2372
load:0x40078000,len:6708
load:0x40080000,len:252
entry 0x40080034

Could anyone provide a pointer as to what I may be doing wrong.

Thanks

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: Restarts after loading micropython to esp32

Post by Damien » Wed Apr 12, 2017 4:40 am

In such a case I'd usually suggest to make sure FLASH_MODE is "dio", but I see that you already did that. Maybe try "qio" instead?

Otherwise it looks like you did everything correctly so I'm not sure why it's crashing.

pja
Posts: 2
Joined: Tue Apr 11, 2017 3:34 am

Re: Restarts after loading micropython to esp32

Post by pja » Sun Apr 16, 2017 9:17 am

Thanks for the feedback

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Restarts after loading micropython to esp32

Post by deshipu » Sun Apr 16, 2017 1:56 pm

I had that problem too, but today I tried with the newer version, and it worked. So I guess it's a bit of a lottery.

Post Reply