platformio.ini 6.9 KB

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