MaloufSleep / ME-ESP8266

Malouf Electronics - ESP8266 Dev Board
MIT License
204 stars 5 forks source link

MicroPython support? #4

Closed PinkFreud closed 3 years ago

PinkFreud commented 3 years ago

Despite claimed support on www.maloufelectronics.com/story for python, I can't figure out how to convince MicroPython to load on this board.

Following the directions for generic ESP8266 support on http://docs.micropython.org/en/v1.16/esp8266/tutorial/intro.html, coupled with information from the main README in this repo, I've tried flashing both MicroPython 1.16 and 1.15 with the following options: $ esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size=detect -fm dout 0 esp8266-20210618-v1.16.bin

I only get garbage on the serial port - I've tried a variety of baud rates, including 115200 (default for the python REPL), 74880 (default for the python bootloader), 230400, 460800 - all I get is garbage at all of these. The fact that I'm not seeing any boot messages at 74880 further tells me that this board is completely failing to load MicroPython from the flashed image.

Has python support been tested on this board? If so, is there some trick to getting a flash to succeed that I haven't figured out yet?

PinkFreud commented 3 years ago

I only get garbage on the serial port - I've tried a variety of baud rates, including 115200 (default for the python REPL), 74880 (default for the python bootloader)

Never mind on this part - it looks like screen doesn't work with 74880 baud. I've changed to miniterm.py, and can now see the boot messages.

The rest of this issue still stands - MicroPython is failing to boot. However, I now have more information to go on from the bootloader: `ets Jan 8 2013,rst cause:2, boot mode:(3,1)

load 0x40100000, len 30736, room 16 tail 0 chksum 0x47 load 0x3ffe8000, len 996, room 8 tail 12 chksum 0x99 ho 0 tail 12 room 4 load 0x3ffe83f0, len 1064, room 12 tail 12 chksum 0xaa csum 0xaa rf_cal[0] !=0x05,is 0xFF `

PinkFreud commented 3 years ago

And closing. This is a problem with micropython, documented in issue 2335.

https://github.com/micropython/micropython/issues/2335#issuecomment-520210822 has the fix. I've been able to confirm that building the ESP sdk and building micropython via the sdk allows micropython to see the full 16MB flash.

fellowgeek commented 3 years ago

Awesome, looks like you found the solution before I had a chance to dig into this.

Thanks :)

PinkFreud commented 3 years ago

NP! Thank you and your team for the board!