From 1e9fedcbd7f9065773e151f521f9619882ea9ef4 Mon Sep 17 00:00:00 2001 From: geeksville Date: Fri, 17 Jan 2020 15:15:00 -0800 Subject: [PATCH] minor changes needed to build with platformio I prefer platformio over the arduino IDE because it automatically does library dependencies and has lots of other goodness. To build and install to a connected device just do: pio run --- .gitignore | 2 +- main/main.ino | 2 ++ platformio.ini | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 platformio.ini diff --git a/.gitignore b/.gitignore index 5dc1407..63dbb54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ - +.pio main/configuration.h main/credentials.h diff --git a/main/main.ino b/main/main.ino index b848b23..18d973b 100644 --- a/main/main.ino +++ b/main/main.ino @@ -51,6 +51,8 @@ RTC_DATA_ATTR uint32_t count = 0; // Application // ----------------------------------------------------------------------------- +void buildPacket(uint8_t txBuffer[]); // needed for platformio + void send() { char buffer[40]; snprintf(buffer, sizeof(buffer), "Latitude: %10.6f\n", gps_latitude()); diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 0000000..1bb135b --- /dev/null +++ b/platformio.ini @@ -0,0 +1,34 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[platformio] +src_dir = main + +[env:esp32] +platform = espressif32 +board = ttgo-t-beam +framework = arduino + +; note: we add src to our include search path so that lmic_project_config can override +build_flags = -Wall -Wextra -O3 -Wl,-Map,.pio/build/esp32/output.map -D CFG_us915 -D CFG_sx1276_radio +; -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG + +lib_deps = + arduino-lmic + TinyGPSPlus + ESP8266_SSD1306 + AXP202X_Library + +; Adafruit ILI9341@1.2.0 +; AutoConnect +; ArduinoJson@5.13.4 +; Micro-RTSP@>=0.1.6 +; Adafruit-GFX-Library=https://github.com/geeksville/Adafruit-GFX-Library.git +