Sparkfun ESP32 board

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
Darius
Posts: 4
Joined: Wed Aug 08, 2018 2:45 pm

Sparkfun ESP32 board

Post by Darius » Wed Aug 08, 2018 11:23 pm

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:0x22b2caaf,len:994132516
1162 mmu set 00010000, pos 00010000
1162 mmu set 00020000, pos 00020000
1162 mmu set 00030000, pos 00030000
1162 mmu set 00040000, pos 00040000
1162 mmu set 00050000, pos 00050000
1162 mmu set 00060000, pos 00060000
1162 mmu set 00070000, pos 00070000
1162 mmu set 00080000, pos 00080000
1162 mmu set 00090000, pos 00090000
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:0x22b2caaf,len:994132516
1162 mmu set 00010000, pos 00010000
Hi,
I am trying MicroPython on SparkFun's ESP32 'Thing' but it crashes after flashing..

With esp32-20180808-v1.9.4-443-gc1c798fbc.bin ->

1162 mmu set 00020000, pos 00020000
1162 mmu set 00030000, pos 00030000
1162 mmu set 00040000, pos 00040000
1162 mmu set 00050000, pos 00050000
1162 mmu set 00060000, pos 00060000
1162 mmu set 00070000, pos 00070000
1162 mmu set 00080000, pos 00080000
1162 mmu set 00090000, pos 00090000
ets Jun 8 2016 00:22:57


With esp32-20180511-v1.9.4.bin ->

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:0x0008e0c4,len:25745276
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:0x0008e0c4,len:25745276

I did a flash erase & write as well but no change.

Capstan
Posts: 104
Joined: Sun Jan 29, 2017 4:03 pm
Location: Texas, USA

Re: Sparkfun ESP32 board

Post by Capstan » Mon Aug 13, 2018 10:31 pm

How are you flashing it?

Darius
Posts: 4
Joined: Wed Aug 08, 2018 2:45 pm

Re: Sparkfun ESP32 board

Post by Darius » Tue Aug 14, 2018 1:16 am

I flashed it like this..

Code: Select all

esptool.py --chip esp32 --port /dev/cu.usbserial-DN02MPA4 write_flash -z 0x1000 ~/Downloads/esp32-20180808-v1.9.4-443-gc1c798fbc.bin
Interestingly I subsequently tried an Espruino image like so..

Code: Select all

esptool.py --chip esp32 --port /dev/cu.usbserial-DN02MPA4 write_flash -z 0x1000 ~/Downloads/esp32-20180511-v1.9.4.bin
--chip esp32                                \
        --port /dev/ttyUSB0                         \
        --baud 921600                               \
        --after hard_reset write_flash              \
        -z                                          \
        --flash_mode dio                            \
        --flash_freq 40m                            \
        --flash_size detect                         \
        0x1000 bootloader.bin                       \
        0x8000 partitions_espruino.bin              \
        0x10000 espruino_esp32.bin
which crashed.. but then I re-did the MicroPython image like so and it worked?!

Code: Select all

esptool.py --chip esp32                                \
        --port /dev/cu.usbserial-DN02MPA4                         \
        --baud 921600                               \
        --after hard_reset write_flash              \
        -z                                          \
        --flash_mode dio                            \
        --flash_freq 40m                            \
        --flash_size detect                         \
        0x1000 esp32-20180808-v1.9.4-44

Capstan
Posts: 104
Joined: Sun Jan 29, 2017 4:03 pm
Location: Texas, USA

Re: Sparkfun ESP32 board

Post by Capstan » Tue Aug 14, 2018 3:16 am

So it is working for you? What cued you to change the flashing options to those particular values?

Darius
Posts: 4
Joined: Wed Aug 08, 2018 2:45 pm

Re: Sparkfun ESP32 board

Post by Darius » Tue Aug 14, 2018 3:19 am

Yes it does work now, I should've updated my post.

As for why I changed - I saw that Espruino got a little further with different options so I tried those for MicroPython - sometimes even wild guesses pay off :)

I did wonder if the image had some settings my ESP32 board didn't like but image_info didn't show anything useful, eg..

Code: Select all

[Maelstrom 12:49] ~ >esptool image_info ~/Downloads/esp32-20180808-v1.9.4-443-gc1c798fbc.bin
esptool.py v2.5.1-dev
WARNING: Suspicious segment 0xee, length 0
WARNING: Suspicious segment 0x0, length 16777216

A fatal error occurred: End of file reading segment 0x0, length 16777216 (actual length 1047432)
[Maelstrom 12:49] ~ >esptool image_info ~/Downloads/espruino_1v99_esp32.bin
esptool.py v2.5.1-dev
WARNING: Suspicious segment 0xee, length 0
WARNING: Suspicious segment 0x0, length 16777216

A fatal error occurred: End of file reading segment 0x0, length 16777216 (actual length 1111544)

User avatar
liudr
Posts: 140
Joined: Tue Oct 17, 2017 5:18 am

Re: Sparkfun ESP32 board

Post by liudr » Thu Aug 16, 2018 4:53 pm

You never posted what flashing command you used that caused your dev board to crash though. I bet the crashes were caused by the command. One needn't to do wild guesses. I have done a dozen or two flashes and everything it went correctly. I keep the command in a document. It's a good idea to log what command you use, especially when it is going very well and you thought nothing was going to break.

Here is the official firmware with flash command:
http://micropython.org/download#esp32

Darius
Posts: 4
Joined: Wed Aug 08, 2018 2:45 pm

Re: Sparkfun ESP32 board

Post by Darius » Fri Aug 17, 2018 12:32 am

I posted it here viewtopic.php?p=29401#p29327

I did try a chip erase as well.

I re-ran that command and flashed it again and it worked, so.. I have no idea why it didn't work previously :-/

User avatar
pythoncoder
Posts: 2973
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Sparkfun ESP32 board

Post by pythoncoder » Fri Aug 17, 2018 4:37 am

liudr wrote:
Thu Aug 16, 2018 4:53 pm
...I keep the command in a document...
Even better is to keep the command in a script ;) Like these examples. That way I can run (for example) buildpyb. It detects the type of attached board, gets the latest code, builds it for the right target, and flashes it. With my senescent brain it saves no end of silly mistakes ;)
Peter Hinch

User avatar
liudr
Posts: 140
Joined: Tue Oct 17, 2017 5:18 am

Re: Sparkfun ESP32 board

Post by liudr » Sat Aug 18, 2018 12:37 am

Thanks. I'll try and learn more scripting (maybe more docs to write about how to do scripting so I can read about it when I forget). It's really hard to remember things the way I used to.

User avatar
pythoncoder
Posts: 2973
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Sparkfun ESP32 board

Post by pythoncoder » Sat Aug 18, 2018 7:47 am

liudr wrote:
Sat Aug 18, 2018 12:37 am
It's really hard to remember things the way I used to.
Tell me about it :( I script tasks to compensate for my increasingly lousy memory. And growing ineptitude like building code for the wrong target...
Peter Hinch

Post Reply