platformio.ini 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. [Heltec_t096]
  2. extends = nrf52_base
  3. board = heltec_t096
  4. board_build.ldscript = boards/nrf52840_s140_v6.ld
  5. build_flags = ${nrf52_base.build_flags}
  6. ${sensor_base.build_flags}
  7. -I lib/nrf52/s140_nrf52_6.1.1_API/include
  8. -I lib/nrf52/s140_nrf52_6.1.1_API/include/nrf52
  9. -I variants/heltec_t096
  10. -I src/helpers/ui
  11. -D HELTEC_T096
  12. -D NRF52_POWER_MANAGEMENT
  13. -D P_LORA_DIO_1=21
  14. -D P_LORA_NSS=5
  15. -D P_LORA_RESET=16
  16. -D P_LORA_BUSY=19
  17. -D P_LORA_SCLK=40
  18. -D P_LORA_MISO=14
  19. -D P_LORA_MOSI=11
  20. -D P_LORA_TX_LED=28
  21. -D P_LORA_PA_POWER=30 ;VFEM_Ctrl -LDO power enable
  22. -D P_LORA_KCT8103L_PA_CSD=12
  23. -D P_LORA_KCT8103L_PA_CTX=41
  24. -D LORA_TX_POWER=9 ; 9dBm + ~13dB KCT8103L gain = ~22dBm output
  25. -D MAX_LORA_TX_POWER=22 ; Max SX1262 output -> ~28dBm at antenna
  26. -D RADIO_CLASS=CustomSX1262
  27. -D WRAPPER_CLASS=CustomSX1262Wrapper
  28. -D SX126X_DIO2_AS_RF_SWITCH=true
  29. -D SX126X_DIO3_TCXO_VOLTAGE=1.8
  30. -D SX126X_CURRENT_LIMIT=140
  31. -D SX126X_RX_BOOSTED_GAIN=1
  32. -D PIN_VEXT_EN=26 ; Vext is connected to VDD which is also connected to TFT & GPS
  33. -D PIN_VEXT_EN_ACTIVE=HIGH
  34. -D PIN_GPS_RX=25
  35. -D PIN_GPS_TX=23
  36. -D PIN_GPS_EN=GPS_EN
  37. -D PIN_GPS_EN_ACTIVE=LOW
  38. -D PIN_GPS_RESET=GPS_RESET
  39. -D PIN_GPS_RESET_ACTIVE=LOW
  40. -D GPS_BAUD_RATE=115200
  41. -D PIN_VBAT_READ=BATTERY_PIN
  42. -D PIN_BAT_CTL=47
  43. -D DISPLAY_CLASS=ST7735Display
  44. -D DISPLAY_ROTATION=1
  45. build_src_filter = ${nrf52_base.build_src_filter}
  46. +<helpers/*.cpp>
  47. +<helpers/sensors>
  48. +<../variants/heltec_t096>
  49. +<helpers/ui/ST7735Display.cpp>
  50. +<helpers/ui/MomentaryButton.cpp>
  51. lib_deps =
  52. ${nrf52_base.lib_deps}
  53. ${sensor_base.lib_deps}
  54. adafruit/Adafruit ST7735 and ST7789 Library @ ^1.11.0
  55. debug_tool = jlink
  56. upload_protocol = nrfutil
  57. [env:Heltec_t096_repeater]
  58. extends = Heltec_t096
  59. build_src_filter = ${Heltec_t096.build_src_filter}
  60. +<../examples/simple_repeater>
  61. build_flags =
  62. ${Heltec_t096.build_flags}
  63. -D ADVERT_NAME='"Heltec_t096 Repeater"'
  64. -D ADVERT_LAT=0.0
  65. -D ADVERT_LON=0.0
  66. -D ADMIN_PASSWORD='"password"'
  67. -D MAX_NEIGHBOURS=50
  68. ; -D MESH_PACKET_LOGGING=1
  69. ; -D MESH_DEBUG=1
  70. [env:Heltec_t096_repeater_bridge_rs232]
  71. extends = Heltec_t096
  72. build_flags =
  73. ${Heltec_t096.build_flags}
  74. -D ADVERT_NAME='"RS232 Bridge"'
  75. -D ADVERT_LAT=0.0
  76. -D ADVERT_LON=0.0
  77. -D ADMIN_PASSWORD='"password"'
  78. -D MAX_NEIGHBOURS=50
  79. -D WITH_RS232_BRIDGE=Serial2
  80. -D WITH_RS232_BRIDGE_RX=9
  81. -D WITH_RS232_BRIDGE_TX=10
  82. ; -D BRIDGE_DEBUG=1
  83. ; -D MESH_PACKET_LOGGING=1
  84. ; -D MESH_DEBUG=1
  85. build_src_filter = ${Heltec_t096.build_src_filter}
  86. +<helpers/bridges/RS232Bridge.cpp>
  87. +<../examples/simple_repeater>
  88. [env:Heltec_t096_room_server]
  89. extends = Heltec_t096
  90. build_src_filter = ${Heltec_t096.build_src_filter}
  91. +<../examples/simple_room_server>
  92. build_flags =
  93. ${Heltec_t096.build_flags}
  94. -D ADVERT_NAME='"Heltec_t096 Room"'
  95. -D ADVERT_LAT=0.0
  96. -D ADVERT_LON=0.0
  97. -D ADMIN_PASSWORD='"password"'
  98. -D ROOM_PASSWORD='"hello"'
  99. ; -D MESH_PACKET_LOGGING=1
  100. ; -D MESH_DEBUG=1
  101. [env:Heltec_t096_companion_radio_ble]
  102. extends = Heltec_t096
  103. board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
  104. board_upload.maximum_size = 712704
  105. build_flags =
  106. ${Heltec_t096.build_flags}
  107. -I examples/companion_radio/ui-new
  108. -D MAX_CONTACTS=350
  109. -D MAX_GROUP_CHANNELS=40
  110. -D BLE_PIN_CODE=123456
  111. -D ENV_INCLUDE_GPS=1 ; enable the GPS page in UI
  112. ; -D BLE_DEBUG_LOGGING=1
  113. -D OFFLINE_QUEUE_SIZE=256
  114. ; -D MESH_PACKET_LOGGING=1
  115. ; -D MESH_DEBUG=1
  116. build_src_filter = ${Heltec_t096.build_src_filter}
  117. +<helpers/nrf52/SerialBLEInterface.cpp>
  118. +<../examples/companion_radio/*.cpp>
  119. +<../examples/companion_radio/ui-new/*.cpp>
  120. lib_deps =
  121. ${Heltec_t096.lib_deps}
  122. densaugeo/base64 @ ~1.4.0
  123. [env:Heltec_t096_companion_radio_usb]
  124. extends = Heltec_t096
  125. board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
  126. board_upload.maximum_size = 712704
  127. build_flags =
  128. ${Heltec_t096.build_flags}
  129. -I examples/companion_radio/ui-new
  130. -D MAX_CONTACTS=350
  131. -D MAX_GROUP_CHANNELS=40
  132. ; -D BLE_PIN_CODE=123456
  133. ; -D BLE_DEBUG_LOGGING=1
  134. ; -D MESH_PACKET_LOGGING=1
  135. ; -D MESH_DEBUG=1
  136. build_src_filter = ${Heltec_t096.build_src_filter}
  137. +<helpers/nrf52/*.cpp>
  138. +<../examples/companion_radio/*.cpp>
  139. +<../examples/companion_radio/ui-new/*.cpp>
  140. lib_deps =
  141. ${Heltec_t096.lib_deps}
  142. densaugeo/base64 @ ~1.4.0
  143. [env:Heltec_t096_kiss_modem]
  144. extends = Heltec_t096
  145. build_src_filter = ${Heltec_t096.build_src_filter}
  146. +<../examples/kiss_modem/>