Article updated version | time | Remarks | Revised by |
---|---|---|---|
V0.1 | 2020.08.06 | initial version | bob |
Article Directory
Open source warehouse address
ESP-Drone formerly known as ESP-Plane
- Code repository: esp-drone
- Chinese document: getting started
- Display video: installation and test flight
Compile into ESP32-S2 firmware
1. ESP32-S2 environment setup
Fresh installation ESP-IDF
environment
Currently (2020.08.06) Lexin in the master
branch of ESP32-S2
the latest support, you must use
master
version ESP-IDF
.
Please strictly follow the development environment to build-ESP32S2-Latest , follow the steps to complete the environment construction work:
Other IDF environments have been set up, how to switch?
-
cd
Enter the IDF root directory -
Use
git log
to view the current version information -
Use
git fetch
pull branch information -
Use
git checkout master
switch tomaster
-
Perform
install.sh
the installationmaster
version of the tool chain -
Implementation of
git submodule update --init --recursive
updated sub-warehouse
If you cannot switch to it normally in Windows
master
, you can check the solution .
Note that Windows is used
.bat
instead of.sh
, for example, the first5
changes to performinstall.bat
the installationmaster
version of the tool chain.
2. Set the compilation target
Use idf.py set-target esp32s2
the compiler switch to the target esp32s2
(by default esp32
), if she switched compiled object, set the build directory and sdkconfig sdkconfig.old
delete, reset-target
ESP32-S2 compilation errors and solutions
1. Compile target error This chip is ESP32-S2 not ESP32
If you forget by idf.py set-target esp32s2
switching the target is compiled esp32s2
, it will compile to default esp32
version of the firmware, the following error occurs while downloading, set the build directory and sdkconfig sdkconfig.old
delete, re set-target
.
2. Undefined reference to _param_stop
If the link script is not set after the environment is set up, please refer to the ESP32/ESP32-S2 link script modification to set it.
3. Compiler optimization error report outside array bounds of TCB_t * volatile[1]
Since ESP32-S2
a single-core chip, the current overall performance is better ESP32
, so the project configuration sdkconfig.defaults
is enabled by default compiler performance optimization, optimization after the item is opened, it will lead to erroroutside array bounds of TCB_t * volatile[1]
Note that in components/freertos/tasks.c
the function taskYIELD_OTHER_CORE
to add the first linexCoreID = 0;
Compile into ESP32 firmware
1. ESP32 environment setup
The new installation ESP-IDF
environment : Please strictly follow the development environment to build -ESP32 , follow the steps to complete the construction work environment, ESP32 on the IDF version does not require, you can use master
also use 4.0 and above release
a branch or 4.0.1
version.
2. Set the compilation target
Use idf.py set-target esp32
the compiler switch to the target esp32
(by default esp32
)
If the half-way switch compiled object, set the build directory and
sdkconfig sdkconfig.old
delete, re
set-target
ESP32 compilation errors and solutions
1. Undefined reference to _param_stop
If the link script is not set after the environment is set up, please refer to the ESP32/ESP32-S2 link script modification to set it.