ESP-Drone open source Wi-Fi drone firmware first compilation and error troubleshooting

Article updated version time Remarks Revised by
V0.1 2020.08.06 initial version bob


Open source warehouse address

ESP-Drone formerly known as ESP-Plane

Insert picture description here

Compile into ESP32-S2 firmware

1. ESP32-S2 environment setup

Fresh installation ESP-IDF environment

Currently (2020.08.06) Lexin in the masterbranch of ESP32-S2the latest support, you must use
masterversion 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?

  1. cd Enter the IDF root directory

  2. Use git logto view the current version information

  3. Use git fetchpull branch information

  4. Use git checkout masterswitch tomaster

  5. Perform install.shthe installation masterversion of the tool chain

  6. Implementation of git submodule update --init --recursiveupdated sub-warehouse

If you cannot switch to it normally in Windows master, you can check the solution .

Note that Windows is used .batinstead of .sh, for example, the first 5changes to perform install.batthe installation masterversion of the tool chain.

2. Set the compilation target

Use idf.py set-target esp32s2the compiler switch to the target esp32s2(by default esp32), if she switched compiled object, set the build directory and sdkconfig sdkconfig.olddelete, 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 esp32s2switching the target is compiled esp32s2, it will compile to default esp32version of the firmware, the following error occurs while downloading, set the build directory and sdkconfig sdkconfig.olddelete, re set-target.

Insert picture description here

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.

Insert picture description here

3. Compiler optimization error report outside array bounds of TCB_t * volatile[1]

Since ESP32-S2a single-core chip, the current overall performance is better ESP32, so the project configuration sdkconfig.defaultsis enabled by default compiler performance optimization, optimization after the item is opened, it will lead to erroroutside array bounds of TCB_t * volatile[1]

Insert picture description here

Note that in components/freertos/tasks.cthe function taskYIELD_OTHER_COREto add the first linexCoreID = 0;

Insert picture description here

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 masteralso use 4.0 and above releasea branch or 4.0.1version.

2. Set the compilation target

Use idf.py set-target esp32the compiler switch to the target esp32(by default esp32)

If the half-way switch compiled object, set the build directory and sdkconfig sdkconfig.olddelete, 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.

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_20515461/article/details/108124209