platformio.ini 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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_room_server]
  47. extends = waveshare_rp2040_lora
  48. build_flags = ${waveshare_rp2040_lora.build_flags}
  49. -D ADVERT_NAME='"RP2040-LoRa Room"'
  50. -D ADVERT_LAT=0.0
  51. -D ADVERT_LON=0.0
  52. -D ADMIN_PASSWORD='"password"'
  53. -D ROOM_PASSWORD='"hello"'
  54. ; -D MESH_PACKET_LOGGING=1
  55. ; -D MESH_DEBUG=1
  56. build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  57. +<../examples/simple_room_server>
  58. [env:waveshare_rp2040_lora_companion_radio_usb]
  59. extends = waveshare_rp2040_lora
  60. build_flags = ${waveshare_rp2040_lora.build_flags}
  61. -D MAX_CONTACTS=100
  62. -D MAX_GROUP_CHANNELS=8
  63. ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
  64. ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
  65. build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  66. +<../examples/companion_radio/*.cpp>
  67. lib_deps = ${waveshare_rp2040_lora.lib_deps}
  68. densaugeo/base64 @ ~1.4.0
  69. ; [env:waveshare_rp2040_lora_companion_radio_ble]
  70. ; extends = waveshare_rp2040_lora
  71. ; build_flags = ${waveshare_rp2040_lora.build_flags}
  72. ; -D MAX_CONTACTS=100
  73. ; -D MAX_GROUP_CHANNELS=8
  74. ; -D BLE_PIN_CODE=123456
  75. ; -D BLE_DEBUG_LOGGING=1
  76. ; ; -D MESH_PACKET_LOGGING=1
  77. ; ; -D MESH_DEBUG=1
  78. ; build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  79. ; +<../examples/companion_radio/*.cpp>
  80. ; lib_deps = ${waveshare_rp2040_lora.lib_deps}
  81. ; densaugeo/base64 @ ~1.4.0
  82. ; [env:waveshare_rp2040_lora_companion_radio_wifi]
  83. ; extends = waveshare_rp2040_lora
  84. ; build_flags = ${waveshare_rp2040_lora.build_flags}
  85. ; -D MAX_CONTACTS=100
  86. ; -D MAX_GROUP_CHANNELS=8
  87. ; -D WIFI_DEBUG_LOGGING=1
  88. ; -D WIFI_SSID='"myssid"'
  89. ; -D WIFI_PWD='"mypwd"'
  90. ; ; -D MESH_PACKET_LOGGING=1
  91. ; ; -D MESH_DEBUG=1
  92. ; build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  93. ; +<../examples/companion_radio/*.cpp>
  94. ; lib_deps = ${waveshare_rp2040_lora.lib_deps}
  95. ; densaugeo/base64 @ ~1.4.0
  96. [env:waveshare_rp2040_lora_terminal_chat]
  97. extends = waveshare_rp2040_lora
  98. build_flags = ${waveshare_rp2040_lora.build_flags}
  99. -D MAX_CONTACTS=100
  100. -D MAX_GROUP_CHANNELS=1
  101. ; -D MESH_PACKET_LOGGING=1
  102. ; -D MESH_DEBUG=1
  103. build_src_filter = ${waveshare_rp2040_lora.build_src_filter}
  104. +<../examples/simple_secure_chat/main.cpp>
  105. lib_deps = ${waveshare_rp2040_lora.lib_deps}
  106. densaugeo/base64 @ ~1.4.0