MicroPython on ESP32 with SPIRAM support

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
User avatar
tuupola
Posts: 54
Joined: Sun Sep 17, 2017 12:10 am
Contact:

Re: MicroPython on ESP32 with SPIRAM support

Post by tuupola » Tue Jan 30, 2018 5:48 am

I would be especially vary about the Pycom code. Company is funded by investor money. Investor money means decisions made by a board. Board is more likely to send nastygrams.

Good thing is not relicensing code to GPL is a license violation. License violation only means you must stop using the GPL licensed code.

loboris
Posts: 320
Joined: Fri Oct 02, 2015 6:19 pm

Re: MicroPython on ESP32 with SPIRAM support

Post by loboris » Tue Jan 30, 2018 8:38 am

@mattyt

The random issue can be easily resolved as I already have a different random number implementation on other place.

I2C driver is based on Pycoms driver, but heavily modified. I'm not shure if the original lecensing could be removed.
There is absolutely no original code in this file as it uses the wrapping to the esp-idf i2c API and standard MicroPython wrapping, so I'm not shure why the GNU GPL licensing was added.
If I were writting it from scratch, it would look the same, it simply can't be written a different way.

libquickmail uses curl (and needs it to function), I could probably contact the author to see if changing the licensing is possible.
At the moment I dont have time to write it from scratch.
A menuconfig option could be added to exclude it from the build.

User avatar
tuupola
Posts: 54
Joined: Sun Sep 17, 2017 12:10 am
Contact:

Re: MicroPython on ESP32 with SPIRAM support

Post by tuupola » Tue Jan 30, 2018 10:12 am

loboris wrote:
Tue Jan 30, 2018 8:38 am
There is absolutely no original code in this file as it uses the wrapping to the esp-idf i2c API and standard MicroPython wrapping, so I'm not shure why the GNU GPL licensing was added.
Advisory board making decisions? :)
loboris wrote:
Tue Jan 30, 2018 8:38 am
If I were writting it from scratch, it would look the same, it simply can't be written a different way.
Maybe you can find a version which was committed before Pycom changed to GPL and then base your version on that. License change happened some time in 2016. Sadly they seem to have deleted the original repos and current does not have full history.

Or if it is basically just esp-idf i2c API with some wrappings maybe move stuff around and change variable names so it is clean enough to be claimed to be a different version.

I know this an annoyance but there is a reason why some people avoid GPL code like plague.
loboris wrote:
Tue Jan 30, 2018 8:38 am
libquickmail uses curl (and needs it to function), I could probably contact the author to see if changing the licensing is possible. At the moment I dont have time to write it from scratch. A menuconfig option could be added to exclude it from the build.
I would remove it. IMO it is not worth tainting a good project with GPL code. If you include some GPL code then the whole derivative work (in this case your fork of Micropython) has to be GPL licensed. You cannot include some GPL code or libraries and keep rest of the project MIT licensed.

OutoftheBOTS_
Posts: 784
Joined: Mon Nov 20, 2017 10:18 am

Re: MicroPython on ESP32 with SPIRAM support

Post by OutoftheBOTS_ » Wed Jan 31, 2018 8:57 am

Since my LoLin32 pro failed I have tried to build my own board using a wrover module and a Lamb breakout board. Since my usb to serial convert doesn't have the RTS pin broken out I didn't worry about soldering on the 2 transistors and resistors for the esptool to be able to put the ESP32 into boot loader and I am just holding down the boot button and pressing the reset button.

The esptool tries to connect when I run ./BUILD.sh flash but fails.

I have checked that I am getting 3.3v across gnd and 3.3v on the wrover module and that I am getting 3.3v across gnd and en on the wrover. I also checked that I am getting continuity between TXD0 on thw rover and the TX pin on my usb to serial converter and that I have continuity from the RXDo on wrover and RX on my usb to serial converter. I even checked that there was continuity between my boot switch and IO0 and other side og my bpoot switch and GND

