- Install required packages
sudo apt-get install git wget flex bison gperf python3 python3-pip python3-venv cmake \
ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
git clone --recursive https://github.com/espressif/esp-idf.git
cd ~/esp-idf
./install.sh all
. ./export.sh
xtensa-esp32-elf-gcc --version # check for correct installation
- Boot Process:
- After reset PRO CPU starts
- Execute reset vector code which is unmodifiable
- Call startup code which determin boot mode by checking GPIO_STRAP_REG register
- First stage ROM bootloader
- Loads second stage bootloader from flash offset 0x1000 into memory
- Second stage bootloader
- Before init hook
- Hardware init
- After init hook
- Load partition table
- Select number of boot partition
- Load main app image
- Application startup
- Start APP CPU and scheduler
- Run main_task which leads to app_main function