OHHHH!!! I think I know what it is.
instead of running the script like this.
python make.py esp32 -mpy_cross -submodules -clean BOARD=ESP32_GENERIC MICROPY_BOARD_VARIANT=SPIRAM
do this instead
python3 make.py esp32 -mpy_cross -submodules -clean BOARD=ESP32_GENERIC MICROPY_BOARD_VARIANT=SPIRAM
see if that works.
Using…
python3 make.py esp32 -mpy_cross -submodules -clean BOARD=ESP32_GENERIC MICROPY_BOARD_VARIANT=SPIRAM
started @ 4:19
build stoped @ 4:21
I quit after ~ 4min
Crazy right
I can tell you this. It started to compile so any changes that needed to be made got made to allow the compilation to work.
So do this. Lets remove the make.py script from the equation.
try this.
make clean -C /micropython/ports/esp32 BOARD=ESP32_GENERIC MICROPY_BOARD_VARIANT=SPIRAM USER_C_MODULES=../../../../micropython.cmake
make -C /micropython/ports/esp32 BOARD=ESP32_GENERIC MICROPY_BOARD_VARIANT=SPIRAM USER_C_MODULES=../../../../micropython.cmake
That’s ok move onto the second command
ok do this.
cd micropython
make -C /ports/esp32 BOARD=ESP32_GENERIC MICROPY_BOARD_VARIANT=SPIRAM USER_C_MODULES=../../../../micropython.cmake
I am an idiot.
make -C ports/esp32 BOARD=ESP32_GENERIC MICROPY_BOARD_VARIANT=SPIRAM USER_C_MODULES=../../../../micropython.cmake
so the first 2 will work as well if you remove the leading slash from the path after the “-C”
if you are using IDF v5.0.4 downgrade it to 5.0.2 and see if the problem exists.
in order to do the downgrade you need to perform a recursive remove of the .espressif
folder in your home directory. The go into the esp-idf folder and run the following commands.
git checkout v5.0.2
git submodule update --init --recursive
./install.sh all
. ./export.sh
Make sure to add the -submodules and -clean switchs to your build the first go around. Soo if you still get that same i2s error
one other goof on my part
make -C ports/esp32 BOARD=ESP32_GENERIC BOARD_VARIANT=SPIRAM USER_C_MODULES=../../../../micropython.cmake
I tried a clean install,
rm -rf /Users/$USER/.espressif
rm -rf ./esp-idf
rm -rf ./lv_binding_micropython
git clone https://github.com/espressif/esp-idf
cd esp-idf
git checkout v5.0.2
git submodule update --init --recursive
./install.sh all
. ./export.sh
cd ..
git clone https://github.com/kdschlosser/lv_binding_micropython
cd lv_binding_micropython
git checkout MicroPython_1.21.0_Update
git submodule update --init --recursive
python make.py esp32 -mpy_cross -submodules -clean
BOARD=ESP32_GENERIC MICROPY_BOARD_VARIANT=SPIRAM
I2S conflict on booting,
E (1026) i2s(legacy): CONFLICT! The new i2s driver
can't work along with the legacy i2s driver
abort() was called at PC 0x40208f23 on core 0
I am not using I2S on my project at the moment.
This is just for your information.
And thanks again, i think this is so great!
ok so to get past the issues with the I2S you need to build using the following
python3 make.py esp32 -mpy_cross -submodules -clean
BOARD=ESP32_GENERIC BOARD_VARIANT=SPIRAM
Make sure you use that exact build command. It MUST be BOARD_VARIANT not MICROPY_BOARD_VARIANT and it also must be python3 and not python
Try that first. If it still doesn’t work then try
python3 make.py esp32 -mpy_cross -submodules -clean
BOARD=ESP32_GENERIC BOARD_VARIANT=SPIRAM CFLAGS="-DMICROPY_PY_MACHINE_I2S=0"
I also recommend you do git -pull
because I have made some changes to the code.
Just for sure, I deleted lv_binding_micropython and clone, updated all subs.
I followed the first, care with BOARD_VARIANT, but it still throw the CONFLICT.
I thought the second will be okay, but I don’t know why the CFLAGS did not affect the setting.
it is same as the first, throws the CONFLICT.
I edited the mpconfport.h , #define MICROPY_PY_MACHINE_I2S (0)
it is okay to boot up.
MicroPython v1.21.0-dirty on 2023-12-01; Generic ESP32 module with SPIRAM with ESP32
Type "help()" for more information.
>>> import lvgl as lv
Strange behavior that’s for sure. You can try adding the define directly to see if it will work…
python3 make.py esp32 -mpy_cross -submodules -clean
BOARD=ESP32_GENERIC BOARD_VARIANT=SPIRAM -DMICROPY_PY_MACHINE_I2S=0
lets not set it to CFLAGS and let it go directly into make to see what it does.
I am trying to nail down a way to fix it without needing to edit any of the Micropython build files.
I compiled the newly downloaded folder to perform a clean install, as I did earlier.
-DMICROPY_PY_MACHINE_I2S=0 shows invalid option(-D) for “make”
❯ python3 make.py esp32 -mpy_cross -submodules -clean BOARD=ESP32_GENERIC BOARD_VARIANT=SPIRAM -DMICROPY_PY_MACHINE_I2S=0
make -C mpy-cross
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
make submodules -C ports/esp32 USER_C_MODULES=../../../../micropython.cmake BOARD=ESP32_GENERIC BOARD_VARIANT=SPIRAM -DMICROPY_PY_MACHINE_I2S=0
/Library/Developer/CommandLineTools/usr/bin/make: invalid option -- D
/Library/Developer/CommandLineTools/usr/bin/make: invalid option -- M
Usage: make [options] [target] ...
Options:
-b, -m Ignored for compatibility.
....
....
I’ve tried it without -D
MICROPY_PY_MACHINE_I2S=0 passed to the “make” command, but no effect.
> python3 make.py esp32 -mpy_cross -submodules -clean BOARD=ESP32_GENERIC
BOARD_VARIANT=SPIRAM MICROPY_PY_MACHINE_I2S=0
#OUTPUT
...,
make -C ports/esp32 USER_C_MODULES=../../../../micropython.cmake
BOARD=ESP32_GENERIC
BOARD_VARIANT=SPIRAM MICROPY_PY_MACHINE_I2S=0
idf.py -D MICROPY_BOARD=ESP32_GENERIC -D MICROPY_BOARD_DIR=../lv_binding_micropython/
micropython/ports/esp32/boards/ESP32_GENERIC
-DUSER_C_MODULES=../../../../micropython.cmake
-D MICROPY_BOARD_VARIANT=SPIRAM -B build-ESP32_GENERIC-SPIRAM build
1 Like
ok. I opened an issue for it with MocroPython. so as a fix it need to be manually adjusted. I need to sort out what boards it causes a problem with. Then I can make the needed adjustment in the make.py script.
try adding -D before it. maybe that will work.
@kdschlosser could you create a branch using
lv_micropython feat/multi-instance v9.0.0-dev
As others have said I commend you for taking on this enormous task !!!