platformio.ini 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. ;
  2. ; Heltec T114 without display
  3. ;
  4. [Heltec_t114]
  5. extends = nrf52_base
  6. board = heltec_t114
  7. board_build.ldscript = boards/nrf52840_s140_v6.ld
  8. build_flags = ${nrf52_base.build_flags}
  9. -I lib/nrf52/s140_nrf52_6.1.1_API/include
  10. -I lib/nrf52/s140_nrf52_6.1.1_API/include/nrf52
  11. -I variants/heltec_t114
  12. -I src/helpers/ui
  13. -D HELTEC_T114
  14. -D P_LORA_DIO_1=20
  15. -D P_LORA_NSS=24
  16. -D P_LORA_RESET=25
  17. -D P_LORA_BUSY=17
  18. -D P_LORA_SCLK=19
  19. -D P_LORA_MISO=23
  20. -D P_LORA_MOSI=22
  21. -D P_LORA_TX_LED=35
  22. -D RADIO_CLASS=CustomSX1262
  23. -D WRAPPER_CLASS=CustomSX1262Wrapper
  24. -D LORA_TX_POWER=22
  25. -D SX126X_POWER_EN=37
  26. -D SX126X_DIO2_AS_RF_SWITCH=true
  27. -D SX126X_DIO3_TCXO_VOLTAGE=1.8
  28. -D SX126X_CURRENT_LIMIT=140
  29. -D SX126X_RX_BOOSTED_GAIN=1
  30. -D DISPLAY_CLASS=NullDisplayDriver
  31. -D ST7789
  32. -D PIN_GPS_RX=39
  33. -D PIN_GPS_TX=37
  34. -D PIN_GPS_EN=21
  35. -D PIN_GPS_RESET=38
  36. -D PIN_GPS_RESET_ACTIVE=LOW
  37. build_src_filter = ${nrf52_base.build_src_filter}
  38. +<helpers/*.cpp>
  39. +<../variants/heltec_t114>
  40. lib_deps =
  41. ${nrf52_base.lib_deps}
  42. stevemarple/MicroNMEA @ ^2.0.6
  43. adafruit/Adafruit GFX Library @ ^1.12.1
  44. debug_tool = jlink
  45. upload_protocol = nrfutil
  46. [env:Heltec_t114_without_display_repeater]
  47. extends = Heltec_t114
  48. build_src_filter = ${Heltec_t114.build_src_filter}
  49. +<../examples/simple_repeater>
  50. build_flags =
  51. ${Heltec_t114.build_flags}
  52. -D ADVERT_NAME='"Heltec_T114 Repeater"'
  53. -D ADVERT_LAT=0.0
  54. -D ADVERT_LON=0.0
  55. -D ADMIN_PASSWORD='"password"'
  56. -D MAX_NEIGHBOURS=50
  57. ; -D MESH_PACKET_LOGGING=1
  58. ; -D MESH_DEBUG=1
  59. [env:Heltec_t114_without_display_repeater_bridge_rs232]
  60. extends = Heltec_t114
  61. build_flags =
  62. ${Heltec_t114.build_flags}
  63. -D ADVERT_NAME='"RS232 Bridge"'
  64. -D ADVERT_LAT=0.0
  65. -D ADVERT_LON=0.0
  66. -D ADMIN_PASSWORD='"password"'
  67. -D MAX_NEIGHBOURS=50
  68. -D WITH_RS232_BRIDGE=Serial2
  69. -D WITH_RS232_BRIDGE_RX=9
  70. -D WITH_RS232_BRIDGE_TX=10
  71. ; -D BRIDGE_DEBUG=1
  72. ; -D MESH_PACKET_LOGGING=1
  73. ; -D MESH_DEBUG=1
  74. build_src_filter = ${Heltec_t114.build_src_filter}
  75. +<helpers/bridges/RS232Bridge.cpp>
  76. +<../examples/simple_repeater>
  77. [env:Heltec_t114_without_display_room_server]
  78. extends = Heltec_t114
  79. build_src_filter = ${Heltec_t114.build_src_filter}
  80. +<../examples/simple_room_server>
  81. build_flags =
  82. ${Heltec_t114.build_flags}
  83. -D ADVERT_NAME='"Heltec_T114 Room"'
  84. -D ADVERT_LAT=0.0
  85. -D ADVERT_LON=0.0
  86. -D ADMIN_PASSWORD='"password"'
  87. -D ROOM_PASSWORD='"hello"'
  88. ; -D MESH_PACKET_LOGGING=1
  89. ; -D MESH_DEBUG=1
  90. [env:Heltec_t114_without_display_companion_radio_ble]
  91. extends = Heltec_t114
  92. board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
  93. board_upload.maximum_size = 712704
  94. build_flags =
  95. ${Heltec_t114.build_flags}
  96. -I examples/companion_radio/ui-new
  97. -D MAX_CONTACTS=350
  98. -D MAX_GROUP_CHANNELS=40
  99. -D BLE_PIN_CODE=123456
  100. ; -D BLE_DEBUG_LOGGING=1
  101. -D OFFLINE_QUEUE_SIZE=256
  102. ; -D MESH_PACKET_LOGGING=1
  103. ; -D MESH_DEBUG=1
  104. build_src_filter = ${Heltec_t114.build_src_filter}
  105. +<helpers/nrf52/SerialBLEInterface.cpp>
  106. +<../examples/companion_radio/*.cpp>
  107. +<../examples/companion_radio/ui-new/*.cpp>
  108. lib_deps =
  109. ${Heltec_t114.lib_deps}
  110. densaugeo/base64 @ ~1.4.0
  111. [env:Heltec_t114_without_display_companion_radio_usb]
  112. extends = Heltec_t114
  113. board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
  114. board_upload.maximum_size = 712704
  115. build_flags =
  116. ${Heltec_t114.build_flags}
  117. -I examples/companion_radio/ui-new
  118. -D MAX_CONTACTS=350
  119. -D MAX_GROUP_CHANNELS=40
  120. ; -D BLE_PIN_CODE=123456
  121. ; -D BLE_DEBUG_LOGGING=1
  122. ; -D MESH_PACKET_LOGGING=1
  123. ; -D MESH_DEBUG=1
  124. build_src_filter = ${Heltec_t114.build_src_filter}
  125. +<helpers/nrf52/*.cpp>
  126. +<../examples/companion_radio/*.cpp>
  127. +<../examples/companion_radio/ui-new/*.cpp>
  128. lib_deps =
  129. ${Heltec_t114.lib_deps}
  130. densaugeo/base64 @ ~1.4.0
  131. ;
  132. ; Heltec T114 with ST7789 display
  133. ;
  134. [Heltec_t114_with_display]
  135. extends = Heltec_t114
  136. board = heltec_t114
  137. board_build.ldscript = boards/nrf52840_s140_v6.ld
  138. build_flags = ${Heltec_t114.build_flags}
  139. -D HELTEC_T114_WITH_DISPLAY
  140. -D DISPLAY_CLASS=ST7789Display
  141. build_src_filter = ${Heltec_t114.build_src_filter}
  142. +<helpers/ui/ST7789Display.cpp>
  143. +<helpers/ui/MomentaryButton.cpp>
  144. +<helpers/ui/OLEDDisplay.cpp>
  145. +<helpers/ui/OLEDDisplayFonts.cpp>
  146. lib_deps =
  147. ${Heltec_t114.lib_deps}
  148. debug_tool = jlink
  149. upload_protocol = nrfutil
  150. [env:Heltec_t114_repeater]
  151. extends = Heltec_t114_with_display
  152. build_src_filter = ${Heltec_t114_with_display.build_src_filter}
  153. +<../examples/simple_repeater>
  154. build_flags =
  155. ${Heltec_t114_with_display.build_flags}
  156. -D ADVERT_NAME='"Heltec_T114 Repeater"'
  157. -D ADVERT_LAT=0.0
  158. -D ADVERT_LON=0.0
  159. -D ADMIN_PASSWORD='"password"'
  160. -D MAX_NEIGHBOURS=50
  161. ; -D MESH_PACKET_LOGGING=1
  162. ; -D MESH_DEBUG=1
  163. [env:Heltec_t114_repeater_bridge_rs232]
  164. extends = Heltec_t114
  165. build_flags =
  166. ${Heltec_t114.build_flags}
  167. -D ADVERT_NAME='"RS232 Bridge"'
  168. -D ADVERT_LAT=0.0
  169. -D ADVERT_LON=0.0
  170. -D ADMIN_PASSWORD='"password"'
  171. -D MAX_NEIGHBOURS=50
  172. -D WITH_RS232_BRIDGE=Serial2
  173. -D WITH_RS232_BRIDGE_RX=9
  174. -D WITH_RS232_BRIDGE_TX=10
  175. ; -D BRIDGE_DEBUG=1
  176. ; -D MESH_PACKET_LOGGING=1
  177. ; -D MESH_DEBUG=1
  178. build_src_filter = ${Heltec_t114_with_display.build_src_filter}
  179. +<helpers/bridges/RS232Bridge.cpp>
  180. +<../examples/simple_repeater>
  181. [env:Heltec_t114_room_server]
  182. extends = Heltec_t114_with_display
  183. build_src_filter = ${Heltec_t114_with_display.build_src_filter}
  184. +<../examples/simple_room_server>
  185. build_flags =
  186. ${Heltec_t114_with_display.build_flags}
  187. -D ADVERT_NAME='"Heltec_T114 Room"'
  188. -D ADVERT_LAT=0.0
  189. -D ADVERT_LON=0.0
  190. -D ADMIN_PASSWORD='"password"'
  191. -D ROOM_PASSWORD='"hello"'
  192. ; -D MESH_PACKET_LOGGING=1
  193. ; -D MESH_DEBUG=1
  194. [env:Heltec_t114_companion_radio_ble]
  195. extends = Heltec_t114_with_display
  196. board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
  197. board_upload.maximum_size = 712704
  198. build_flags =
  199. ${Heltec_t114_with_display.build_flags}
  200. -I examples/companion_radio/ui-new
  201. -D MAX_CONTACTS=350
  202. -D MAX_GROUP_CHANNELS=40
  203. -D BLE_PIN_CODE=123456
  204. -D ENV_INCLUDE_GPS=1 ; enable the GPS page in UI
  205. ; -D BLE_DEBUG_LOGGING=1
  206. -D OFFLINE_QUEUE_SIZE=256
  207. ; -D MESH_PACKET_LOGGING=1
  208. ; -D MESH_DEBUG=1
  209. build_src_filter = ${Heltec_t114_with_display.build_src_filter}
  210. +<helpers/nrf52/SerialBLEInterface.cpp>
  211. +<../examples/companion_radio/*.cpp>
  212. +<../examples/companion_radio/ui-new/*.cpp>
  213. lib_deps =
  214. ${Heltec_t114_with_display.lib_deps}
  215. densaugeo/base64 @ ~1.4.0
  216. [env:Heltec_t114_companion_radio_usb]
  217. extends = Heltec_t114_with_display
  218. board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
  219. board_upload.maximum_size = 712704
  220. build_flags =
  221. ${Heltec_t114_with_display.build_flags}
  222. -I examples/companion_radio/ui-new
  223. -D MAX_CONTACTS=350
  224. -D MAX_GROUP_CHANNELS=40
  225. ; -D BLE_PIN_CODE=123456
  226. ; -D BLE_DEBUG_LOGGING=1
  227. ; -D MESH_PACKET_LOGGING=1
  228. ; -D MESH_DEBUG=1
  229. build_src_filter = ${Heltec_t114_with_display.build_src_filter}
  230. +<helpers/nrf52/*.cpp>
  231. +<../examples/companion_radio/*.cpp>
  232. +<../examples/companion_radio/ui-new/*.cpp>
  233. lib_deps =
  234. ${Heltec_t114_with_display.lib_deps}
  235. densaugeo/base64 @ ~1.4.0