Modify example for PlatformIO.ini

This commit is contained in:
Manuel Bl 2020-08-01 10:13:11 +02:00
parent b3e0b567b3
commit a8cd58214d
5 changed files with 25 additions and 12 deletions

5
examples/send_recv/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch

View File

@ -1,9 +1,8 @@
# The following 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.5)
get_filename_component(TTN_DIR ../.. ABSOLUTE)
set(EXTRA_COMPONENT_DIRS "${TTN_DIR}")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# Update the below line to match the path to the ttn-esp32 library,
# e.g. list(APPEND EXTRA_COMPONENT_DIRS "/Users/me/Documents/ttn-esp32")
list(APPEND EXTRA_COMPONENT_DIRS "../..")
project(send_recv)

View File

@ -1,4 +1,4 @@
set(COMPONENT_SRCS "main.cpp")
set(COMPONENT_ADD_INCLUDEDIRS "")
register_component()
idf_component_register(
SRCS "main.cpp"
INCLUDE_DIRS "."
REQUIRES ttn-esp32)

View File

@ -0,0 +1,10 @@
[platformio]
src_dir = main
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = espidf
build_flags = -Wno-expansion-to-defined
upload_port = /dev/cu.usb*
monitor_speed = 115200

View File

@ -18,8 +18,7 @@
"export": {
"include": [
"include",
"src",
"esp_idf_lmic_config.h"
"src"
]
},
"frameworks": "espidf",