diff --git a/arch/esp32/esp32.ini b/arch/esp32/esp32.ini new file mode 100644 index 00000000..2d4d96a1 --- /dev/null +++ b/arch/esp32/esp32.ini @@ -0,0 +1,52 @@ +; Common settings for ESP targes, mixin with extends = esp32_base +[esp32_base] +extends = arduino_base +platform = espressif32 +build_src_filter = + ${arduino_base.build_src_filter} - - - +upload_speed = 115200 +debug_init_break = tbreak setup + +# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging. +# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h +# This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h +build_flags = + ${arduino_base.build_flags} + -Wall + -Wextra + -Isrc/platform/esp32 + -std=c++11 + -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG + -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG + -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL + -DAXP_DEBUG_PORT=Serial + -DCONFIG_BT_NIMBLE_ENABLED + -DCONFIG_NIMBLE_CPP_LOG_LEVEL=2 + -DCONFIG_BT_NIMBLE_MAX_CCCDS=20 + +lib_deps = + ${arduino_base.lib_deps} + ${networking_base.lib_deps} + ${environmental_base.lib_deps} + https://github.com/caveman99/esp32_https_server.git + h2zero/NimBLE-Arduino@1.4.0 + arduino-libraries/NTPClient@^3.1.0 + https://github.com/lewisxhe/XPowersLib.git + +lib_ignore = + segger_rtt + ESP32 BLE Arduino +platform_packages = + framework-arduinoespressif32 + +; leave this commented out to avoid breaking Windows +;upload_port = /dev/ttyUSB0 +;monitor_port = /dev/ttyUSB0 + +; Please don't delete these lines. JM uses them. +;upload_port = /dev/cu.SLAB_USBtoUART +;monitor_port = /dev/cu.SLAB_USBtoUART + +; customize the partition table +; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables +board_build.partitions = partition-table.csv diff --git a/arch/esp32/esp32s3.ini b/arch/esp32/esp32s3.ini new file mode 100644 index 00000000..0497f1c9 --- /dev/null +++ b/arch/esp32/esp32s3.ini @@ -0,0 +1,46 @@ +[esp32s3_base] +extends = arduino_base +platform = espressif32 +build_src_filter = + ${arduino_base.build_src_filter} - - - +upload_speed = 961200 +monitor_speed = 115200 +debug_init_break = tbreak setup + +# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging. +# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h +# This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h +build_flags = + ${arduino_base.build_flags} + -Wall + -Wextra + -Isrc/platform/esp32 + -std=c++11 + -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG + -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG + -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL + -DAXP_DEBUG_PORT=Serial + -DCONFIG_BT_NIMBLE_ENABLED + -DCONFIG_NIMBLE_CPP_LOG_LEVEL=2 + -DCONFIG_BT_NIMBLE_MAX_CCCDS=20 + +lib_deps = + ${arduino_base.lib_deps} + ${networking_base.lib_deps} + ${environmental_base.lib_deps} + https://github.com/meshtastic/esp32_https_server.git + h2zero/NimBLE-Arduino@1.4.0 + arduino-libraries/NTPClient@^3.1.0 + https://github.com/lewisxhe/XPowersLib.git + + +lib_ignore = + segger_rtt + ESP32 BLE Arduino +platform_packages = + framework-arduinoespressif32@ 3.20004.220825 + +; customize the partition table +; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables +board_build.partitions = partition-table.csv + diff --git a/arch/nrf52/nrf52.ini b/arch/nrf52/nrf52.ini new file mode 100644 index 00000000..a79ebda4 --- /dev/null +++ b/arch/nrf52/nrf52.ini @@ -0,0 +1,20 @@ +[nrf52_base] +; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files +; platform = nordicnrf52 ;pending https://github.com/platformio/builder-framework-arduino-nrf5/pull/7 +platform = https://github.com/meshtastic/platform-nordicnrf52.git#merge + +extends = arduino_base +build_type = debug ; I'm debugging with ICE a lot now +; note: liboberon provides the AES256 implementation for NRF52 (though not using the hardware acceleration of the NRF52840 - FIXME) +build_flags = + ${arduino_base.build_flags} -Wno-unused-variable + -Isrc/platform/nrf52 +build_src_filter = + ${arduino_base.build_src_filter} - - - - - - - - +lib_ignore = + BluetoothOTA + +; Note: By default no lora device is created for this build - it uses a simulated interface +[env:feather_nrf52832] +extends = nrf52_base +board = adafruit_feather_nrf52832 diff --git a/arch/nrf52/nrf52840.ini b/arch/nrf52/nrf52840.ini new file mode 100644 index 00000000..61995378 --- /dev/null +++ b/arch/nrf52/nrf52840.ini @@ -0,0 +1,14 @@ +[nrf52840_base] +extends = nrf52_base +build_flags = ${nrf52_base.build_flags} +lib_deps = + ${arduino_base.lib_deps} + ${environmental_base.lib_deps} + https://github.com/Kongduino/Adafruit_nRFCrypto.git + +; Note: By default no lora device is created for this build - it uses a simulated interface +[env:nrf52840dk] +extends = nrf52840_base +board = nrf52840_dk + + diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini new file mode 100644 index 00000000..b1f793fe --- /dev/null +++ b/arch/portduino/portduino.ini @@ -0,0 +1,19 @@ +; The Portduino based sim environment on top of any host OS, all hardware will be simulated +[portduino_base] +build_src_filter = + ${env.build_src_filter} + - + - + - + - + - + - + - + - + +<../variants/portduino> +lib_deps = + ${env.lib_deps} + ${networking_base.lib_deps} + rweather/Crypto + https://github.com/meshtastic/RadioLib.git#5582ac30578ff3f53f20630a00b2a8a4b8f92c74 +build_flags = ${arduino_base.build_flags} -Isrc/platform/portduino diff --git a/arch/rp2040/rp2040.ini b/arch/rp2040/rp2040.ini new file mode 100644 index 00000000..742909e5 --- /dev/null +++ b/arch/rp2040/rp2040.ini @@ -0,0 +1,19 @@ +; Common settings for rp2040 Processor based targets +[rp2040_base] +platform = https://github.com/maxgerhardt/platform-raspberrypi.git +extends = arduino_base +board_build.core = earlephilhower +board_build.filesystem_size = 0.5m +build_flags = + ${arduino_base.build_flags} -Wno-unused-variable + -Isrc/platform/rp2040 + -D__PLAT_RP2040__ +# -D _POSIX_THREADS +build_src_filter = + ${arduino_base.build_src_filter} - - - - - - - - +lib_ignore = + BluetoothOTA +lib_deps = + ${arduino_base.lib_deps} + ${environmental_base.lib_deps} + https://github.com/kokke/tiny-AES-c.git diff --git a/arch/stm32/stm32wl5e.ini b/arch/stm32/stm32wl5e.ini new file mode 100644 index 00000000..862d1c9c --- /dev/null +++ b/arch/stm32/stm32wl5e.ini @@ -0,0 +1,19 @@ +[stm32wl5e_base] +platform = ststm32 +board = generic_wl5e +framework = arduino +build_type = debug +build_flags = + ${arduino_base.build_flags} + -Isrc/platform/stm32wl -g + -DHAL_SUBGHZ_MODULE_ENABLED +# Arduino/PlatformIO framework-arduinoststm32 package does not presently have SUBGHZSPI support +# -DPIN_SPI_MOSI=PINSUBGHZSPIMOSI -DPIN_SPI_MISO=PINSUBGHZSPIMISO -DPIN_SPI_SCK=PINSUBGHZSPISCK +build_src_filter = + ${arduino_base.build_src_filter} - - - - - - - - - - - - - +lib_deps = + ${env.lib_deps} + https://github.com/jgromes/RadioLib.git + https://github.com/kokke/tiny-AES-c.git +lib_ignore = + mathertel/OneButton@^2.0.3 diff --git a/platformio.ini b/platformio.ini index 5a7cb8d9..c00bec53 100644 --- a/platformio.ini +++ b/platformio.ini @@ -24,7 +24,9 @@ default_envs = tbeam ;default_envs = m5stack-coreink ;default_envs = rak4631 -extra_configs = variants/*/platformio.ini +extra_configs = + arch/*/*.ini + variants/*/platformio.ini [env] extra_scripts = bin/platformio-custom.py @@ -87,176 +89,4 @@ lib_deps = adafruit/Adafruit MCP9808 Library@^2.0.0 adafruit/Adafruit INA260 Library@^1.5.0 adafruit/Adafruit INA219@^1.2.0 -; Common settings for ESP targes, mixin with extends = esp32_base -[esp32_base] -extends = arduino_base -platform = espressif32 -build_src_filter = - ${arduino_base.build_src_filter} - - - -upload_speed = 115200 -debug_init_break = tbreak setup - -# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging. -# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h -# This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h -build_flags = - ${arduino_base.build_flags} - -Wall - -Wextra - -Isrc/platform/esp32 - -std=c++11 - -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG - -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG - -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL - -DAXP_DEBUG_PORT=Serial - -DCONFIG_BT_NIMBLE_ENABLED - -DCONFIG_NIMBLE_CPP_LOG_LEVEL=2 - -DCONFIG_BT_NIMBLE_MAX_CCCDS=20 - -lib_deps = - ${arduino_base.lib_deps} - ${networking_base.lib_deps} - ${environmental_base.lib_deps} - https://github.com/caveman99/esp32_https_server.git - h2zero/NimBLE-Arduino@1.4.0 - arduino-libraries/NTPClient@^3.1.0 - https://github.com/lewisxhe/XPowersLib.git - -lib_ignore = - segger_rtt - ESP32 BLE Arduino -platform_packages = - framework-arduinoespressif32 - -; leave this commented out to avoid breaking Windows -;upload_port = /dev/ttyUSB0 -;monitor_port = /dev/ttyUSB0 - -; Please don't delete these lines. JM uses them. -;upload_port = /dev/cu.SLAB_USBtoUART -;monitor_port = /dev/cu.SLAB_USBtoUART - -; customize the partition table -; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables -board_build.partitions = partition-table.csv - -[nrf52_base] -; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files -; platform = nordicnrf52 ;pending https://github.com/platformio/builder-framework-arduino-nrf5/pull/7 -platform = https://github.com/meshtastic/platform-nordicnrf52.git#merge - -extends = arduino_base -build_type = debug ; I'm debugging with ICE a lot now -; note: liboberon provides the AES256 implementation for NRF52 (though not using the hardware acceleration of the NRF52840 - FIXME) -build_flags = - ${arduino_base.build_flags} -Wno-unused-variable - -Isrc/platform/nrf52 -build_src_filter = - ${arduino_base.build_src_filter} - - - - - - - - -lib_ignore = - BluetoothOTA - -[nrf52840_base] -extends = nrf52_base -build_flags = ${nrf52_base.build_flags} -lib_deps = - ${arduino_base.lib_deps} - ${environmental_base.lib_deps} - https://github.com/Kongduino/Adafruit_nRFCrypto.git - -; Note: By default no lora device is created for this build - it uses a simulated interface -[env:nrf52840dk] -extends = nrf52840_base -board = nrf52840_dk - -; Note: By default no lora device is created for this build - it uses a simulated interface -[env:feather_nrf52832] -extends = nrf52_base -board = adafruit_feather_nrf52832 - -; Common settings for rp2040 Processor based targets -[rp2040_base] -platform = https://github.com/maxgerhardt/platform-raspberrypi.git -extends = arduino_base -board_build.core = earlephilhower -board_build.filesystem_size = 0.5m -build_flags = - ${arduino_base.build_flags} -Wno-unused-variable - -Isrc/platform/rp2040 - -D__PLAT_RP2040__ -# -D _POSIX_THREADS -build_src_filter = - ${arduino_base.build_src_filter} - - - - - - - - -lib_ignore = - BluetoothOTA -lib_deps = - ${arduino_base.lib_deps} - ${environmental_base.lib_deps} - https://github.com/kokke/tiny-AES-c.git - -[stm32wl5e_base] -platform = ststm32 -board = generic_wl5e -framework = arduino -build_type = debug -build_flags = - ${arduino_base.build_flags} - -Isrc/platform/stm32wl -g - -DHAL_SUBGHZ_MODULE_ENABLED -# Arduino/PlatformIO framework-arduinoststm32 package does not presently have SUBGHZSPI support -# -DPIN_SPI_MOSI=PINSUBGHZSPIMOSI -DPIN_SPI_MISO=PINSUBGHZSPIMISO -DPIN_SPI_SCK=PINSUBGHZSPISCK -build_src_filter = - ${arduino_base.build_src_filter} - - - - - - - - - - - - - -lib_deps = - ${env.lib_deps} - https://github.com/jgromes/RadioLib.git - https://github.com/kokke/tiny-AES-c.git -lib_ignore = - mathertel/OneButton@^2.0.3 - -[esp32s3_base] -extends = arduino_base -platform = espressif32 -build_src_filter = - ${arduino_base.build_src_filter} - - - -upload_speed = 961200 -monitor_speed = 115200 -debug_init_break = tbreak setup - -# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging. -# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h -# This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h -build_flags = - ${arduino_base.build_flags} - -Wall - -Wextra - -Isrc/platform/esp32 - -std=c++11 - -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG - -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG - -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL - -DAXP_DEBUG_PORT=Serial - -DCONFIG_BT_NIMBLE_ENABLED - -DCONFIG_NIMBLE_CPP_LOG_LEVEL=2 - -DCONFIG_BT_NIMBLE_MAX_CCCDS=20 - -lib_deps = - ${arduino_base.lib_deps} - ${networking_base.lib_deps} - ${environmental_base.lib_deps} - https://github.com/meshtastic/esp32_https_server.git - h2zero/NimBLE-Arduino@1.4.0 - arduino-libraries/NTPClient@^3.1.0 - https://github.com/lewisxhe/XPowersLib.git - - -lib_ignore = - segger_rtt - ESP32 BLE Arduino -platform_packages = - framework-arduinoespressif32@ 3.20004.220825 - -; customize the partition table -; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables -board_build.partitions = partition-table.csv - + \ No newline at end of file diff --git a/variants/portduino/platformio.ini b/variants/portduino/platformio.ini index 6d94cd81..c95ae37f 100644 --- a/variants/portduino/platformio.ini +++ b/variants/portduino/platformio.ini @@ -1,23 +1,3 @@ -; The Portduino based sim environment on top of any host OS, all hardware will be simulated -[portduino_base] -build_src_filter = - ${env.build_src_filter} - - - - - - - - - - - - - - - - - +<../variants/portduino> -lib_deps = - ${env.lib_deps} - ${networking_base.lib_deps} - rweather/Crypto - https://github.com/meshtastic/RadioLib.git#5582ac30578ff3f53f20630a00b2a8a4b8f92c74 -build_flags = ${arduino_base.build_flags} -Isrc/platform/portduino - [env:native] platform = https://github.com/meshtastic/platform-native.git build_flags = ${portduino_base.build_flags} -O0 -I variants/portduino