platformio.ini 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  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 ENV_PIN_SDA=4
  56. -D ENV_PIN_SCL=3
  57. build_src_filter= ${Heltec_lora32_v4.build_src_filter}
  58. lib_deps = ${Heltec_lora32_v4.lib_deps}
  59. [heltec_v4_tft]
  60. extends = Heltec_lora32_v4
  61. build_flags =
  62. ${Heltec_lora32_v4.build_flags}
  63. -D HELTEC_LORA_V4_TFT
  64. -D PIN_BOARD_SDA=4
  65. -D PIN_BOARD_SCL=3
  66. -D DISPLAY_SCALE_X=2.5
  67. -D DISPLAY_SCALE_Y=3.75
  68. -D PIN_TFT_RST=18
  69. -D PIN_TFT_VDD_CTL=-1
  70. -D PIN_TFT_LEDA_CTL=21
  71. -D PIN_TFT_LEDA_CTL_ACTIVE=HIGH
  72. -D PIN_TFT_CS=15
  73. -D PIN_TFT_DC=16
  74. -D PIN_TFT_SCL=17
  75. -D PIN_TFT_SDA=33
  76. build_src_filter= ${Heltec_lora32_v4.build_src_filter}
  77. lib_deps =
  78. ${Heltec_lora32_v4.lib_deps}
  79. adafruit/Adafruit ST7735 and ST7789 Library @ ^1.11.0
  80. [env:heltec_v4_repeater]
  81. extends = heltec_v4_oled
  82. build_flags =
  83. ${heltec_v4_oled.build_flags}
  84. -D DISPLAY_CLASS=SSD1306Display
  85. -D ADVERT_NAME='"Heltec Repeater"'
  86. -D ADVERT_LAT=0.0
  87. -D ADVERT_LON=0.0
  88. -D ADMIN_PASSWORD='"password"'
  89. -D MAX_NEIGHBOURS=50
  90. ; -D MESH_PACKET_LOGGING=1
  91. ; -D MESH_DEBUG=1
  92. build_src_filter = ${heltec_v4_oled.build_src_filter}
  93. +<helpers/ui/SSD1306Display.cpp>
  94. +<../examples/simple_repeater>
  95. lib_deps =
  96. ${heltec_v4_oled.lib_deps}
  97. ${esp32_ota.lib_deps}
  98. bakercp/CRC32 @ ^2.0.0
  99. [env:heltec_v4_repeater_bridge_espnow]
  100. extends = heltec_v4_oled
  101. build_flags =
  102. ${heltec_v4_oled.build_flags}
  103. -D DISPLAY_CLASS=SSD1306Display
  104. -D ADVERT_NAME='"ESPNow Bridge"'
  105. -D ADVERT_LAT=0.0
  106. -D ADVERT_LON=0.0
  107. -D ADMIN_PASSWORD='"password"'
  108. -D MAX_NEIGHBOURS=50
  109. -D WITH_ESPNOW_BRIDGE=1
  110. ; -D BRIDGE_DEBUG=1
  111. ; -D MESH_PACKET_LOGGING=1
  112. ; -D MESH_DEBUG=1
  113. build_src_filter = ${heltec_v4_oled.build_src_filter}
  114. +<helpers/bridges/ESPNowBridge.cpp>
  115. +<helpers/ui/SSD1306Display.cpp>
  116. +<../examples/simple_repeater>
  117. lib_deps =
  118. ${heltec_v4_oled.lib_deps}
  119. ${esp32_ota.lib_deps}
  120. [env:heltec_v4_room_server]
  121. extends = heltec_v4_oled
  122. build_flags =
  123. ${heltec_v4_oled.build_flags}
  124. -D DISPLAY_CLASS=SSD1306Display
  125. -D ADVERT_NAME='"Heltec Room"'
  126. -D ADVERT_LAT=0.0
  127. -D ADVERT_LON=0.0
  128. -D ADMIN_PASSWORD='"password"'
  129. -D ROOM_PASSWORD='"hello"'
  130. ; -D MESH_PACKET_LOGGING=1
  131. ; -D MESH_DEBUG=1
  132. build_src_filter = ${heltec_v4_oled.build_src_filter}
  133. +<helpers/ui/SSD1306Display.cpp>
  134. +<../examples/simple_room_server>
  135. lib_deps =
  136. ${heltec_v4_oled.lib_deps}
  137. ${esp32_ota.lib_deps}
  138. [env:heltec_v4_terminal_chat]
  139. extends = heltec_v4_oled
  140. build_flags =
  141. ${heltec_v4_oled.build_flags}
  142. -D MAX_CONTACTS=350
  143. -D MAX_GROUP_CHANNELS=1
  144. ; -D MESH_PACKET_LOGGING=1
  145. ; -D MESH_DEBUG=1
  146. build_src_filter = ${heltec_v4_oled.build_src_filter}
  147. +<../examples/simple_secure_chat/main.cpp>
  148. lib_deps =
  149. ${heltec_v4_oled.lib_deps}
  150. densaugeo/base64 @ ~1.4.0
  151. [env:heltec_v4_companion_radio_usb]
  152. extends = heltec_v4_oled
  153. build_flags =
  154. ${heltec_v4_oled.build_flags}
  155. -I examples/companion_radio/ui-new
  156. -D MAX_CONTACTS=350
  157. -D MAX_GROUP_CHANNELS=40
  158. -D DISPLAY_CLASS=SSD1306Display
  159. ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
  160. ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
  161. build_src_filter = ${heltec_v4_oled.build_src_filter}
  162. +<helpers/ui/SSD1306Display.cpp>
  163. +<helpers/ui/MomentaryButton.cpp>
  164. +<../examples/companion_radio/*.cpp>
  165. +<../examples/companion_radio/ui-new/*.cpp>
  166. lib_deps =
  167. ${heltec_v4_oled.lib_deps}
  168. densaugeo/base64 @ ~1.4.0
  169. [env:heltec_v4_companion_radio_ble]
  170. extends = heltec_v4_oled
  171. build_flags =
  172. ${heltec_v4_oled.build_flags}
  173. -I examples/companion_radio/ui-new
  174. -D MAX_CONTACTS=350
  175. -D MAX_GROUP_CHANNELS=40
  176. -D DISPLAY_CLASS=SSD1306Display
  177. -D BLE_PIN_CODE=123456 ; dynamic, random PIN
  178. -D AUTO_SHUTDOWN_MILLIVOLTS=3400
  179. -D BLE_DEBUG_LOGGING=1
  180. -D OFFLINE_QUEUE_SIZE=256
  181. ; -D MESH_PACKET_LOGGING=1
  182. ; -D MESH_DEBUG=1
  183. build_src_filter = ${heltec_v4_oled.build_src_filter}
  184. +<helpers/ui/SSD1306Display.cpp>
  185. +<helpers/ui/MomentaryButton.cpp>
  186. +<helpers/esp32/*.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_wifi]
  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 WIFI_DEBUG_LOGGING=1
  201. -D WIFI_SSID='"myssid"'
  202. -D WIFI_PWD='"mypwd"'
  203. ; -D MESH_PACKET_LOGGING=1
  204. ; -D MESH_DEBUG=1
  205. build_src_filter = ${heltec_v4_oled.build_src_filter}
  206. +<helpers/ui/SSD1306Display.cpp>
  207. +<helpers/ui/MomentaryButton.cpp>
  208. +<helpers/esp32/*.cpp>
  209. +<../examples/companion_radio/*.cpp>
  210. +<../examples/companion_radio/ui-new/*.cpp>
  211. lib_deps =
  212. ${heltec_v4_oled.lib_deps}
  213. densaugeo/base64 @ ~1.4.0
  214. [env:heltec_v4_sensor]
  215. extends = heltec_v4_oled
  216. build_flags =
  217. ${heltec_v4_oled.build_flags}
  218. -D ADVERT_NAME='"Heltec v4 Sensor"'
  219. -D ADVERT_LAT=0.0
  220. -D ADVERT_LON=0.0
  221. -D ADMIN_PASSWORD='"password"'
  222. -D ENV_PIN_SDA=3
  223. -D ENV_PIN_SCL=4
  224. -D DISPLAY_CLASS=SSD1306Display
  225. ; -D MESH_PACKET_LOGGING=1
  226. ; -D MESH_DEBUG=1
  227. build_src_filter = ${heltec_v4_oled.build_src_filter}
  228. +<helpers/ui/SSD1306Display.cpp>
  229. +<../examples/simple_sensor>
  230. lib_deps =
  231. ${heltec_v4_oled.lib_deps}
  232. ${esp32_ota.lib_deps}
  233. [env:heltec_v4_tft_repeater]
  234. extends = heltec_v4_tft
  235. build_flags =
  236. ${heltec_v4_tft.build_flags}
  237. -D DISPLAY_CLASS=ST7789LCDDisplay
  238. -D ADVERT_NAME='"Heltec Repeater"'
  239. -D ADVERT_LAT=0.0
  240. -D ADVERT_LON=0.0
  241. -D ADMIN_PASSWORD='"password"'
  242. -D MAX_NEIGHBOURS=50
  243. ; -D MESH_PACKET_LOGGING=1
  244. ; -D MESH_DEBUG=1
  245. build_src_filter = ${heltec_v4_tft.build_src_filter}
  246. +<helpers/ui/ST7789LCDDisplay.cpp>
  247. +<../examples/simple_repeater>
  248. lib_deps =
  249. ${heltec_v4_tft.lib_deps}
  250. ${esp32_ota.lib_deps}
  251. bakercp/CRC32 @ ^2.0.0
  252. [env:heltec_v4_tft_repeater_bridge_espnow]
  253. extends = heltec_v4_tft
  254. build_flags =
  255. ${heltec_v4_tft.build_flags}
  256. -D DISPLAY_CLASS=ST7789LCDDisplay
  257. -D ADVERT_NAME='"ESPNow Bridge"'
  258. -D ADVERT_LAT=0.0
  259. -D ADVERT_LON=0.0
  260. -D ADMIN_PASSWORD='"password"'
  261. -D MAX_NEIGHBOURS=50
  262. -D WITH_ESPNOW_BRIDGE=1
  263. ; -D BRIDGE_DEBUG=1
  264. ; -D MESH_PACKET_LOGGING=1
  265. ; -D MESH_DEBUG=1
  266. build_src_filter = ${heltec_v4_tft.build_src_filter}
  267. +<helpers/bridges/ESPNowBridge.cpp>
  268. +<helpers/ui/ST7789LCDDisplay.cpp>
  269. +<../examples/simple_repeater>
  270. lib_deps =
  271. ${heltec_v4_tft.lib_deps}
  272. ${esp32_ota.lib_deps}
  273. [env:heltec_v4_tft_room_server]
  274. extends = heltec_v4_tft
  275. build_flags =
  276. ${heltec_v4_tft.build_flags}
  277. -D DISPLAY_CLASS=ST7789LCDDisplay
  278. -D ADVERT_NAME='"Heltec Room"'
  279. -D ADVERT_LAT=0.0
  280. -D ADVERT_LON=0.0
  281. -D ADMIN_PASSWORD='"password"'
  282. -D ROOM_PASSWORD='"hello"'
  283. ; -D MESH_PACKET_LOGGING=1
  284. ; -D MESH_DEBUG=1
  285. build_src_filter = ${heltec_v4_tft.build_src_filter}
  286. +<helpers/ui/ST7789LCDDisplay.cpp>
  287. +<../examples/simple_room_server>
  288. lib_deps =
  289. ${heltec_v4_tft.lib_deps}
  290. ${esp32_ota.lib_deps}
  291. [env:heltec_v4_tft_terminal_chat]
  292. extends = heltec_v4_tft
  293. build_flags =
  294. ${heltec_v4_tft.build_flags}
  295. -D MAX_CONTACTS=350
  296. -D MAX_GROUP_CHANNELS=1
  297. ; -D MESH_PACKET_LOGGING=1
  298. ; -D MESH_DEBUG=1
  299. build_src_filter = ${heltec_v4_tft.build_src_filter}
  300. +<../examples/simple_secure_chat/main.cpp>
  301. lib_deps =
  302. ${heltec_v4_tft.lib_deps}
  303. densaugeo/base64 @ ~1.4.0
  304. [env:heltec_v4_tft_companion_radio_usb]
  305. extends = heltec_v4_tft
  306. build_flags =
  307. ${heltec_v4_tft.build_flags}
  308. -I examples/companion_radio/ui-new
  309. -D MAX_CONTACTS=350
  310. -D MAX_GROUP_CHANNELS=40
  311. -D DISPLAY_CLASS=ST7789LCDDisplay
  312. ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
  313. ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
  314. build_src_filter = ${heltec_v4_tft.build_src_filter}
  315. +<helpers/ui/ST7789LCDDisplay.cpp>
  316. +<helpers/ui/MomentaryButton.cpp>
  317. +<../examples/companion_radio/*.cpp>
  318. +<../examples/companion_radio/ui-new/*.cpp>
  319. lib_deps =
  320. ${heltec_v4_tft.lib_deps}
  321. densaugeo/base64 @ ~1.4.0
  322. [env:heltec_v4_tft_companion_radio_ble]
  323. extends = heltec_v4_tft
  324. build_flags =
  325. ${heltec_v4_tft.build_flags}
  326. -I examples/companion_radio/ui-new
  327. -D DISPLAY_CLASS=ST7789LCDDisplay
  328. -D MAX_CONTACTS=350
  329. -D MAX_GROUP_CHANNELS=40
  330. -D BLE_PIN_CODE=123456 ; dynamic, random PIN
  331. -D AUTO_SHUTDOWN_MILLIVOLTS=3400
  332. -D BLE_DEBUG_LOGGING=1
  333. -D OFFLINE_QUEUE_SIZE=256
  334. ; -D MESH_PACKET_LOGGING=1
  335. ; -D MESH_DEBUG=1
  336. build_src_filter = ${heltec_v4_tft.build_src_filter}
  337. +<helpers/ui/ST7789LCDDisplay.cpp>
  338. +<helpers/ui/MomentaryButton.cpp>
  339. +<helpers/esp32/*.cpp>
  340. +<../examples/companion_radio/*.cpp>
  341. +<../examples/companion_radio/ui-new/*.cpp>
  342. lib_deps =
  343. ${heltec_v4_tft.lib_deps}
  344. densaugeo/base64 @ ~1.4.0
  345. [env:heltec_v4_tft_companion_radio_wifi]
  346. extends = heltec_v4_tft
  347. build_flags =
  348. ${heltec_v4_tft.build_flags}
  349. -I examples/companion_radio/ui-new
  350. -D MAX_CONTACTS=350
  351. -D MAX_GROUP_CHANNELS=40
  352. -D DISPLAY_CLASS=ST7789LCDDisplay
  353. -D WIFI_DEBUG_LOGGING=1
  354. -D WIFI_SSID='"myssid"'
  355. -D WIFI_PWD='"mypwd"'
  356. ; -D MESH_PACKET_LOGGING=1
  357. ; -D MESH_DEBUG=1
  358. build_src_filter = ${heltec_v4_tft.build_src_filter}
  359. +<helpers/ui/ST7789LCDDisplay.cpp>
  360. +<helpers/ui/MomentaryButton.cpp>
  361. +<helpers/esp32/*.cpp>
  362. +<../examples/companion_radio/*.cpp>
  363. +<../examples/companion_radio/ui-new/*.cpp>
  364. lib_deps =
  365. ${heltec_v4_tft.lib_deps}
  366. densaugeo/base64 @ ~1.4.0
  367. [env:heltec_v4_tft_sensor]
  368. extends = heltec_v4_tft
  369. build_flags =
  370. ${heltec_v4_tft.build_flags}
  371. -D ADVERT_NAME='"Heltec v4 Sensor"'
  372. -D ADVERT_LAT=0.0
  373. -D ADVERT_LON=0.0
  374. -D ADMIN_PASSWORD='"password"'
  375. -D ENV_PIN_SDA=3
  376. -D ENV_PIN_SCL=4
  377. -D DISPLAY_CLASS=ST7789LCDDisplay
  378. ; -D MESH_PACKET_LOGGING=1
  379. ; -D MESH_DEBUG=1
  380. build_src_filter = ${heltec_v4_tft.build_src_filter}
  381. +<helpers/ui/ST7789LCDDisplay.cpp>
  382. +<../examples/simple_sensor>
  383. lib_deps =
  384. ${heltec_v4_tft.lib_deps}
  385. ${esp32_ota.lib_deps}