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
This commit is contained in:
geeksville 2020-01-17 15:15:00 -08:00
parent 4a1f360697
commit 1e9fedcbd7
3 changed files with 37 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
.pio
main/configuration.h
main/credentials.h

View File

@ -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());

34
platformio.ini Normal file
View File

@ -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