ESP32 build error #12309
-
I'm trying to compile firmware for an ESP32 board using the following commands: DIR=`pwd`
git clone --depth 1 -b v5.0.2 --recursive https://github.com/espressif/esp-idf.git
cd $DIR/esp-idf
git submodule update --init --recursive
./install.sh
source export.sh
git clone https://github.com/glenn20/micropython.git --depth 1 --branch espnow-g20-v1.20.0 --single-branch $DIR/micropython
cd $DIR/micropython
make -C mpy-cross
cd $DIR/micropython/ports/esp32
make submodules
make I'm getting the following error in the final
I'm on MacOS 12.3.1. Is there something obviously wrong in how I do things? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
It looks like you're trying to compile an older branch on @glenn20 's fork of micropython for espnow support? This older v1.20 branch presumably doesn't work with idf 5.0 as that only very recently had support added in the main micropython repo. I'm pretty sure the espnow support has been merged here on the main repo, are you sure you need this forked branch? |
Beta Was this translation helpful? Give feedback.
-
Yes, as @andrewleech says, that branch represents my espnow patches applied against the micropython v1.20.0 codebase. Micropython v1.20.0 does not support idf 5.0. The issue is that you are using the post-idf5.0 build instructions (from main branch) for a v1.20.0 codebase. You could either:
|
Beta Was this translation helpful? Give feedback.
-
Thanks to both of you, that makes sense. I got this to work: #!/bin/zsh
DIR=`pwd`
BOARD=LOLIN_S2_MINI
# COMMENT NEXT FOUR LINES IF ESP-IDF IS ALREADY INSTALLED
git clone --depth 1 -b v5.0.2 --recursive https://github.com/espressif/esp-idf.git
cd $DIR/esp-idf
git submodule update --init --recursive
./install.sh
cd $DIR/esp-idf
source export.sh
git clone https://github.com/micropython/micropython.git --depth 1 --branch master --single-branch $DIR/micropython
# THE NEXT THREE LINES ARE FOR MINIMIZING STARTUP TIME (CF https://github.com/glenn20/upy-esp32-experiments)
# cat $DIR/main.py >> $DIR/micropython/ports/esp32/modules/_boot.py
# echo "\nCONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP=y" >> $DIR/micropython/ports/esp32/boards/sdkconfig.base
# gsed -i "/void boardctrl_startup(void) {/a\ if (esp_reset_reason() == ESP_RST_DEEPSLEEP) {\n return;\n }" $DIR/micropython/ports/esp32/main.c
cd $DIR/micropython
make -C mpy-cross
cd $DIR/micropython/ports/esp32
make submodules BOARD=$BOARD
make BOARD=$BOARD
make erase BOARD=$BOARD PORT=`ls /dev/tty.usb*`
make deploy BOARD=$BOARD PORT=`ls /dev/tty.usb*` As you can see @glenn20 I'm playing with your optimizations for low-power startup of ESPNow devices. So far, using the script above, I got my board to blink a LED according to code in Quick additional question: I assume that with these startup optimizations, I lose access to Thanks again! |
Beta Was this translation helpful? Give feedback.
-
Oh, that's neat, thanks for the tip. Do I need to do anything in |
Beta Was this translation helpful? Give feedback.
-
Thanks! |
Beta Was this translation helpful? Give feedback.
It looks like you're trying to compile an older branch on @glenn20 's fork of micropython for espnow support?
This older v1.20 branch presumably doesn't work with idf 5.0 as that only very recently had support added in the main micropython repo.
I'm pretty sure the espnow support has been merged here on the main repo, are you sure you need this forked branch?