ESPlane
  • Introduction
  • 语言/language
    • 中文
    • English
  • Operater Guide
    • 01 ESPlane Operater Get Started
    • 02 CFclient User Guid
    • 03 Calibration And Commissioning Methods
    • 04 Flight Mode Introduction
    • 05 Pid Tuning
    • 06 Multi-user Mode
    • 07 Load And Endurance Test
  • Developer Guide
    • 01 ESPlane Developer Get Started
    • 02 Code Architecture And Startup Process
    • 03 Sensor Angle Fusion
    • 04 Sensor Calibration
    • 05 Control System
    • 06 Gyro and Accelerometer MPU6050 Driver
    • 07 Laser Sensor Vl53l1x Driver
    • 08 Barometer MS5611 Driver
    • 09 Magnetic Compass HMC5883l Driver
    • 10 Brushed Motor Driver
    • 11 Optical Flow Sensor Pmw3901 Driver
    • 12 Variable Unified Management
    • 13 Crtp Protocol Introduction
    • 14 Crtp Protocol Library - Cflib
    • 15 Compatible With ESPilot APP
    • 16 Height-hold Mode Development
    • 17 Positon-hold Mode Development
  • Research on Crazyflie
    • 01 Crazyflie Project Preview
    • 02 Crazyflie Source Preview
    • 03 Crazyflie Code Modularization Method
    • Discussion On Private-Improvement Scheme
    • Private-1.0 Code Debug Record
    • Private-Research On Commercial Micro Drone Products
    • Well-Known Drone Open Source Solutions
  • ESP32 Development notes
    • ESP32 Chip Naming Rules
    • ESP32 Pin Resource Allocation And Usage Recommendations
    • 01 ESP32-Hardware Preparation-ESP32-DevKitC V2 board
    • 02 ESP32-Environment Setup-Compilation And Programming
    • 03 ESP-IDF-Directory Structure-Template Engineering Analysis Notes
    • 04 ESP32-Code Debugging-Summary Of Several Debugging Methods
    • 05 ESP32 Event Loop
    • 14 ESP32 SPI Use Memo
    • 15 ESP32 GPIO Use Memo
  • Reference
    • bitcraze.io
    • esp-idf-release-v3.3
由 GitBook 提供支持
在本页
  • Step 1. Setup ESP-IDF Environment
  • Step 2. Get ESPlane2.0 Source Code
  • Step 3. Configure ESP-IDF (Optional)
  • Config ESP32 Link Script
  • Improve PHY gain
  • Config FreeRTOS

这有帮助吗?

  1. Developer Guide

01 ESPlane Developer Get Started

Step 1. Setup ESP-IDF Environment

  1. Setup toolchain

  2. Get ESP-IDF :This project based on release / v3.3

     git clone -b release/v3.3 --recursive https://github.com/espressif/esp-idf.git
  3. Setup Path to ESP-IDF

  4. Install the Required Python Packages

     python -m pip install --user -r $IDF_PATH/requirements.txt

Step 2. Get ESPlane2.0 Source Code

  git clone https://github.com/qljz1993/ESPlane2.git

Step 3. Configure ESP-IDF (Optional)

Note: The ESPlane2.0 code comes with components esp32 andfreertos, which already configured can cover the corresponding components of ESP-IDF.

These two components come from release / v3.3 and were recently updated to commit:6f9a7264ce20c6132fbd8309112630d0eb490fe4. If you use the same version ESP-IDF, you can ignore the following configuration process. The following configuration process is only referenced when the two components esp32 andfreertos are updated.

Config ESP32 Link Script

Purpose: Place variables with param orlog tags in the esplane firmware in a continuous address area

Find the drom0_0_seg section in the{IDF_PATH} / components / esp32 / ld / esp32.project.ld.in file and add the following:

    /* Parameters and log system datas >drom0_0_seg*/
    _param_start = .;
    KEEP(*(.param))
    KEEP(*(.param.*))
    _param_stop = .;
    . = ALIGN(4);
    _log_start = .;
    KEEP(*(.log))
    KEEP(*(.log.*))
    _log_stop = .;
    . = ALIGN(4);

