94 lines
3.5 KiB
INI
94 lines
3.5 KiB
INI
; SPDX-License-Identifier: Apache-2.0
|
|
; Copyright (c) 2012-2024 Scott Penrose <scottp@dd.com.au> and WII5 Buoy contributors
|
|
;
|
|
; PlatformIO build configuration for the WII5 Buoy firmware.
|
|
; This sits alongside the existing arduino-cli flow (tools/build_local.sh);
|
|
; both can build the same sources, which stay in place at the repo root.
|
|
;
|
|
; Usage:
|
|
; pio run -e wii5_buoy # compile
|
|
; pio run -e wii5_buoy -t upload # compile + flash
|
|
; pio device monitor -e wii5_buoy # serial console @ 230400
|
|
;
|
|
; See platformio.org for the full reference.
|
|
|
|
[platformio]
|
|
; Sources live at the repo root, not in a src/ dir. Compile them in place.
|
|
src_dir = .
|
|
|
|
[env:wii5_buoy]
|
|
platform = atmelavr
|
|
framework = arduino
|
|
|
|
; Custom board: ATmega2560, 3V3, 11.0592 MHz crystal, serial bootloader @ 230400.
|
|
; Definition lives in boards/wii5_v2_2560.json (auto-discovered).
|
|
board = wii5_v2_2560
|
|
|
|
; Upload over the Arduino serial bootloader (avrdude -c arduino).
|
|
upload_protocol = arduino
|
|
upload_speed = 230400
|
|
; upload_port = /dev/ttyUSB0 ; uncomment / override, or rely on auto-detect
|
|
monitor_speed = 230400
|
|
|
|
; Compile the firmware sources at the repo root. The "*.cpp" glob is
|
|
; non-recursive, so it matches only the root-level WII5*.cpp plus pio_main.cpp
|
|
; (the entry shim) and naturally excludes app/, test/, tools/ and doc/.
|
|
; The entry sketch (app/wii5_buoy/wii5_buoy.ino) is pulled in by pio_main.cpp.
|
|
build_src_filter =
|
|
+<*.cpp>
|
|
-<pio_main_passthrough.cpp>
|
|
|
|
; The project's own headers are included with angle brackets (<WII5.h>, ...),
|
|
; so the repo root must be on the include path. Software version/commit are
|
|
; normally injected by tools/build_local.sh; default them here.
|
|
build_flags =
|
|
-I.
|
|
; Board-variant macros that the arduino-cli custom board (WII:avr) injected:
|
|
-D__WII5_V02__ ; selects WII5_board_v2.h in WII5_board.h
|
|
-DF_CPU_11 ; 11.0592 MHz timing -> 230400 console / 115200 IMU baud
|
|
; Older Arduino AVR cores exposed NUM_PINS; current cores use NUM_DIGITAL_PINS.
|
|
-DNUM_PINS=NUM_DIGITAL_PINS
|
|
-DWII5_SOFTWARE_VERSION=\"WII5Buoy_dev\"
|
|
-DWII5_SOFTWARE_COMMIT=\"dev\"
|
|
|
|
; Public libraries pulled from the PlatformIO registry. Scott's own libraries
|
|
; (AvgStd, PushButton, MemoryFree, SDBlock) are vendored under lib/ instead.
|
|
lib_deps =
|
|
paulstoffregen/Time
|
|
mikalhart/TinyGPSPlus
|
|
milesburton/DallasTemperature
|
|
paulstoffregen/OneWire
|
|
pfeerick/elapsedMillis
|
|
rocketscream/Low-Power
|
|
sparkfun/IridiumSBDi2c
|
|
thijse/EEPROMEx
|
|
bakercp/CRC32
|
|
arduino-libraries/SD
|
|
adafruit/RTClib
|
|
|
|
; Lean pass-through variant: keeps the Maths CPU powered on and provides
|
|
; bidirectional raw serial passthrough to the Iridium modem from the USB
|
|
; console. Excludes the full wii5_buoy main (pio_main.cpp) so setup()/loop()
|
|
; come from pio_main_passthrough.cpp instead.
|
|
[env:wii5_passthrough]
|
|
extends = env:wii5_buoy
|
|
build_src_filter =
|
|
+<*.cpp>
|
|
-<pio_main.cpp>
|
|
|
|
; LoRa-enabled variant (experimental). This path additionally depends on the
|
|
; Sh3dNode networking stack (sh3dNodeNetwork / SH3D_NODE_Packet_* / RH_RF95),
|
|
; which is NOT bundled in this repository, so the env does not build as-is.
|
|
; RadioHead is also GPLv2 (dual-licensed); binaries built from it inherit GPLv2
|
|
; terms. Enable once the Sh3dNode library is available, e.g.:
|
|
;
|
|
; [env:wii5_buoy_lora]
|
|
; extends = env:wii5_buoy
|
|
; build_flags =
|
|
; ${env:wii5_buoy.build_flags}
|
|
; -DWII5_RADIO_LORA
|
|
; lib_deps =
|
|
; ${env:wii5_buoy.lib_deps}
|
|
; mikem/RadioHead
|
|
; <path-or-url-to-Sh3dNode-library>
|