- MCU: ESP32-S3
- PC: Debian GNU/Linux "sid"
-
Clone this repository to
~/nand-submodules
git clone --recursive https://github.com/doubleo-dev/nand-submodules.git ~/nand-submodules
-
Set
RIOTBASE
to theRIOT/
submodule in this repositoryecho 'export RIOTBASE="$HOME/nand-submodules/RIOT"' >> ~/.bashrc
Restart the shell after this step.
-
Install required dependencies
Reference: https://doc.riot-os.org/getting-started.html#compiling-riot
sudo apt install git gcc-arm-none-eabi make gcc-multilib libstdc++-arm-none-eabi-newlib openocd gdb-multiarch doxygen wget unzip python3-serial
-
Install the local toolchain for ESP32-S3
Reference: https://doc.riot-os.org/group__cpu__esp32.html#esp32_local_toolchain_installation
$RIOTBASE/dist/tools/esptools/install.sh esp32s3
-
Add the export command to
~/.bashrc
echo '. "$RIOTBASE/dist/tools/esptools/export.sh" esp32s3 > /dev/null' >> ~/.bashrc
Restart the shell after this step.
-
Download the Anaconda Linux 64-Bit (x86) Installer
-
Make the installer executable
chmod +x Anaconda3-VERSION-Linux-x86_64.sh
-
Run the installer
./Anaconda3-VERSION-Linux-x86_64.sh
Enable shell integration when prompted.
Restart the shell after installation.
-
Create a Python 3.8 environment named
do-nand
Reference: https://github.com/espressif/esp-idf/blob/master/.mypy.ini
conda create -n do-nand python=3.8
-
(Each time) Activate the
do-nand
environmentconda activate do-nand
-
Install required dependencies
Note on
python3-virtualenv
: espressif/esp-idf#11336 (comment)sudo apt install git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 python3-virtualenv
-
Download ESP-IDF with RIOT OS patches
Reference: https://github.com/RIOT-OS/RIOT/tree/master/pkg/esp32_sdk
make -f ~/nand-submodules/esp-idf.Makefile
-
Navigate to the
esp-idf/
directorycd ~/nand-submodules/esp-idf
-
Download ESP-IDF submodules recursively
git submodule update --init --recursive
-
Install ESP-IDF
This may fail if Python != 3.8. In this case, do Anaconda Installation above.
conda activate do-nand # Python 3.8 required; Not compatible with Python >= 3.9 ./install.sh all
-
Add the export command to
~/.bashrc
echo '. "$HOME/nand-submodules/esp-idf/export.sh" > /dev/null 2>&1' >> ~/.bashrc
Restart the shell after this step.
-
Install ESP-IDF Python dependencies
This may fail if Python != 3.8. In this case, do Anaconda Installation above.
conda activate do-nand # Python 3.8 required; Not compatible with Python >= 3.9 pip install -r ~/nand-submodules/RIOT/build/pkg/esp32_sdk/requirements.txt
-
(Each time) Set the development board target to ESP32-S3 in your project
cd "$IDF_PATH/examples/get-started/hello_world/" # Your actual project location idf.py set-target esp32s3
-
Remove Espressif toolchain directory
At your own risk: if you installed other Espressif toolchains, this may break your setup.
rm -rf ~/.espressif
-
Remove Anaconda
Reference: https://www.anaconda.com/docs/getting-started/anaconda/uninstall
rm -rf ~/anaconda3 rm -rf ~/.condarc ~/.conda ~/.continuum
-
Remove export codes from
~/.bashrc
At your own risk.
This guide may ahve added the following lines into
.bashrc
:export RIOTBASE="$HOME/nand-submodules/RIOT"
. "$RIOTBASE/dist/tools/esptools/export.sh" esp32s3 > /dev/null
. "$HOME/nand-submodules/esp-idf/export.sh" > /dev/null 2>&1
- The lines between
# >>> conta initialize >>>
and# <<< conda initialize <<<
-
Remove this repository located at
~/nand-submodules
rm -rf ~/nand-submodules