starting with ESP-IDF
This commit is contained in:
1
.clang-format
Normal file
1
.clang-format
Normal file
@@ -0,0 +1 @@
|
||||
BasedOnStyle: Chromium
|
15
.gitignore
vendored
Normal file
15
.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# esp-idf
|
||||
build/
|
||||
sdkconfig
|
||||
sdkconfig.old
|
||||
|
||||
# They ignored Idea (Webstorm) completely
|
||||
.idea/
|
||||
|
||||
# However, they kept the following 4 files version controlled
|
||||
.vscode/*
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
__pycache__
|
10
.vscode/launch.json
vendored
Normal file
10
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "espidf",
|
||||
"name": "Launch",
|
||||
"request": "launch"
|
||||
}
|
||||
]
|
||||
}
|
259
.vscode/tasks.json
vendored
Normal file
259
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,259 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Build - Build project",
|
||||
"type": "shell",
|
||||
"command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py build",
|
||||
"windows": {
|
||||
"command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py build",
|
||||
"options": {
|
||||
"env": {
|
||||
"PATH": "${env:PATH};${config:idf.customExtraPaths}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"env": {
|
||||
"PATH": "${env:PATH}:${config:idf.customExtraPaths}"
|
||||
}
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "cpp",
|
||||
"fileLocation": [
|
||||
"autoDetect",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Set ESP-IDF Target",
|
||||
"type": "shell",
|
||||
"command": "${command:espIdf.setTarget}",
|
||||
"problemMatcher": {
|
||||
"owner": "cpp",
|
||||
"fileLocation": [
|
||||
"autoDetect",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Clean - Clean the project",
|
||||
"type": "shell",
|
||||
"command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py fullclean",
|
||||
"windows": {
|
||||
"command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py fullclean",
|
||||
"options": {
|
||||
"env": {
|
||||
"PATH": "${env:PATH};${config:idf.customExtraPaths}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"env": {
|
||||
"PATH": "${env:PATH}:${config:idf.customExtraPaths}"
|
||||
}
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "cpp",
|
||||
"fileLocation": [
|
||||
"autoDetect",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "Flash - Flash the device",
|
||||
"type": "shell",
|
||||
"command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py -p ${config:idf.port} -b ${config:idf.flashBaudRate} flash",
|
||||
"windows": {
|
||||
"command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py flash -p ${config:idf.portWin} -b ${config:idf.flashBaudRate}",
|
||||
"options": {
|
||||
"env": {
|
||||
"PATH": "${env:PATH};${config:idf.customExtraPaths}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"env": {
|
||||
"PATH": "${env:PATH}:${config:idf.customExtraPaths}"
|
||||
}
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "cpp",
|
||||
"fileLocation": [
|
||||
"autoDetect",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "Monitor: Start the monitor",
|
||||
"type": "shell",
|
||||
"command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py -p ${config:idf.port} monitor",
|
||||
"windows": {
|
||||
"command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py -p ${config:idf.portWin} monitor",
|
||||
"options": {
|
||||
"env": {
|
||||
"PATH": "${env:PATH};${config:idf.customExtraPaths}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"env": {
|
||||
"PATH": "${env:PATH}:${config:idf.customExtraPaths}"
|
||||
}
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "cpp",
|
||||
"fileLocation": [
|
||||
"autoDetect",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"dependsOn": "Flash - Flash the device"
|
||||
},
|
||||
{
|
||||
"label": "OpenOCD: Start openOCD",
|
||||
"type": "shell",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"focus": false,
|
||||
"panel": "new"
|
||||
},
|
||||
"command": "openocd -s ${command:espIdf.getOpenOcdScriptValue} ${command:espIdf.getOpenOcdConfigs}",
|
||||
"windows": {
|
||||
"command": "openocd.exe -s ${command:espIdf.getOpenOcdScriptValue} ${command:espIdf.getOpenOcdConfigs}",
|
||||
"options": {
|
||||
"env": {
|
||||
"PATH": "${env:PATH};${config:idf.customExtraPaths}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"env": {
|
||||
"PATH": "${env:PATH}:${config:idf.customExtraPaths}"
|
||||
}
|
||||
},
|
||||
"problemMatcher": {
|
||||
"owner": "cpp",
|
||||
"fileLocation": [
|
||||
"autoDetect",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "adapter",
|
||||
"type": "shell",
|
||||
"command": "${config:idf.pythonBinPath}",
|
||||
"isBackground": true,
|
||||
"options": {
|
||||
"env": {
|
||||
"PATH": "${env:PATH}:${config:idf.customExtraPaths}",
|
||||
"PYTHONPATH": "${command:espIdf.getExtensionPath}/esp_debug_adapter/debug_adapter"
|
||||
}
|
||||
},
|
||||
"problemMatcher": {
|
||||
"background": {
|
||||
"beginsPattern": "\bDEBUG_ADAPTER_STARTED\b",
|
||||
"endsPattern": "DEBUG_ADAPTER_READY2CONNECT",
|
||||
"activeOnStart": true
|
||||
},
|
||||
"pattern": {
|
||||
"regexp": "(\\d+)-(\\d+)-(\\d+)\\s(\\d+):(\\d+):(\\d+),(\\d+)\\s-(.+)\\s(ERROR)",
|
||||
"file": 8,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 9
|
||||
}
|
||||
},
|
||||
"args": [
|
||||
"${command:espIdf.getExtensionPath}/esp_debug_adapter/debug_adapter_main.py",
|
||||
"-e",
|
||||
"${workspaceFolder}/build/${command:espIdf.getProjectName}.elf",
|
||||
"-s",
|
||||
"$OPENOCD_SCRIPTS",
|
||||
"-dn",
|
||||
"esp32",
|
||||
"-om",
|
||||
"connect_to_instance",
|
||||
"-t",
|
||||
"xtensa-esp32-elf-"
|
||||
|
||||
],
|
||||
"windows": {
|
||||
"command": "${config:idf.pythonBinPathWin}",
|
||||
"options": {
|
||||
"env": {
|
||||
"PATH": "${env:PATH};${config:idf.customExtraPaths}",
|
||||
"PYTHONPATH": "${command:espIdf.getExtensionPath}/esp_debug_adapter/debug_adapter"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
8
CMakeLists.txt
Normal file
8
CMakeLists.txt
Normal file
@@ -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(firmware_remote_control)
|
2
main/CMakeLists.txt
Normal file
2
main/CMakeLists.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
idf_component_register(SRCS "main.c"
|
||||
INCLUDE_DIRS ".")
|
6
main/main.c
Normal file
6
main/main.c
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
|
||||
}
|
0
sdkconfig.defaults
Normal file
0
sdkconfig.defaults
Normal file
2
sdkconfig.defaults.esp32s3
Normal file
2
sdkconfig.defaults.esp32s3
Normal file
@@ -0,0 +1,2 @@
|
||||
# default ESP target
|
||||
CONFIG_IDF_TARGET="esp32s3"
|
1
version.txt
Normal file
1
version.txt
Normal file
@@ -0,0 +1 @@
|
||||
0.0.1
|
Reference in New Issue
Block a user