Windows support

This commit is contained in:
2025-05-14 18:59:14 -04:00
parent ba42be9ba0
commit e7842920d7
10 changed files with 1083 additions and 1394 deletions

13
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
ARG DOCKER_TAG=latest
FROM espressif/idf:${DOCKER_TAG}
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
RUN apt-get update -y && apt-get install udev -y
RUN echo "source /opt/esp/idf/export.sh > /dev/null 2>&1" >> ~/.bashrc
ENTRYPOINT [ "/opt/esp/entrypoint.sh" ]
CMD ["/bin/bash", "-c"]

View File

@@ -0,0 +1,21 @@
{
"name": "ESP-IDF QEMU",
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
"idf.espIdfPath": "/opt/esp/idf",
"idf.toolsPath": "/opt/esp",
"idf.gitPath": "/usr/bin/git"
},
"extensions": [
"espressif.esp-idf-extension",
"espressif.esp-idf-web"
]
}
},
"runArgs": ["--privileged"]
}

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build

23
.vscode/c_cpp_properties.json vendored Normal file
View File

@@ -0,0 +1,23 @@
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "${config:idf.toolsPathWin}\\tools\\xtensa-esp-elf\\esp-14.2.0_20241119\\xtensa-esp-elf\\bin\\xtensa-esp32-elf-gcc.exe",
"compileCommands": "${config:idf.buildPath}/compile_commands.json",
"includePath": [
"${config:idf.espIdfPath}/components/**",
"${config:idf.espIdfPathWin}/components/**",
"${workspaceFolder}/**"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
],
"version": 4
}

15
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "gdbtarget",
"request": "attach",
"name": "Eclipse CDT GDB Adapter"
},
{
"type": "espidf",
"name": "Launch",
"request": "launch"
}
]
}

14
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,14 @@
{
"C_Cpp.intelliSenseEngine": "default",
"idf.espIdfPathWin": "c:\\Espressif\\frameworks\\esp-idf-v5.4.1",
"idf.pythonInstallPath": "c:\\Espressif\\tools\\tools\\idf-python\\3.11.2\\python.exe",
"idf.openOcdConfigs": [
"board/esp32-wrover-kit-3.3v.cfg"
],
"idf.toolsPathWin": "c:\\Espressif\\tools",
"idf.customExtraVars": {
"IDF_TARGET": "esp32"
},
"idf.flashType": "UART",
"idf.portWin": "COM4"
}

View File

@@ -1,12 +1,26 @@
# firmware
1. [Setup](#Setup)
1. [Install Dependencies](#InstallDependencies)
1. [MacOS](#MacOS1)
2. [Windows](#Windows1)
2. [Development](#Development)
1. [Command Line Tools](#CommandLineTools)
1. [MacOS](#MacOS2)
2. [Windows](#Windows2)
2. [Using an IDE](#UsinganIDE)
1. [Visual Studio Code](#VisualStudioCode)
2. [JetBrains CLion](#JetBrainsCLion)
<hr>
## Setup <a name="Setup"></a>
**This project is currently setup to work with the ESP32, we will be using the ESP32-c6 in the future.**
## Setup
This project uses ESP-IDF version 5.4.
### Install Dependencies
#### MacOS
### Install Dependencies <a name="InstallDependencies"></a>
#### MacOS <a name="MacOS1"></a>
Install xcode command line tools (if you do not already have them)
```
xcode-select --install
@@ -26,7 +40,7 @@ cd ~/esp/isp-idf
./install.sh esp32
```
#### Windows
#### Windows <a name="Windows1"></a>
Install ESP-IDF with with the GUI [Windows installer](https://dl.espressif.com/dl/esp-idf/?idf=4.4).
- Use default options.
- You may install ESP-IDF to a path that is different than the default, however, keep the length of the path under 90 characters and do not include any spaces or non ASCII characters.
@@ -39,11 +53,11 @@ Install ESP-IDF with with the GUI [Windows installer](https://dl.espressif.com/d
- ESP-IDF
## Development
## Development <a name="Development"></a>
The board is flashed via UART. A USB to UART adapter is provided as part of the devboard.
### Command Line Tools
#### MacOS
### Command Line Tools <a name="CommandLineTools"></a>
#### MacOS <a name="MacOS2"></a>
Export environment variables
```
. ~/esp/esp-idf/export.sh
@@ -59,7 +73,7 @@ Flash and open serial monitor (Use Ctrl+] to exit)
idf.py flash monitor
```
#### Windows
#### Windows <a name="Windows2"></a>
Run the following commands in a command prompt.
Export environment variables (alternatively run the ESP-IDF Command Prompt shortcut)
@@ -79,9 +93,24 @@ Flash and open serial monitor
idf.py flash monitor
```
### Using an IDE
Any IDE that supports CMake should be compatible with this project.
#### JetBrains CLion
### Using an IDE <a name="UsinganIDE"></a>
Any IDE that supports CMake or has an ESP-IDF extension should be compatible with this project.
#### Visual Studio Code <a name="VisualStudioCode"></a>
ESP-IDF has an official extension for Visual Studio Code. To setup,
1. Install the CMake Tools, Dev Containers and WSL extensions
2. Install the ESP-IDF extension (author: Espressif Systems)
3. A popup for the setup wizard will appear, click on it.
4. In the setup wizard
- Select "Use Existing Setup"
- Select "Search ESP-IDF in System"
- If the installation cannot be found, select the following variables:
- IDF_PATH: C:\Espressif\frameworks\esp-idf-v5.4.1
- IDF_TOOLS_PATH: C\Espressif\tools
- Click install
#### JetBrains CLion <a name="JetBrainsCLion"></a>
CLion is compatible with this project. Follow [the tutorial on Espressif's site](https://developer.espressif.com/blog/clion/) with the following modifications:
- When asked to select a project, simply import the root directory of this repository (ie. the `firmware` folder).
- If the `Open Project Wizard` does not open, access it via `Settings > Build, Execution, Deployment > CMake`.

1074
sdkconfig

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff