ESP32 compile and run ADF audio library

Identify the IDF version corresponding to ADF

ADF v2.1, v2.0 official website said that it supports v3.3, v4.0, v4.1, but v3.3 is recommended. After actual running tests, it is found that v4.0 is ok, but the support is not comprehensive. Some demos Not supported at all, so be sure to use the supported v3.3

Code acquisition

ADF is based on IDF 3.3 version, IDF3.3 only supports Linux version, so you need to compile on Linux, here is Ubuntu, the following instructions are also used on Ubuntu

Basic software installation

sudo apt-get install git wget flex bison gperf python python-pip python-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util

Download ADF

Download ADF directly, no need to download IDF separately, the corresponding IDF is included in the ADF project, so use the IDF version directly

Pay attention to recursive submodules

cd ~/esp
git clone --recursive https://github.com/espressif/esp-adf.git

If there is no recursion, direct cloning will not contain submodules, enter the directory and use this command to recurse

git submodule update --init --recursive

If git is too slow, consider using some acceleration

https://gitclone.com/docs/howto/howto_github

Install related tools

Install directly using the built-in install.sh

Note that if the source code downloaded on the windows system is copied to linux, some files will be damaged, and there will be some problems such as running permissions. It is recommended to download directly in linux

Check out the release version

Pay attention to the corresponding version of the corresponding checkout submodule, the second command

git checkout v2.1
git submodule update --init --recursive

To install

Run install.sh under built-in idf

cd esp-idf
./install.sh

Set environment variables

Set up the idf environment first, and run export.sh under idf directly

. ./export.sh

The above command sets up the idf environment, then download and set up the adf environment (2020.9.25 Espressif B station Linux adf environment setup tutorial video content is wrong)

export ADF_PATH=~/esp/esp-adf

Serial port permission setting

At this time, the environment has been set up, you can compile and run the Demo normally

When downloading, it will prompt that the serial port authority is not enough, and the serial port authority needs to be added.

sudo usermod -a -G dialout $USER

Guess you like

Origin blog.csdn.net/shaynerain/article/details/114433938