platformio.ini 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  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 OFFLINE_QUEUE_SIZE=256
  202. -D DISPLAY_CLASS=SSD1306Display
  203. -D WIFI_DEBUG_LOGGING=1
  204. -D WIFI_SSID='"myssid"'
  205. -D WIFI_PWD='"mypwd"'
  206. ; -D MESH_PACKET_LOGGING=1
  207. ; -D MESH_DEBUG=1
  208. build_src_filter = ${heltec_v4_oled.build_src_filter}
  209. +<helpers/ui/SSD1306Display.cpp>
  210. +<helpers/ui/MomentaryButton.cpp>
  211. +<helpers/esp32/*.cpp>
  212. +<../examples/companion_radio/*.cpp>
  213. +<../examples/companion_radio/ui-new/*.cpp>
  214. lib_deps =
  215. ${heltec_v4_oled.lib_deps}
  216. densaugeo/base64 @ ~1.4.0
  217. [env:heltec_v4_sensor]
  218. extends = heltec_v4_oled
  219. build_flags =
  220. ${heltec_v4_oled.build_flags}
  221. -D ADVERT_NAME='"Heltec v4 Sensor"'
  222. -D ADVERT_LAT=0.0
  223. -D ADVERT_LON=0.0
  224. -D ADMIN_PASSWORD='"password"'
  225. -D ENV_PIN_SDA=3
  226. -D ENV_PIN_SCL=4
  227. -D DISPLAY_CLASS=SSD1306Display
  228. ; -D MESH_PACKET_LOGGING=1
  229. ; -D MESH_DEBUG=1
  230. build_src_filter = ${heltec_v4_oled.build_src_filter}
  231. +<helpers/ui/SSD1306Display.cpp>
  232. +<../examples/simple_sensor>
  233. lib_deps =
  234. ${heltec_v4_oled.lib_deps}
  235. ${esp32_ota.lib_deps}
  236. [env:heltec_v4_tft_repeater]
  237. extends = heltec_v4_tft
  238. build_flags =
  239. ${heltec_v4_tft.build_flags}
  240. -D DISPLAY_CLASS=ST7789LCDDisplay
  241. -D ADVERT_NAME='"Heltec Repeater"'
  242. -D ADVERT_LAT=0.0
  243. -D ADVERT_LON=0.0
  244. -D ADMIN_PASSWORD='"password"'
  245. -D MAX_NEIGHBOURS=50
  246. ; -D MESH_PACKET_LOGGING=1
  247. ; -D MESH_DEBUG=1
  248. build_src_filter = ${heltec_v4_tft.build_src_filter}
  249. +<helpers/ui/ST7789LCDDisplay.cpp>
  250. +<../examples/simple_repeater>
  251. lib_deps =
  252. ${heltec_v4_tft.lib_deps}
  253. ${esp32_ota.lib_deps}
  254. bakercp/CRC32 @ ^2.0.0
  255. [env:heltec_v4_tft_repeater_bridge_espnow]
  256. extends = heltec_v4_tft
  257. build_flags =
  258. ${heltec_v4_tft.build_flags}
  259. -D DISPLAY_CLASS=ST7789LCDDisplay
  260. -D ADVERT_NAME='"ESPNow Bridge"'
  261. -D ADVERT_LAT=0.0
  262. -D ADVERT_LON=0.0
  263. -D ADMIN_PASSWORD='"password"'
  264. -D MAX_NEIGHBOURS=50
  265. -D WITH_ESPNOW_BRIDGE=1
  266. ; -D BRIDGE_DEBUG=1
  267. ; -D MESH_PACKET_LOGGING=1
  268. ; -D MESH_DEBUG=1
  269. build_src_filter = ${heltec_v4_tft.build_src_filter}
  270. +<helpers/bridges/ESPNowBridge.cpp>
  271. +<helpers/ui/ST7789LCDDisplay.cpp>
  272. +<../examples/simple_repeater>
  273. lib_deps =
  274. ${heltec_v4_tft.lib_deps}
  275. ${esp32_ota.lib_deps}
  276. [env:heltec_v4_tft_room_server]
  277. extends = heltec_v4_tft
  278. build_flags =
  279. ${heltec_v4_tft.build_flags}
  280. -D DISPLAY_CLASS=ST7789LCDDisplay
  281. -D ADVERT_NAME='"Heltec Room"'
  282. -D ADVERT_LAT=0.0
  283. -D ADVERT_LON=0.0
  284. -D ADMIN_PASSWORD='"password"'
  285. -D ROOM_PASSWORD='"hello"'
  286. ; -D MESH_PACKET_LOGGING=1
  287. ; -D MESH_DEBUG=1
  288. build_src_filter = ${heltec_v4_tft.build_src_filter}
  289. +<helpers/ui/ST7789LCDDisplay.cpp>
  290. +<../examples/simple_room_server>
  291. lib_deps =
  292. ${heltec_v4_tft.lib_deps}
  293. ${esp32_ota.lib_deps}
  294. [env:heltec_v4_tft_terminal_chat]
  295. extends = heltec_v4_tft
  296. build_flags =
  297. ${heltec_v4_tft.build_flags}
  298. -D MAX_CONTACTS=350
  299. -D MAX_GROUP_CHANNELS=1
  300. ; -D MESH_PACKET_LOGGING=1
  301. ; -D MESH_DEBUG=1
  302. build_src_filter = ${heltec_v4_tft.build_src_filter}
  303. +<../examples/simple_secure_chat/main.cpp>
  304. lib_deps =
  305. ${heltec_v4_tft.lib_deps}
  306. densaugeo/base64 @ ~1.4.0
  307. [env:heltec_v4_tft_companion_radio_usb]
  308. extends = heltec_v4_tft
  309. build_flags =
  310. ${heltec_v4_tft.build_flags}
  311. -I examples/companion_radio/ui-new
  312. -D MAX_CONTACTS=350
  313. -D MAX_GROUP_CHANNELS=40
  314. -D DISPLAY_CLASS=ST7789LCDDisplay
  315. ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
  316. ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
  317. build_src_filter = ${heltec_v4_tft.build_src_filter}
  318. +<helpers/ui/ST7789LCDDisplay.cpp>
  319. +<helpers/ui/MomentaryButton.cpp>
  320. +<../examples/companion_radio/*.cpp>
  321. +<../examples/companion_radio/ui-new/*.cpp>
  322. lib_deps =
  323. ${heltec_v4_tft.lib_deps}
  324. densaugeo/base64 @ ~1.4.0
  325. [env:heltec_v4_tft_companion_radio_ble]
  326. extends = heltec_v4_tft
  327. build_flags =
  328. ${heltec_v4_tft.build_flags}
  329. -I examples/companion_radio/ui-new
  330. -D DISPLAY_CLASS=ST7789LCDDisplay
  331. -D MAX_CONTACTS=350
  332. -D MAX_GROUP_CHANNELS=40
  333. -D BLE_PIN_CODE=123456 ; dynamic, random PIN
  334. -D AUTO_SHUTDOWN_MILLIVOLTS=3400
  335. -D BLE_DEBUG_LOGGING=1
  336. -D OFFLINE_QUEUE_SIZE=256
  337. ; -D MESH_PACKET_LOGGING=1
  338. ; -D MESH_DEBUG=1
  339. build_src_filter = ${heltec_v4_tft.build_src_filter}
  340. +<helpers/ui/ST7789LCDDisplay.cpp>
  341. +<helpers/ui/MomentaryButton.cpp>
  342. +<helpers/esp32/*.cpp>
  343. +<../examples/companion_radio/*.cpp>
  344. +<../examples/companion_radio/ui-new/*.cpp>
  345. lib_deps =
  346. ${heltec_v4_tft.lib_deps}
  347. densaugeo/base64 @ ~1.4.0
  348. [env:heltec_v4_tft_companion_radio_wifi]
  349. extends = heltec_v4_tft
  350. build_flags =
  351. ${heltec_v4_tft.build_flags}
  352. -I examples/companion_radio/ui-new
  353. -D MAX_CONTACTS=350
  354. -D MAX_GROUP_CHANNELS=40
  355. -D OFFLINE_QUEUE_SIZE=256
  356. -D DISPLAY_CLASS=ST7789LCDDisplay
  357. -D WIFI_DEBUG_LOGGING=1
  358. -D WIFI_SSID='"myssid"'
  359. -D WIFI_PWD='"mypwd"'
  360. ; -D MESH_PACKET_LOGGING=1
  361. ; -D MESH_DEBUG=1
  362. build_src_filter = ${heltec_v4_tft.build_src_filter}
  363. +<helpers/ui/ST7789LCDDisplay.cpp>
  364. +<helpers/ui/MomentaryButton.cpp>
  365. +<helpers/esp32/*.cpp>
  366. +<../examples/companion_radio/*.cpp>
  367. +<../examples/companion_radio/ui-new/*.cpp>
  368. lib_deps =
  369. ${heltec_v4_tft.lib_deps}
  370. densaugeo/base64 @ ~1.4.0
  371. [env:heltec_v4_tft_sensor]
  372. extends = heltec_v4_tft
  373. build_flags =
  374. ${heltec_v4_tft.build_flags}
  375. -D ADVERT_NAME='"Heltec v4 Sensor"'
  376. -D ADVERT_LAT=0.0
  377. -D ADVERT_LON=0.0
  378. -D ADMIN_PASSWORD='"password"'
  379. -D ENV_PIN_SDA=3
  380. -D ENV_PIN_SCL=4
  381. -D DISPLAY_CLASS=ST7789LCDDisplay
  382. ; -D MESH_PACKET_LOGGING=1
  383. ; -D MESH_DEBUG=1
  384. build_src_filter = ${heltec_v4_tft.build_src_filter}
  385. +<helpers/ui/ST7789LCDDisplay.cpp>
  386. +<../examples/simple_sensor>
  387. lib_deps =
  388. ${heltec_v4_tft.lib_deps}
  389. ${esp32_ota.lib_deps}