diff --git a/ESP32-Console/.devcontainer/Dockerfile b/ESP32-Console/.devcontainer/Dockerfile new file mode 100644 index 000000000..dafb8adbb --- /dev/null +++ b/ESP32-Console/.devcontainer/Dockerfile @@ -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"] \ No newline at end of file diff --git a/ESP32-Console/.devcontainer/devcontainer.json b/ESP32-Console/.devcontainer/devcontainer.json new file mode 100644 index 000000000..b80178618 --- /dev/null +++ b/ESP32-Console/.devcontainer/devcontainer.json @@ -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"] +} \ No newline at end of file diff --git a/ESP32-Console/.vscode/c_cpp_properties.json b/ESP32-Console/.vscode/c_cpp_properties.json new file mode 100644 index 000000000..906558342 --- /dev/null +++ b/ESP32-Console/.vscode/c_cpp_properties.json @@ -0,0 +1,23 @@ +{ + "configurations": [ + { + "name": "ESP-IDF", + "compilerPath": "${config:idf.toolsPath}/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc", + "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 +} diff --git a/ESP32-Console/.vscode/launch.json b/ESP32-Console/.vscode/launch.json new file mode 100644 index 000000000..2511a38aa --- /dev/null +++ b/ESP32-Console/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "gdbtarget", + "request": "attach", + "name": "Eclipse CDT GDB Adapter" + }, + { + "type": "espidf", + "name": "Launch", + "request": "launch" + } + ] +} \ No newline at end of file diff --git a/ESP32-Console/.vscode/settings.json b/ESP32-Console/.vscode/settings.json new file mode 100644 index 000000000..ccc1b9224 --- /dev/null +++ b/ESP32-Console/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "C_Cpp.intelliSenseEngine": "default", + "idf.espIdfPath": "/home/abobkov/esp/v5.3.2/esp-idf", + "idf.openOcdConfigs": [ + "board/esp32c3-ftdi.cfg" + ], + "idf.port": "/dev/ttyS4", + "idf.toolsPath": "/home/abobkov/.espressif" +} diff --git a/ESP32-Console/CMakeLists.txt b/ESP32-Console/CMakeLists.txt new file mode 100755 index 000000000..72982e0d4 --- /dev/null +++ b/ESP32-Console/CMakeLists.txt @@ -0,0 +1,8 @@ +# For more information about build system see +# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html +# The following five lines of boilerplate have to be in your project's +# CMakeLists in this exact order for cmake to work correctly +cmake_minimum_required(VERSION 3.16) + +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(ESP32-Console) diff --git a/ESP32-Console/README.md b/ESP32-Console/README.md new file mode 100755 index 000000000..2bd309757 --- /dev/null +++ b/ESP32-Console/README.md @@ -0,0 +1,35 @@ +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + +# _Sample project_ + +(See the README.md file in the upper level 'examples' directory for more information about examples.) + +This is the simplest buildable example. The example is used by command `idf.py create-project` +that copies the project to user specified path and set it's name. For more information follow the [docs page](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html#start-a-new-project) + + + +## How to use example +We encourage the users to use the example as a template for the new projects. +A recommended way is to follow the instructions on a [docs page](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html#start-a-new-project). + +## Example folder contents + +The project **sample_project** contains one source file in C language [main.c](main/main.c). The file is located in folder [main](main). + +ESP-IDF projects are built using CMake. The project build configuration is contained in `CMakeLists.txt` +files that provide set of directives and instructions describing the project's source files and targets +(executable, library, or both). + +Below is short explanation of remaining files in the project folder. + +``` +├── CMakeLists.txt +├── main +│   ├── CMakeLists.txt +│   └── main.c +└── README.md This is the file you are currently reading +``` +Additionally, the sample project contains Makefile and component.mk files, used for the legacy Make based build system. +They are not used or needed when building with CMake and idf.py. diff --git a/ESP32-Console/main/CMakeLists.txt b/ESP32-Console/main/CMakeLists.txt new file mode 100755 index 000000000..cf2c455cb --- /dev/null +++ b/ESP32-Console/main/CMakeLists.txt @@ -0,0 +1,2 @@ +idf_component_register(SRCS "main.c" + INCLUDE_DIRS ".") diff --git a/ESP32-Console/main/main.c b/ESP32-Console/main/main.c new file mode 100755 index 000000000..7b66f3393 --- /dev/null +++ b/ESP32-Console/main/main.c @@ -0,0 +1,6 @@ +#include + +void app_main(void) +{ + +}