[esp] Add ESP-IDF cmake example.
This commit is contained in:
4
esp/cpp/04_esp-idf-arduino/main/CMakeLists.txt
Normal file
4
esp/cpp/04_esp-idf-arduino/main/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
idf_component_register(
|
||||
SRCS "main.cpp"
|
||||
INCLUDE_DIRS "."
|
||||
)
|
||||
17
esp/cpp/04_esp-idf-arduino/main/idf_component.yml
Normal file
17
esp/cpp/04_esp-idf-arduino/main/idf_component.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
## IDF Component Manager Manifest File
|
||||
dependencies:
|
||||
## Required IDF version
|
||||
idf:
|
||||
version: '>=4.1.0'
|
||||
# # Put list of dependencies here
|
||||
# # For components maintained by Espressif:
|
||||
# component: "~1.0.0"
|
||||
# # For 3rd party components:
|
||||
# username/component: ">=1.0.0,<2.0.0"
|
||||
# username2/component2:
|
||||
# version: "~1.0.0"
|
||||
# # For transient dependencies `public` flag can be set.
|
||||
# # `public` flag doesn't have an effect dependencies of the `main` component.
|
||||
# # All dependencies of `main` are public by default.
|
||||
# public: true
|
||||
espressif/arduino-esp32: ^3.1.1
|
||||
10
esp/cpp/04_esp-idf-arduino/main/main.cpp
Normal file
10
esp/cpp/04_esp-idf-arduino/main/main.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include "Arduino.h"
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
Serial.println("Hello world!");
|
||||
delay(1000);
|
||||
}
|
||||
Reference in New Issue
Block a user