platformio.ini 11 KB

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