platformio.ini 4.0 KB

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