platformio.ini 7.0 KB

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