[SOLVED] WiPy firmware to a standard WROOM-32?
Is that possible?
I tried it and the Windows tool said the flash was successful but the board is resetting with some error (that I don't have handy at the moment, sorry, but I can get it on request) . The same FTDI and breadboard power supply were then used to flash a genuine WiPy and it was successful. Not sure if that's my WROOM or if it just can't be done.
Thanks, You helped me a lot!
robert-hh last edited by robert-hh
@paco88 That is a little bit tricky, since you have to rebuild lib/libesp32.a too. For that, I did the following:
a) go into any of the pycom-esp-idf/examples. I choose. examples/wifi/scan
b) run make. It will lead you through configure. Just exit there, and compiles a build. The configuration does not matter, since you will take that from the pycom directory in step c
c) take skdconfig.h from pycom's esp32 directory and put that into pycom-esp-idf/examples/wifi/scan/build/include
d) touch it, such that it has a new modification date
e) run make again on that example
f) now there is a libesp32.a in pycom-esp-idf/examples/wifi/scan/build/esp32 with the modified esp_get_revision
g) copy that lib file back to pycom's esp32/lib. Don't forget to save the old version.- You will need that for pycom's devices.
For convenience, I've uploaded my modified libesp32.a to https://github.com/robert-hh/Shared-Stuff
But still this is not a full port. Some GPIO's cannot be addressed, only those, which are available on a WiPy. If you want seamless support, better use the Pycom devices with Pycom's firmware, and use the micropython.org or loboris port for other devices.
Can you tell me what part of the code have you modified?
I've modified the esp_get_revision() to return always 0, but can't get the board working.
robert-hh last edited by robert-hh
@paco88 I have made a build of wipy.bin, which you'll find here:
You have to upload it as wipy.bin to your device using esptool, after you loaded it first with the standard wipy file set.
esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x10000 wipy.bin
@paco88 See below about the hack I made. But that was just a trial. I'm not using that practcally. It's not worth the effort to maintain it.
"The revision check is done at many places in the code. I managed to create a version of the 1.10.1b1 firmware for the LOLIN32 lite with a rough hack. I changed the function esp_get_revision() in system_api.c of the esp_idf to always return 0, so the code believes it runs on a revision 0 chip. That is not a clean way and maybe has other side effects."
@robert-hh Did you have found some workaround?
@paco88 I understand that the carrier PCB is called ESP32_Core_board_V2, not the esp32 chip.
Only curiosity, i'm not blaming pycom.
I'm using both wipy2.0 and WROOM32
@paco88 I might be that that the device you are trying uses a revision 1 chip. You can tell by using esptool.py. If the xxPy firmware detects a revision 1 chip, it also assumes 4 Mbyte external RAM and 8 MByt eexternal flash. If that is not present, it will not work.
Please do not blame Pycom for that. They focus on making software for their own devices, which is hard enough.
I'm tryng to run the newest wipy fw (1.10.2.b1) on the WROOM32.
All i have is reboot.
The board work fine with 1.9.2 fw
@easyrider The revision check is done at many places in the code. I managed to create a version of the 1.10.1b1 firmware for the LOLIN32 lite with a rough hack. I changed the function esp_get_revision() in system_api.c of the esp_idf to always return 0, so the code believes it runs on a revision 0 chip. That is not a clean way and maybe has other side effects.
@easyrider The older revisions of the pycom firmware before 1.10.0 run fine on the Lolin 32 lite.
Have uploaded 1.9.2 version using command line and esptool, individually bootloader then partitioner and then wipy firmware. With limited testing board boots ok and runs simple scripts.
Not sure if esp32 revision check is done by uploader.py for all firmware verions or only new 1.10 that supports external 4MB Ram and 8MB flash?
@easyrider I tried it and it fails. @damien's explanation: The Lolin32 Lite uses esp32 revision 1. The Pycom software decides by revision, whether the device has external SPI RAM, and this tries to use SPI-RAM on the LOLIN32 Lite. The ESP32 firmware of micropython.org (http://micropython.org/download/) or loboris' branch of it (https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/tree/master/MicroPython_BUILD/firmware/esp32) work both.
While Im waiting for Wipy 2.o modules.
Have tried to flash Wipy 2.0 firmware on new board from Wemos Lolin 32 Lite without success.
Has anyone else tried new Lolin 32 lite boards?
@BetterAuto Once you have the environment set up to build the firmware yourself, you can simply flash the firmware to any esp32 module with "make TARGET=WIPY flash". I tried that with the Wemos Lolin, which has an WROOM32-module, and and Sparkfun esp32 thing. Since these board have the logic implemented to switch GPIO0, you do not even have to care for strapping it to GND manually. The Huzzah esp32 should work the same way.
@BetterAuto - Thanks for the help, as this post has so many threads, I thought I would create a new one which shows the steps I took.
@BetterAuto - thanks, can you elaborate on what you mean by modify the flasher ?
Is it possible you canalso let me know what you modified in the pins to save me re-inventing the wheel !