Skip to content

Instantly share code, notes, and snippets.

@s4eidhp
Last active November 17, 2024 14:06
Show Gist options
  • Save s4eidhp/62864c19a97122695876f5acccfc09ad to your computer and use it in GitHub Desktop.
Save s4eidhp/62864c19a97122695876f5acccfc09ad to your computer and use it in GitHub Desktop.
  • 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
  • Get esp-idf
git clone --recursive https://github.com/espressif/esp-idf.git
  • Setup tools
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment