platformio.ini 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. ; Waveshare RP2040-LoRa-HF/LF
  2. ; https://files.waveshare.com/wiki/RP2040-LoRa/Rp2040-lora-sch.pdf
  3. [waveshare_rp2040_lora]
  4. extends = rp2040_base
  5. board = pico
  6. board_build.filesystem_size = 0.5m
  7. build_flags = ${rp2040_base.build_flags}
  8. -I variants/waveshare_rp2040_lora
  9. -D SX126X_CURRENT_LIMIT=140
  10. -D USE_SX1262
  11. -D RADIO_CLASS=CustomSX1262
  12. -D WRAPPER_CLASS=CustomSX1262Wrapper
  13. -D P_LORA_DIO_1=16
  14. -D P_LORA_NSS=13 ; CS
  15. -D P_LORA_RESET=23
  16. -D P_LORA_BUSY=18
  17. -D P_LORA_SCLK=14
  18. -D P_LORA_MISO=24
  19. -D P_LORA_MOSI=15
  20. -D P_LORA_TX_LED=25
  21. -D SX126X_DIO2_AS_RF_SWITCH=true
  22. -D SX126X_RXEN=17
  23. -D SX126X_DIO3_TCXO_VOLTAGE=1.8
  24. -D SX126X_RX_BOOSTED_GAIN=1
  25. -D LORA_TX_POWER=22
  26. ; Debug options
  27. ; -D DEBUG_RP2040_WIRE=1
  28. ; -D DEBUG_RP2040_SPI=1
  29. ; -D DEBUG_RP2040_CORE=1
  30. ; -D RADIOLIB_DEBUG_SPI=1
  31. ; -D DEBUG_RP2040_PORT=Serial
  32. build_src_filter = ${rp2040_base.build_src_filter}
  33. +<WaveshareBoard.cpp>
  34. +<../variants/waveshare_rp2040_lora>
  35. lib_deps = ${rp2040_base.lib_deps}
  36. [env:waveshare_rp2040_lora_repeater]
  37. extends = waveshare_rp2040_lora
  38. build_flags = ${waveshare_rp2040_lora.build_flags}
  39. -D ADVERT_NAME='"RP2040-LoRa Repeater"'
  40. -D ADVERT_LAT=0.0
  41. -D ADVERT_LON=0.0
  42. -D ADMIN_PASSWORD='"password"'
  43. -D MAX_NEIGHBOURS=50
  44. ; -D MESH_PACKET_LOGGING=1
  45. ; -D MESH_DEBUG=1
  46. build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  47. +<../examples/simple_repeater>
  48. [env:waveshare_rp2040_lora_repeater_bridge_rs232]
  49. extends = waveshare_rp2040_lora
  50. build_flags = ${waveshare_rp2040_lora.build_flags}
  51. -D ADVERT_NAME='"RS232 Bridge"'
  52. -D ADVERT_LAT=0.0
  53. -D ADVERT_LON=0.0
  54. -D ADMIN_PASSWORD='"password"'
  55. -D MAX_NEIGHBOURS=50
  56. -D WITH_RS232_BRIDGE=Serial2
  57. -D WITH_RS232_BRIDGE_RX=9
  58. -D WITH_RS232_BRIDGE_TX=8
  59. ; -D BRIDGE_DEBUG=1
  60. ; -D MESH_PACKET_LOGGING=1
  61. ; -D MESH_DEBUG=1
  62. build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  63. +<helpers/bridges/RS232Bridge.cpp>
  64. +<../examples/simple_repeater>
  65. [env:waveshare_rp2040_lora_room_server]
  66. extends = waveshare_rp2040_lora
  67. build_flags = ${waveshare_rp2040_lora.build_flags}
  68. -D ADVERT_NAME='"RP2040-LoRa Room"'
  69. -D ADVERT_LAT=0.0
  70. -D ADVERT_LON=0.0
  71. -D ADMIN_PASSWORD='"password"'
  72. -D ROOM_PASSWORD='"hello"'
  73. ; -D MESH_PACKET_LOGGING=1
  74. ; -D MESH_DEBUG=1
  75. build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  76. +<../examples/simple_room_server>
  77. [env:waveshare_rp2040_lora_companion_radio_usb]
  78. extends = waveshare_rp2040_lora
  79. build_flags = ${waveshare_rp2040_lora.build_flags}
  80. -D MAX_CONTACTS=100
  81. -D MAX_GROUP_CHANNELS=8
  82. ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
  83. ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
  84. build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  85. +<../examples/companion_radio/*.cpp>
  86. lib_deps = ${waveshare_rp2040_lora.lib_deps}
  87. densaugeo/base64 @ ~1.4.0
  88. lib_ignore = BLE
  89. ; [env:waveshare_rp2040_lora_companion_radio_ble]
  90. ; extends = waveshare_rp2040_lora
  91. ; build_flags = ${waveshare_rp2040_lora.build_flags}
  92. ; -D MAX_CONTACTS=100
  93. ; -D MAX_GROUP_CHANNELS=8
  94. ; -D BLE_PIN_CODE=123456
  95. ; -D BLE_DEBUG_LOGGING=1
  96. ; ; -D MESH_PACKET_LOGGING=1
  97. ; ; -D MESH_DEBUG=1
  98. ; build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  99. ; +<../examples/companion_radio/*.cpp>
  100. ; lib_deps = ${waveshare_rp2040_lora.lib_deps}
  101. ; densaugeo/base64 @ ~1.4.0
  102. ; [env:waveshare_rp2040_lora_companion_radio_wifi]
  103. ; extends = waveshare_rp2040_lora
  104. ; build_flags = ${waveshare_rp2040_lora.build_flags}
  105. ; -D MAX_CONTACTS=100
  106. ; -D MAX_GROUP_CHANNELS=8
  107. ; -D WIFI_DEBUG_LOGGING=1
  108. ; -D WIFI_SSID='"myssid"'
  109. ; -D WIFI_PWD='"mypwd"'
  110. ; ; -D MESH_PACKET_LOGGING=1
  111. ; ; -D MESH_DEBUG=1
  112. ; build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  113. ; +<../examples/companion_radio/*.cpp>
  114. ; lib_deps = ${waveshare_rp2040_lora.lib_deps}
  115. ; densaugeo/base64 @ ~1.4.0
  116. [env:waveshare_rp2040_lora_terminal_chat]
  117. extends = waveshare_rp2040_lora
  118. build_flags = ${waveshare_rp2040_lora.build_flags}
  119. -D MAX_CONTACTS=100
  120. -D MAX_GROUP_CHANNELS=1
  121. ; -D MESH_PACKET_LOGGING=1
  122. ; -D MESH_DEBUG=1
  123. build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  124. +<../examples/simple_secure_chat/main.cpp>
  125. lib_deps = ${waveshare_rp2040_lora.lib_deps}
  126. densaugeo/base64 @ ~1.4.0
  127. [env:waveshare_rp2040_lora_kiss_modem]
  128. extends = waveshare_rp2040_lora
  129. build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  130. +<../examples/kiss_modem/>