platformio.ini 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  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_expansionkit_repeater]
  102. extends = heltec_v4_oled
  103. build_flags =
  104. ${heltec_v4_oled.build_flags}
  105. -D DISPLAY_CLASS=SSD1306Display
  106. -D ADVERT_NAME='"Heltec Repeater"'
  107. -D ADVERT_LAT=0.0
  108. -D ADVERT_LON=0.0
  109. -D ADMIN_PASSWORD='"password"'
  110. -D MAX_NEIGHBOURS=50
  111. ; -D MESH_PACKET_LOGGING=1
  112. ; -D MESH_DEBUG=1
  113. -D ENV_PIN_SDA=4
  114. -D ENV_PIN_SCL=3
  115. build_src_filter = ${heltec_v4_oled.build_src_filter}
  116. +<helpers/ui/SSD1306Display.cpp>
  117. +<../examples/simple_repeater>
  118. lib_deps =
  119. ${heltec_v4_oled.lib_deps}
  120. ${esp32_ota.lib_deps}
  121. bakercp/CRC32 @ ^2.0.0
  122. [env:heltec_v4_repeater_bridge_espnow]
  123. extends = heltec_v4_oled
  124. build_flags =
  125. ${heltec_v4_oled.build_flags}
  126. -D DISPLAY_CLASS=SSD1306Display
  127. -D ADVERT_NAME='"ESPNow Bridge"'
  128. -D ADVERT_LAT=0.0
  129. -D ADVERT_LON=0.0
  130. -D ADMIN_PASSWORD='"password"'
  131. -D MAX_NEIGHBOURS=50
  132. -D WITH_ESPNOW_BRIDGE=1
  133. ; -D BRIDGE_DEBUG=1
  134. ; -D MESH_PACKET_LOGGING=1
  135. ; -D MESH_DEBUG=1
  136. build_src_filter = ${heltec_v4_oled.build_src_filter}
  137. +<helpers/bridges/ESPNowBridge.cpp>
  138. +<helpers/ui/SSD1306Display.cpp>
  139. +<../examples/simple_repeater>
  140. lib_deps =
  141. ${heltec_v4_oled.lib_deps}
  142. ${esp32_ota.lib_deps}
  143. [env:heltec_v4_room_server]
  144. extends = heltec_v4_oled
  145. build_flags =
  146. ${heltec_v4_oled.build_flags}
  147. -D DISPLAY_CLASS=SSD1306Display
  148. -D ADVERT_NAME='"Heltec Room"'
  149. -D ADVERT_LAT=0.0
  150. -D ADVERT_LON=0.0
  151. -D ADMIN_PASSWORD='"password"'
  152. -D ROOM_PASSWORD='"hello"'
  153. ; -D MESH_PACKET_LOGGING=1
  154. ; -D MESH_DEBUG=1
  155. build_src_filter = ${heltec_v4_oled.build_src_filter}
  156. +<helpers/ui/SSD1306Display.cpp>
  157. +<../examples/simple_room_server>
  158. lib_deps =
  159. ${heltec_v4_oled.lib_deps}
  160. ${esp32_ota.lib_deps}
  161. [env:heltec_v4_terminal_chat]
  162. extends = heltec_v4_oled
  163. build_flags =
  164. ${heltec_v4_oled.build_flags}
  165. -D MAX_CONTACTS=350
  166. -D MAX_GROUP_CHANNELS=1
  167. ; -D MESH_PACKET_LOGGING=1
  168. ; -D MESH_DEBUG=1
  169. build_src_filter = ${heltec_v4_oled.build_src_filter}
  170. +<../examples/simple_secure_chat/main.cpp>
  171. lib_deps =
  172. ${heltec_v4_oled.lib_deps}
  173. densaugeo/base64 @ ~1.4.0
  174. [env:heltec_v4_companion_radio_usb]
  175. extends = heltec_v4_oled
  176. build_flags =
  177. ${heltec_v4_oled.build_flags}
  178. -I examples/companion_radio/ui-new
  179. -D MAX_CONTACTS=350
  180. -D MAX_GROUP_CHANNELS=40
  181. -D DISPLAY_CLASS=SSD1306Display
  182. ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
  183. ; NOTE: DO NOT ENABLE --> -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. +<../examples/companion_radio/*.cpp>
  188. +<../examples/companion_radio/ui-new/*.cpp>
  189. lib_deps =
  190. ${heltec_v4_oled.lib_deps}
  191. densaugeo/base64 @ ~1.4.0
  192. [env:heltec_v4_companion_radio_ble]
  193. extends = heltec_v4_oled
  194. build_flags =
  195. ${heltec_v4_oled.build_flags}
  196. -I examples/companion_radio/ui-new
  197. -D MAX_CONTACTS=350
  198. -D MAX_GROUP_CHANNELS=40
  199. -D DISPLAY_CLASS=SSD1306Display
  200. -D BLE_PIN_CODE=123456 ; dynamic, random PIN
  201. -D AUTO_SHUTDOWN_MILLIVOLTS=3400
  202. -D BLE_DEBUG_LOGGING=1
  203. -D OFFLINE_QUEUE_SIZE=256
  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_companion_radio_wifi]
  216. extends = heltec_v4_oled
  217. build_flags =
  218. ${heltec_v4_oled.build_flags}
  219. -I examples/companion_radio/ui-new
  220. -D MAX_CONTACTS=350
  221. -D MAX_GROUP_CHANNELS=40
  222. -D OFFLINE_QUEUE_SIZE=256
  223. -D DISPLAY_CLASS=SSD1306Display
  224. -D WIFI_DEBUG_LOGGING=1
  225. -D WIFI_SSID='"myssid"'
  226. -D WIFI_PWD='"mypwd"'
  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. +<helpers/ui/MomentaryButton.cpp>
  232. +<helpers/esp32/*.cpp>
  233. +<../examples/companion_radio/*.cpp>
  234. +<../examples/companion_radio/ui-new/*.cpp>
  235. lib_deps =
  236. ${heltec_v4_oled.lib_deps}
  237. densaugeo/base64 @ ~1.4.0
  238. [env:heltec_v4_sensor]
  239. extends = heltec_v4_oled
  240. build_flags =
  241. ${heltec_v4_oled.build_flags}
  242. -D ADVERT_NAME='"Heltec v4 Sensor"'
  243. -D ADVERT_LAT=0.0
  244. -D ADVERT_LON=0.0
  245. -D ADMIN_PASSWORD='"password"'
  246. -D ENV_PIN_SDA=3
  247. -D ENV_PIN_SCL=4
  248. -D DISPLAY_CLASS=SSD1306Display
  249. ; -D MESH_PACKET_LOGGING=1
  250. ; -D MESH_DEBUG=1
  251. build_src_filter = ${heltec_v4_oled.build_src_filter}
  252. +<helpers/ui/SSD1306Display.cpp>
  253. +<../examples/simple_sensor>
  254. lib_deps =
  255. ${heltec_v4_oled.lib_deps}
  256. ${esp32_ota.lib_deps}
  257. [env:heltec_v4_tft_repeater]
  258. extends = heltec_v4_tft
  259. build_flags =
  260. ${heltec_v4_tft.build_flags}
  261. -D DISPLAY_CLASS=ST7789LCDDisplay
  262. -D ADVERT_NAME='"Heltec Repeater"'
  263. -D ADVERT_LAT=0.0
  264. -D ADVERT_LON=0.0
  265. -D ADMIN_PASSWORD='"password"'
  266. -D MAX_NEIGHBOURS=50
  267. ; -D MESH_PACKET_LOGGING=1
  268. ; -D MESH_DEBUG=1
  269. build_src_filter = ${heltec_v4_tft.build_src_filter}
  270. +<helpers/ui/ST7789LCDDisplay.cpp>
  271. +<../examples/simple_repeater>
  272. lib_deps =
  273. ${heltec_v4_tft.lib_deps}
  274. ${esp32_ota.lib_deps}
  275. bakercp/CRC32 @ ^2.0.0
  276. [env:heltec_v4_tft_repeater_bridge_espnow]
  277. extends = heltec_v4_tft
  278. build_flags =
  279. ${heltec_v4_tft.build_flags}
  280. -D DISPLAY_CLASS=ST7789LCDDisplay
  281. -D ADVERT_NAME='"ESPNow Bridge"'
  282. -D ADVERT_LAT=0.0
  283. -D ADVERT_LON=0.0
  284. -D ADMIN_PASSWORD='"password"'
  285. -D MAX_NEIGHBOURS=50
  286. -D WITH_ESPNOW_BRIDGE=1
  287. ; -D BRIDGE_DEBUG=1
  288. ; -D MESH_PACKET_LOGGING=1
  289. ; -D MESH_DEBUG=1
  290. build_src_filter = ${heltec_v4_tft.build_src_filter}
  291. +<helpers/bridges/ESPNowBridge.cpp>
  292. +<helpers/ui/ST7789LCDDisplay.cpp>
  293. +<../examples/simple_repeater>
  294. lib_deps =
  295. ${heltec_v4_tft.lib_deps}
  296. ${esp32_ota.lib_deps}
  297. [env:heltec_v4_tft_room_server]
  298. extends = heltec_v4_tft
  299. build_flags =
  300. ${heltec_v4_tft.build_flags}
  301. -D DISPLAY_CLASS=ST7789LCDDisplay
  302. -D ADVERT_NAME='"Heltec Room"'
  303. -D ADVERT_LAT=0.0
  304. -D ADVERT_LON=0.0
  305. -D ADMIN_PASSWORD='"password"'
  306. -D ROOM_PASSWORD='"hello"'
  307. ; -D MESH_PACKET_LOGGING=1
  308. ; -D MESH_DEBUG=1
  309. build_src_filter = ${heltec_v4_tft.build_src_filter}
  310. +<helpers/ui/ST7789LCDDisplay.cpp>
  311. +<../examples/simple_room_server>
  312. lib_deps =
  313. ${heltec_v4_tft.lib_deps}
  314. ${esp32_ota.lib_deps}
  315. [env:heltec_v4_tft_terminal_chat]
  316. extends = heltec_v4_tft
  317. build_flags =
  318. ${heltec_v4_tft.build_flags}
  319. -D MAX_CONTACTS=350
  320. -D MAX_GROUP_CHANNELS=1
  321. ; -D MESH_PACKET_LOGGING=1
  322. ; -D MESH_DEBUG=1
  323. build_src_filter = ${heltec_v4_tft.build_src_filter}
  324. +<../examples/simple_secure_chat/main.cpp>
  325. lib_deps =
  326. ${heltec_v4_tft.lib_deps}
  327. densaugeo/base64 @ ~1.4.0
  328. [env:heltec_v4_tft_companion_radio_usb]
  329. extends = heltec_v4_tft
  330. build_flags =
  331. ${heltec_v4_tft.build_flags}
  332. -I examples/companion_radio/ui-new
  333. -D MAX_CONTACTS=350
  334. -D MAX_GROUP_CHANNELS=40
  335. -D DISPLAY_CLASS=ST7789LCDDisplay
  336. ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
  337. ; NOTE: DO NOT ENABLE --> -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. +<../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_ble]
  347. extends = heltec_v4_tft
  348. build_flags =
  349. ${heltec_v4_tft.build_flags}
  350. -I examples/companion_radio/ui-new
  351. -D DISPLAY_CLASS=ST7789LCDDisplay
  352. -D MAX_CONTACTS=350
  353. -D MAX_GROUP_CHANNELS=40
  354. -D BLE_PIN_CODE=123456 ; dynamic, random PIN
  355. -D AUTO_SHUTDOWN_MILLIVOLTS=3400
  356. -D BLE_DEBUG_LOGGING=1
  357. -D OFFLINE_QUEUE_SIZE=256
  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_companion_radio_wifi]
  370. extends = heltec_v4_tft
  371. build_flags =
  372. ${heltec_v4_tft.build_flags}
  373. -I examples/companion_radio/ui-new
  374. -D MAX_CONTACTS=350
  375. -D MAX_GROUP_CHANNELS=40
  376. -D OFFLINE_QUEUE_SIZE=256
  377. -D DISPLAY_CLASS=ST7789LCDDisplay
  378. -D WIFI_DEBUG_LOGGING=1
  379. -D WIFI_SSID='"myssid"'
  380. -D WIFI_PWD='"mypwd"'
  381. ; -D MESH_PACKET_LOGGING=1
  382. ; -D MESH_DEBUG=1
  383. build_src_filter = ${heltec_v4_tft.build_src_filter}
  384. +<helpers/ui/ST7789LCDDisplay.cpp>
  385. +<helpers/ui/MomentaryButton.cpp>
  386. +<helpers/esp32/*.cpp>
  387. +<../examples/companion_radio/*.cpp>
  388. +<../examples/companion_radio/ui-new/*.cpp>
  389. lib_deps =
  390. ${heltec_v4_tft.lib_deps}
  391. densaugeo/base64 @ ~1.4.0
  392. [env:heltec_v4_tft_sensor]
  393. extends = heltec_v4_tft
  394. build_flags =
  395. ${heltec_v4_tft.build_flags}
  396. -D ADVERT_NAME='"Heltec v4 Sensor"'
  397. -D ADVERT_LAT=0.0
  398. -D ADVERT_LON=0.0
  399. -D ADMIN_PASSWORD='"password"'
  400. -D ENV_PIN_SDA=3
  401. -D ENV_PIN_SCL=4
  402. -D DISPLAY_CLASS=ST7789LCDDisplay
  403. ; -D MESH_PACKET_LOGGING=1
  404. ; -D MESH_DEBUG=1
  405. build_src_filter = ${heltec_v4_tft.build_src_filter}
  406. +<helpers/ui/ST7789LCDDisplay.cpp>
  407. +<../examples/simple_sensor>
  408. lib_deps =
  409. ${heltec_v4_tft.lib_deps}
  410. ${esp32_ota.lib_deps}
  411. [env:heltec_v4_kiss_modem]
  412. extends = Heltec_lora32_v4
  413. build_src_filter = ${Heltec_lora32_v4.build_src_filter}
  414. +<../examples/kiss_modem/>