I have tried manually jumping IO0 to ground and resetting and trying that but still the same problem.

Does anyone have any suggest why it does connect??

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

Re: MicroPython on ESP32 with SPIRAM support

Post by Roberthh » Wed Jan 31, 2018 9:10 am

if IO0 is low and IO2 high, and you'll then puseh reset, the bootloader should start. You can verify that in the terminal. You should see some kind of message indicating that. A different topic: whichb chip is in the USB/Serial adapter. I have devices with the CH340G, which are not reliable above 230400 baud.
Check also CPIO12 for proper setting. It controls the internal supply voltage for RAM and flash. It should be 1 for 1.8 V, which the WROVER module does internally. So please do not pull it low.

OutoftheBOTS_
Posts: 784
Joined: Mon Nov 20, 2017 10:18 am

Re: MicroPython on ESP32 with SPIRAM support

Post by OutoftheBOTS_ » Wed Jan 31, 2018 9:18 am

@roberthh I will try that now I disconnected everything then reconnected and it got futher. My usb to serial is a cp210 but I do also have a ch340 around here somewhere too and I might try it as well.

This is the output I just got now
---------------------
MicroPython for ESP32
---------------------

=========================================
Flashing MicroPython firmware to ESP32...
=========================================
Building partitions from /home/shane/MicroPython_ESP32_psRAM_LoBo/MicroPython_BUILD/partitions_mpy.csv...
Flashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.1
Connecting........_
Chip is ESP32D0WDQ6 (revision 1)
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Warning: Could not auto-detect Flash size (FlashID=0x0, SizeID=0x0), defaulting to 4MB
Compressed 19504 bytes to 11490...
Wrote 19504 bytes (11490 compressed) at 0x00001000 in 0.1 seconds (effective 1083.7 kbit/s)...

A fatal error occurred: Timed out waiting for packet header
/home/shane/MicroPython_ESP32_psRAM_LoBo/Tools/esp-idf/components/esptool_py/Makefile.projbuild:54: recipe for target 'flash' failed
'make flash' FAILED!

OutoftheBOTS_
Posts: 784
Joined: Mon Nov 20, 2017 10:18 am

Re: MicroPython on ESP32 with SPIRAM support

Post by OutoftheBOTS_ » Wed Jan 31, 2018 9:21 am

on the schematic for the Lamb breakout it has io12 pulled to high not io2.

I tried manually jump both IO2 and IO12 to high and same result

OutoftheBOTS_
Posts: 784
Joined: Mon Nov 20, 2017 10:18 am

Re: MicroPython on ESP32 with SPIRAM support

Post by OutoftheBOTS_ » Wed Jan 31, 2018 9:28 am

if I measure voltage across IO12 and GND I get 2.5v and If I measure resistance between IO12 and 3.3v I get 10.02 Kohms.

So correct resistance with the schematics https://github.com/AnalogLamb/esp32/blo ... eakout.pdf

But higher volatage than 1.8v

OutoftheBOTS_
Posts: 784
Joined: Mon Nov 20, 2017 10:18 am

Re: MicroPython on ESP32 with SPIRAM support

Post by OutoftheBOTS_ » Wed Jan 31, 2018 9:37 am

When I hold down the boot switch and press the reset switch the RX LED on the converter blinks then when I run ./BUILD.sh flash both the RX and TX LEDS flash for a short bit then all LEDs go blank and a few seconds later it fails.

User avatar
mattyt
Posts: 297
Joined: Mon Jan 23, 2017 6:39 am

Re: MicroPython on ESP32 with SPIRAM support

Post by mattyt » Wed Jan 31, 2018 9:47 am

Just tried plugging in my LOLIN32 Pro again - same result. Hot - and quickly too, uncomfortable to touch within 5-10 seconds!

Inspected my soldering of the pins, all looks ok.

I bought a second one but haven't soldered the pins in yet, will try that soon...

Post Reply