It will look like this after changing:

  .flash.rodata :
  {
    _rodata_start = ABSOLUTE(.);

    *(.rodata_desc .rodata_desc.*)               /* Should be the first.  App version info.        DO NOT PUT ANYTHING BEFORE IT! */
    *(.rodata_custom_desc .rodata_custom_desc.*) /* Should be the second. Custom app version info. DO NOT PUT ANYTHING BEFORE IT! */

    mapping[flash_rodata]

    *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */
    *(.gnu.linkonce.r.*)
    *(.rodata1)
    __XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
    *(.xt_except_table)
    *(.gcc_except_table .gcc_except_table.*)
    *(.gnu.linkonce.e.*)
    *(.gnu.version_r)
    . = (. + 3) & ~ 3;
    __eh_frame = ABSOLUTE(.);
    KEEP(*(.eh_frame))
    . = (. + 7) & ~ 3;
    /*  C++ constructor and destructor tables, properly ordered:  */
    __init_array_start = ABSOLUTE(.);
    KEEP (*crtbegin.*(.ctors))
    KEEP (*(EXCLUDE_FILE (*crtend.*) .ctors))
    KEEP (*(SORT(.ctors.*)))
    KEEP (*(.ctors))
    __init_array_end = ABSOLUTE(.);
    KEEP (*crtbegin.*(.dtors))
    KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
    KEEP (*(SORT(.dtors.*)))
    KEEP (*(.dtors))
    /*  C++ exception handlers table:  */
    __XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
    *(.xt_except_desc)
    *(.gnu.linkonce.h.*)
    __XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
    *(.xt_except_desc_end)
    *(.dynamic)
    *(.gnu.version_d)
    /* Addresses of memory regions reserved via
       SOC_RESERVE_MEMORY_REGION() */
    soc_reserved_memory_region_start = ABSOLUTE(.);
    KEEP (*(.reserved_memory_address))
    soc_reserved_memory_region_end = ABSOLUTE(.);
    _rodata_end = ABSOLUTE(.);
    /* Literals are also RO data. */
    _lit4_start = ABSOLUTE(.);
    *(*.lit4)
    *(.lit4.*)
    *(.gnu.linkonce.lit4.*)
    _lit4_end = ABSOLUTE(.);
    . = ALIGN(4);
    _thread_local_start = ABSOLUTE(.);
    *(.tdata)
    *(.tdata.*)
    *(.tbss)
    *(.tbss.*)
    _thread_local_end = ABSOLUTE(.);
    . = ALIGN(4);
    /* Parameters and log system datas */
    _param_start = .;
    KEEP(*(.param))
    KEEP(*(.param.*))
    _param_stop = .;
    . = ALIGN(4);
    _log_start = .;
    KEEP(*(.log))
    KEEP(*(.log.*))
    _log_stop = .;
    . = ALIGN(4);

  } >drom0_0_seg

Improve PHY gain

  1. Enter:Component config>>PHY>>Max WiFi TX power (dBm)

  2. Set Max WiFi TX power value to 20

Config FreeRTOS

  1. Modify the followings in the FreeRTOSConfig.h:

    //change configMINIMAL_STACK_SIZE value to 2048,default 768
    #define configMINIMAL_STACK_SIZE        2048  
    
    //change INCLUDE_vTaskCleanUpResources value to 1,default 0
    #define INCLUDE_vTaskCleanUpResources        1  
    
    //Add the following macro define
    #define configUSE_APPLICATION_TASK_TAG  1  
    #define configENABLE_TASK_SNAPSHOT  1
  2. Change freertos tick rate use menuconfig:

Enter:Component config>>freertos>> Tick rate (Hz) Change Tick rate value to 1000

上一页07 Load And Endurance Test下一页02 Code Architecture And Startup Process

最后更新于5年前

这有帮助吗?