platformio.ini 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. [Heltec_lora32_v4]
  2. extends = esp32_base
  3. board = heltec_v4
  4. build_flags =
  5. ${esp32_base.build_flags}
  6. ${sensor_base.build_flags}
  7. -I variants/heltec_v4
  8. -D HELTEC_LORA_V4
  9. -D ESP32_CPU_FREQ=80
  10. -D RADIO_CLASS=CustomSX1262
  11. -D WRAPPER_CLASS=CustomSX1262Wrapper
  12. -D P_LORA_TX_LED=35
  13. -D P_LORA_DIO_1=14
  14. -D P_LORA_NSS=8
  15. -D P_LORA_RESET=12
  16. -D P_LORA_BUSY=13
  17. -D P_LORA_SCLK=9
  18. -D P_LORA_MISO=11
  19. -D P_LORA_MOSI=10
  20. -D P_LORA_PA_POWER=7 ; VFEM_Ctrl - Power on GC1109
  21. -D P_LORA_PA_EN=2 ; PA CSD - Enable GC1109
  22. -D P_LORA_PA_TX_EN=46 ; PA CPS - GC1109 TX PA full(High) / bypass(Low)
  23. -D PIN_USER_BTN=0
  24. -D PIN_VEXT_EN=36
  25. -D PIN_VEXT_EN_ACTIVE=LOW
  26. -D LORA_TX_POWER=10 ;If it is configured as 10 here, the final output will be 22 dbm.
  27. -D MAX_LORA_TX_POWER=22 ; Max SX1262 output
  28. -D SX126X_REGISTER_PATCH=1 ; Patch register 0x8B5 for improved RX
  29. -D SX126X_DIO2_AS_RF_SWITCH=true ; GC1109 CTX is controlled by SX1262 DIO2
  30. -D SX126X_DIO3_TCXO_VOLTAGE=1.8
  31. -D SX126X_CURRENT_LIMIT=140
  32. -D SX126X_RX_BOOSTED_GAIN=1 ; In some cases, commenting this out will improve RX
  33. -D PIN_GPS_RX=38
  34. -D PIN_GPS_TX=39
  35. -D PIN_GPS_RESET=42
  36. -D PIN_GPS_RESET_ACTIVE=LOW
  37. -D PIN_GPS_EN=34
  38. -D PIN_GPS_EN_ACTIVE=LOW
  39. -D ENV_INCLUDE_GPS=1
  40. -D PIN_ADC_CTRL=37
  41. -D PIN_VBAT_READ=1
  42. build_src_filter = ${esp32_base.build_src_filter}
  43. +<../variants/heltec_v4>
  44. +<helpers/sensors>
  45. lib_deps =
  46. ${esp32_base.lib_deps}
  47. ${sensor_base.lib_deps}
  48. [heltec_v4_oled]
  49. extends = Heltec_lora32_v4
  50. build_flags =
  51. ${Heltec_lora32_v4.build_flags}
  52. -D HELTEC_LORA_V4_OLED
  53. -D PIN_BOARD_SDA=17
  54. -D PIN_BOARD_SCL=18
  55. -D PIN_OLED_RESET=21
  56. -D ENV_PIN_SDA=4
  57. -D ENV_PIN_SCL=3
  58. build_src_filter= ${Heltec_lora32_v4.build_src_filter}
  59. lib_deps = ${Heltec_lora32_v4.lib_deps}
  60. [heltec_v4_tft]
  61. extends = Heltec_lora32_v4
  62. build_flags =
  63. ${Heltec_lora32_v4.build_flags}
  64. -D HELTEC_LORA_V4_TFT
  65. -D PIN_BOARD_SDA=4
  66. -D PIN_BOARD_SCL=3
  67. -D DISPLAY_SCALE_X=2.5
  68. -D DISPLAY_SCALE_Y=3.75
  69. -D PIN_TFT_RST=18
  70. -D PIN_TFT_VDD_CTL=-1
  71. -D PIN_TFT_LEDA_CTL=21
  72. -D PIN_TFT_LEDA_CTL_ACTIVE=HIGH
  73. -D PIN_TFT_CS=15
  74. -D PIN_TFT_DC=16
  75. -D PIN_TFT_SCL=17
  76. -D PIN_TFT_SDA=33
  77. build_src_filter= ${Heltec_lora32_v4.build_src_filter}
  78. lib_deps =
  79. ${Heltec_lora32_v4.lib_deps}
  80. adafruit/Adafruit ST7735 and ST7789 Library @ ^1.11.0
  81. [env:heltec_v4_repeater]
  82. extends = heltec_v4_oled
  83. build_flags =
  84. ${heltec_v4_oled.build_flags}
  85. -D DISPLAY_CLASS=SSD1306Display
  86. -D ADVERT_NAME='"Heltec Repeater"'
  87. -D ADVERT_LAT=0.0
  88. -D ADVERT_LON=0.0
  89. -D ADMIN_PASSWORD='"password"'
  90. -D MAX_NEIGHBOURS=50
  91. ; -D MESH_PACKET_LOGGING=1
  92. ; -D MESH_DEBUG=1
  93. build_src_filter = ${heltec_v4_oled.build_src_filter}
  94. +<helpers/ui/SSD1306Display.cpp>
  95. +<../examples/simple_repeater>
  96. lib_deps =
  97. ${heltec_v4_oled.lib_deps}
  98. ${esp32_ota.lib_deps}
  99. bakercp/CRC32 @ ^2.0.0
  100. [env:heltec_v4_repeater_bridge_espnow]
  101. extends = heltec_v4_oled
  102. build_flags =
  103. ${heltec_v4_oled.build_flags}
  104. -D DISPLAY_CLASS=SSD1306Display
  105. -D ADVERT_NAME='"ESPNow Bridge"'
  106. -D ADVERT_LAT=0.0
  107. -D ADVERT_LON=0.0
  108. -D ADMIN_PASSWORD='"password"'
  109. -D MAX_NEIGHBOURS=50
  110. -D WITH_ESPNOW_BRIDGE=1
  111. ; -D BRIDGE_DEBUG=1
  112. ; -D MESH_PACKET_LOGGING=1
  113. ; -D MESH_DEBUG=1
  114. build_src_filter = ${heltec_v4_oled.build_src_filter}
  115. +<helpers/bridges/ESPNowBridge.cpp>
  116. +<helpers/ui/SSD1306Display.cpp>
  117. +<../examples/simple_repeater>
  118. lib_deps =
  119. ${heltec_v4_oled.lib_deps}
  120. ${esp32_ota.lib_deps}
  121. [env:heltec_v4_room_server]
  122. extends = heltec_v4_oled
  123. build_flags =
  124. ${heltec_v4_oled.build_flags}
  125. -D DISPLAY_CLASS=SSD1306Display
  126. -D ADVERT_NAME='"Heltec Room"'
  127. -D ADVERT_LAT=0.0
  128. -D ADVERT_LON=0.0
  129. -D ADMIN_PASSWORD='"password"'
  130. -D ROOM_PASSWORD='"hello"'
  131. ; -D MESH_PACKET_LOGGING=1
  132. ; -D MESH_DEBUG=1
  133. build_src_filter = ${heltec_v4_oled.build_src_filter}
  134. +<helpers/ui/SSD1306Display.cpp>
  135. +<../examples/simple_room_server>
  136. lib_deps =
  137. ${heltec_v4_oled.lib_deps}
  138. ${esp32_ota.lib_deps}
  139. [env:heltec_v4_terminal_chat]
  140. extends = heltec_v4_oled
  141. build_flags =
  142. ${heltec_v4_oled.build_flags}
  143. -D MAX_CONTACTS=350
  144. -D MAX_GROUP_CHANNELS=1
  145. ; -D MESH_PACKET_LOGGING=1
  146. ; -D MESH_DEBUG=1
  147. build_src_filter = ${heltec_v4_oled.build_src_filter}
  148. +<../examples/simple_secure_chat/main.cpp>
  149. lib_deps =
  150. ${heltec_v4_oled.lib_deps}
  151. densaugeo/base64 @ ~1.4.0
  152. [env:heltec_v4_companion_radio_usb]
  153. extends = heltec_v4_oled
  154. build_flags =
  155. ${heltec_v4_oled.build_flags}
  156. -I examples/companion_radio/ui-new
  157. -D MAX_CONTACTS=350
  158. -D MAX_GROUP_CHANNELS=40
  159. -D DISPLAY_CLASS=SSD1306Display
  160. ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
  161. ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
  162. build_src_filter = ${heltec_v4_oled.build_src_filter}
  163. +<helpers/ui/SSD1306Display.cpp>
  164. +<helpers/ui/MomentaryButton.cpp>
  165. +<../examples/companion_radio/*.cpp>
  166. +<../examples/companion_radio/ui-new/*.cpp>
  167. lib_deps =
  168. ${heltec_v4_oled.lib_deps}
  169. densaugeo/base64 @ ~1.4.0
  170. [env:heltec_v4_companion_radio_ble]
  171. extends = heltec_v4_oled
  172. build_flags =
  173. ${heltec_v4_oled.build_flags}
  174. -I examples/companion_radio/ui-new
  175. -D MAX_CONTACTS=350
  176. -D MAX_GROUP_CHANNELS=40
  177. -D DISPLAY_CLASS=SSD1306Display
  178. -D BLE_PIN_CODE=123456 ; dynamic, random PIN
  179. -D AUTO_SHUTDOWN_MILLIVOLTS=3400
  180. -D BLE_DEBUG_LOGGING=1
  181. -D OFFLINE_QUEUE_SIZE=256
  182. ; -D MESH_PACKET_LOGGING=1
  183. ; -D MESH_DEBUG=1
  184. build_src_filter = ${heltec_v4_oled.build_src_filter}
  185. +<helpers/ui/SSD1306Display.cpp>
  186. +<helpers/ui/MomentaryButton.cpp>
  187. +<helpers/esp32/*.cpp>
  188. +<../examples/companion_radio/*.cpp>
  189. +<../examples/companion_radio/ui-new/*.cpp>
  190. lib_deps =
  191. ${heltec_v4_oled.lib_deps}
  192. densaugeo/base64 @ ~1.4.0
  193. [env:heltec_v4_companion_radio_wifi]
  194. extends = heltec_v4_oled
  195. build_flags =
  196. ${heltec_v4_oled.build_flags}
  197. -I examples/companion_radio/ui-new
  198. -D MAX_CONTACTS=350
  199. -D MAX_GROUP_CHANNELS=40
  200. -D DISPLAY_CLASS=SSD1306Display
  201. -D WIFI_DEBUG_LOGGING=1
  202. -D WIFI_SSID='"myssid"'
  203. -D WIFI_PWD='"mypwd"'
  204. ; -D MESH_PACKET_LOGGING=1
  205. ; -D MESH_DEBUG=1
  206. build_src_filter = ${heltec_v4_oled.build_src_filter}
  207. +<helpers/ui/SSD1306Display.cpp>
  208. +<helpers/ui/MomentaryButton.cpp>
  209. +<helpers/esp32/*.cpp>
  210. +<../examples/companion_radio/*.cpp>
  211. +<../examples/companion_radio/ui-new/*.cpp>
  212. lib_deps =
  213. ${heltec_v4_oled.lib_deps}
  214. densaugeo/base64 @ ~1.4.0
  215. [env:heltec_v4_sensor]
  216. extends = heltec_v4_oled
  217. build_flags =
  218. ${heltec_v4_oled.build_flags}
  219. -D ADVERT_NAME='"Heltec v4 Sensor"'
  220. -D ADVERT_LAT=0.0
  221. -D ADVERT_LON=0.0
  222. -D ADMIN_PASSWORD='"password"'
  223. -D ENV_PIN_SDA=3
  224. -D ENV_PIN_SCL=4
  225. -D DISPLAY_CLASS=SSD1306Display
  226. ; -D MESH_PACKET_LOGGING=1
  227. ; -D MESH_DEBUG=1
  228. build_src_filter = ${heltec_v4_oled.build_src_filter}
  229. +<helpers/ui/SSD1306Display.cpp>
  230. +<../examples/simple_sensor>
  231. lib_deps =
  232. ${heltec_v4_oled.lib_deps}
  233. ${esp32_ota.lib_deps}
  234. [env:heltec_v4_tft_repeater]
  235. extends = heltec_v4_tft
  236. build_flags =
  237. ${heltec_v4_tft.build_flags}
  238. -D DISPLAY_CLASS=ST7789LCDDisplay
  239. -D ADVERT_NAME='"Heltec Repeater"'
  240. -D ADVERT_LAT=0.0
  241. -D ADVERT_LON=0.0
  242. -D ADMIN_PASSWORD='"password"'
  243. -D MAX_NEIGHBOURS=50
  244. ; -D MESH_PACKET_LOGGING=1
  245. ; -D MESH_DEBUG=1
  246. build_src_filter = ${heltec_v4_tft.build_src_filter}
  247. +<helpers/ui/ST7789LCDDisplay.cpp>
  248. +<../examples/simple_repeater>
  249. lib_deps =
  250. ${heltec_v4_tft.lib_deps}
  251. ${esp32_ota.lib_deps}
  252. bakercp/CRC32 @ ^2.0.0
  253. [env:heltec_v4_tft_repeater_bridge_espnow]
  254. extends = heltec_v4_tft
  255. build_flags =
  256. ${heltec_v4_tft.build_flags}
  257. -D DISPLAY_CLASS=ST7789LCDDisplay
  258. -D ADVERT_NAME='"ESPNow Bridge"'
  259. -D ADVERT_LAT=0.0
  260. -D ADVERT_LON=0.0
  261. -D ADMIN_PASSWORD='"password"'
  262. -D MAX_NEIGHBOURS=50
  263. -D WITH_ESPNOW_BRIDGE=1
  264. ; -D BRIDGE_DEBUG=1
  265. ; -D MESH_PACKET_LOGGING=1
  266. ; -D MESH_DEBUG=1
  267. build_src_filter = ${heltec_v4_tft.build_src_filter}
  268. +<helpers/bridges/ESPNowBridge.cpp>
  269. +<helpers/ui/ST7789LCDDisplay.cpp>
  270. +<../examples/simple_repeater>
  271. lib_deps =
  272. ${heltec_v4_tft.lib_deps}
  273. ${esp32_ota.lib_deps}
  274. [env:heltec_v4_tft_room_server]
  275. extends = heltec_v4_tft
  276. build_flags =
  277. ${heltec_v4_tft.build_flags}
  278. -D DISPLAY_CLASS=ST7789LCDDisplay
  279. -D ADVERT_NAME='"Heltec Room"'
  280. -D ADVERT_LAT=0.0
  281. -D ADVERT_LON=0.0
  282. -D ADMIN_PASSWORD='"password"'
  283. -D ROOM_PASSWORD='"hello"'
  284. ; -D MESH_PACKET_LOGGING=1
  285. ; -D MESH_DEBUG=1
  286. build_src_filter = ${heltec_v4_tft.build_src_filter}
  287. +<helpers/ui/ST7789LCDDisplay.cpp>
  288. +<../examples/simple_room_server>
  289. lib_deps =
  290. ${heltec_v4_tft.lib_deps}
  291. ${esp32_ota.lib_deps}
  292. [env:heltec_v4_tft_terminal_chat]
  293. extends = heltec_v4_tft
  294. build_flags =
  295. ${heltec_v4_tft.build_flags}
  296. -D MAX_CONTACTS=350
  297. -D MAX_GROUP_CHANNELS=1
  298. ; -D MESH_PACKET_LOGGING=1
  299. ; -D MESH_DEBUG=1
  300. build_src_filter = ${heltec_v4_tft.build_src_filter}
  301. +<../examples/simple_secure_chat/main.cpp>
  302. lib_deps =
  303. ${heltec_v4_tft.lib_deps}
  304. densaugeo/base64 @ ~1.4.0
  305. [env:heltec_v4_tft_companion_radio_usb]
  306. extends = heltec_v4_tft
  307. build_flags =
  308. ${heltec_v4_tft.build_flags}
  309. -I examples/companion_radio/ui-new
  310. -D MAX_CONTACTS=350
  311. -D MAX_GROUP_CHANNELS=40
  312. -D DISPLAY_CLASS=ST7789LCDDisplay
  313. ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
  314. ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
  315. build_src_filter = ${heltec_v4_tft.build_src_filter}
  316. +<helpers/ui/ST7789LCDDisplay.cpp>
  317. +<helpers/ui/MomentaryButton.cpp>
  318. +<../examples/companion_radio/*.cpp>
  319. +<../examples/companion_radio/ui-new/*.cpp>
  320. lib_deps =
  321. ${heltec_v4_tft.lib_deps}
  322. densaugeo/base64 @ ~1.4.0
  323. [env:heltec_v4_tft_companion_radio_ble]
  324. extends = heltec_v4_tft
  325. build_flags =
  326. ${heltec_v4_tft.build_flags}
  327. -I examples/companion_radio/ui-new
  328. -D DISPLAY_CLASS=ST7789LCDDisplay
  329. -D MAX_CONTACTS=350
  330. -D MAX_GROUP_CHANNELS=40
  331. -D BLE_PIN_CODE=123456 ; dynamic, random PIN
  332. -D AUTO_SHUTDOWN_MILLIVOLTS=3400
  333. -D BLE_DEBUG_LOGGING=1
  334. -D OFFLINE_QUEUE_SIZE=256
  335. ; -D MESH_PACKET_LOGGING=1
  336. ; -D MESH_DEBUG=1
  337. build_src_filter = ${heltec_v4_tft.build_src_filter}
  338. +<helpers/ui/ST7789LCDDisplay.cpp>
  339. +<helpers/ui/MomentaryButton.cpp>
  340. +<helpers/esp32/*.cpp>
  341. +<../examples/companion_radio/*.cpp>
  342. +<../examples/companion_radio/ui-new/*.cpp>
  343. lib_deps =
  344. ${heltec_v4_tft.lib_deps}
  345. densaugeo/base64 @ ~1.4.0
  346. [env:heltec_v4_tft_companion_radio_wifi]
  347. extends = heltec_v4_tft
  348. build_flags =
  349. ${heltec_v4_tft.build_flags}
  350. -I examples/companion_radio/ui-new
  351. -D MAX_CONTACTS=350
  352. -D MAX_GROUP_CHANNELS=40
  353. -D DISPLAY_CLASS=ST7789LCDDisplay
  354. -D WIFI_DEBUG_LOGGING=1
  355. -D WIFI_SSID='"myssid"'
  356. -D WIFI_PWD='"mypwd"'
  357. ; -D MESH_PACKET_LOGGING=1
  358. ; -D MESH_DEBUG=1
  359. build_src_filter = ${heltec_v4_tft.build_src_filter}
  360. +<helpers/ui/ST7789LCDDisplay.cpp>
  361. +<helpers/ui/MomentaryButton.cpp>
  362. +<helpers/esp32/*.cpp>
  363. +<../examples/companion_radio/*.cpp>
  364. +<../examples/companion_radio/ui-new/*.cpp>
  365. lib_deps =
  366. ${heltec_v4_tft.lib_deps}
  367. densaugeo/base64 @ ~1.4.0
  368. [env:heltec_v4_tft_sensor]
  369. extends = heltec_v4_tft
  370. build_flags =
  371. ${heltec_v4_tft.build_flags}
  372. -D ADVERT_NAME='"Heltec v4 Sensor"'
  373. -D ADVERT_LAT=0.0
  374. -D ADVERT_LON=0.0
  375. -D ADMIN_PASSWORD='"password"'
  376. -D ENV_PIN_SDA=3
  377. -D ENV_PIN_SCL=4
  378. -D DISPLAY_CLASS=ST7789LCDDisplay
  379. ; -D MESH_PACKET_LOGGING=1
  380. ; -D MESH_DEBUG=1
  381. build_src_filter = ${heltec_v4_tft.build_src_filter}
  382. +<helpers/ui/ST7789LCDDisplay.cpp>
  383. +<../examples/simple_sensor>
  384. lib_deps =
  385. ${heltec_v4_tft.lib_deps}
  386. ${esp32_ota.lib_deps}