https://github.com/cspyridakis/esp32-espidf-cpp-base
A VS Code project tree for ESP32 that utilizes espidf under the hood.
https://github.com/cspyridakis/esp32-espidf-cpp-base
esp esp-idf esp32 mcu
Last synced: about 1 month ago
JSON representation
A VS Code project tree for ESP32 that utilizes espidf under the hood.
- Host: GitHub
- URL: https://github.com/cspyridakis/esp32-espidf-cpp-base
- Owner: CSpyridakis
- License: mit
- Created: 2024-11-18T14:38:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-18T18:46:05.000Z (over 1 year ago)
- Last Synced: 2026-05-01T00:27:43.716Z (about 2 months ago)
- Topics: esp, esp-idf, esp32, mcu
- Language: C++
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# esp32-espidf-base
[Reference manual ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/index.html)
## Installation:
### Linux:
```
# Step 1. Install Prerequisites
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
# Step 2. Get ESP-IDF
mkdir -p ~/esp
cd ~/esp
git clone https://github.com/espressif/esp-idf.git --depth=1
# Step 3. Set up the Tools
cd ~/esp/esp-idf
./install.sh all
# Step 4. Set up the Environment Variables
alias get_idf='. $HOME/esp/esp-idf/export.sh' # Set in ~/.zshrc
# Step 5. Open VS-Code and Install ESP-IDF
# DONE! You are ready to use
```
### MAC (Homebrew)
```
# Step 1. Install Prerequisites
brew install cmake ninja dfu-util
brew install python3
# Step 2. Get ESP-IDF
mkdir -p ~/esp
cd ~/esp
git clone https://github.com/espressif/esp-idf.git
# Step 3. Set up the Tools
cd ~/esp/esp-idf
./install.sh all
# Step 4. Set up the Environment Variables
alias get_idf='. $HOME/esp/esp-idf/export.sh' # Set in ~/.zshrc
```
---
---
## Useful commands:
* `PORT` on MAC: /dev/cu.usbxxx
### Set target IMPORTANT: based on the board you are using!!!
idf.py set-target esp32-s3
### Menu config
idf.py menuconfig
### Build project
idf.py build
### Flash binary
idf.py -p `PORT` flash
### Open Monitor
idf.py -p `PORT` [-b `BAUD`] monitor
### Flash and Monitor
idf.py -p `PORT` flash monitor
### Add BSP (Board support package)
idf.py add-dependency
### Flash Erase
idf.py -p `PORT` erase-flash
## OTA Erase
idf.py -p `PORT` erase-otadata
---
[Concepts](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html)
*
* **Project Configuration** the `sdkconfig` to modify it use `idf.py menuconfig`
* **app**: occasionally there are 2 apps 1. `project-app` and 2. `bootloader-app`
* **components** modular pieces compiled to static libs
* **target** the hardware that will run the app