Kconfig.projbuild 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. menu "Example Configuration"
  2. config SNIFFER_GPIO_RANGE_MIN
  3. int
  4. default 0
  5. config SNIFFER_GPIO_RANGE_MAX
  6. int
  7. default 33 if IDF_TARGET_ESP32
  8. default 46 if IDF_TARGET_ESP32S2
  9. default 19 if IDF_TARGET_ESP32C3
  10. default 48 if IDF_TARGET_ESP32S3
  11. config SNIFFER_STORE_HISTORY
  12. bool "Store command history into flash"
  13. default y
  14. help
  15. Linenoise line editing library provides functions to save and load command history.
  16. If this option is enabled, initalizes a FAT filesystem and uses it to store command history.
  17. choice SNIFFER_PCAP_DESTINATION
  18. prompt "Select destination to store pcap file"
  19. default SNIFFER_PCAP_DESTINATION_SD
  20. help
  21. Select where to store the pcap file.
  22. Currently support storing files to SD card or to host via JTAG interface with 'Trace memory' enabled.
  23. config SNIFFER_PCAP_DESTINATION_SD
  24. bool "SD Card"
  25. help
  26. Store pcap file to SD card.
  27. config SNIFFER_PCAP_DESTINATION_JTAG
  28. bool "JTAG (App Trace)"
  29. depends on APPTRACE_DEST_TRAX
  30. help
  31. Store pcap file to host via JTAG interface.
  32. config SNIFFER_PCAP_DESTINATION_MEMORY
  33. bool "Memory"
  34. help
  35. Store pcap file to memory.
  36. endchoice
  37. if SNIFFER_PCAP_DESTINATION_SD
  38. choice SNIFFER_SD_MODE
  39. prompt "Select SD card work mode"
  40. default SNIFFER_SD_SDMMC_MODE
  41. help
  42. Select whitch peripheral SD card should use.
  43. config SNIFFER_SD_SDMMC_MODE
  44. bool "SDMMC"
  45. depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
  46. help
  47. Use SDMMC mode (Not support on esp32c3).
  48. config SNIFFER_SD_SPI_MODE
  49. bool "SPI"
  50. help
  51. Use SPI mode.
  52. endchoice
  53. config SNIFFER_MOUNT_POINT
  54. string "SD card mount point in the filesystem"
  55. default "/sdcard"
  56. help
  57. Specify the mount point in the VFS (Virtual File System) for SD card.
  58. config SNIFFER_PCAP_FILE_NAME_MAX_LEN
  59. int "Max name length of pcap file"
  60. default 32
  61. help
  62. Specify maximum name length of pcap file.
  63. endif
  64. if SNIFFER_PCAP_DESTINATION_MEMORY
  65. config SNIFFER_PCAP_MEMORY_SIZE
  66. int "Memory size of the '.pcap' file in memory"
  67. default 4096
  68. help
  69. Max memory size to storage packet in memory.
  70. endif
  71. config SNIFFER_WORK_QUEUE_LEN
  72. int "Length of sniffer work queue"
  73. default 128
  74. help
  75. The sniffer callback function should not do heavy work, so we put all heavy IO operation to another task.
  76. The task gets some basic info of sniffer packet via queue.
  77. Here you should specify the length of queue.
  78. config SNIFFER_TASK_STACK_SIZE
  79. int "Stack size of sniffer task"
  80. default 4096
  81. help
  82. Stack size of sniffer task.
  83. config SNIFFER_TASK_PRIORITY
  84. int "Priority of sniffer task"
  85. default 2
  86. help
  87. Priority of sniffer task.
  88. config SNIFFER_USE_SPI_ETHERNET
  89. bool
  90. choice SNIFFER_ETHERNET_TYPE
  91. prompt "Ethernet Type"
  92. default SNIFFER_NO_ETHERNET
  93. help
  94. Select which kind of Ethernet will be used in the example.
  95. config SNIFFER_NO_ETHERNET
  96. bool "No Ethernet"
  97. help
  98. No Ethernet.
  99. config SNIFFER_USE_INTERNAL_ETHERNET
  100. depends on IDF_TARGET_ESP32
  101. select ETH_USE_ESP32_EMAC
  102. bool "Internal EMAC"
  103. help
  104. Select internal Ethernet MAC controller.
  105. config SNIFFER_USE_DM9051
  106. bool "DM9051 Module"
  107. select SNIFFER_USE_SPI_ETHERNET
  108. select ETH_USE_SPI_ETHERNET
  109. select ETH_SPI_ETHERNET_DM9051
  110. help
  111. Select external SPI-Ethernet module (DM9051).
  112. config SNIFFER_USE_W5500
  113. bool "W5500 Module"
  114. select SNIFFER_USE_SPI_ETHERNET
  115. select ETH_USE_SPI_ETHERNET
  116. select ETH_SPI_ETHERNET_W5500
  117. help
  118. Select external SPI-Ethernet module (W5500).
  119. config SNIFFER_USE_KSZ8851SNL
  120. bool "KSZ8851SNL Module"
  121. select SNIFFER_USE_SPI_ETHERNET
  122. select ETH_USE_SPI_ETHERNET
  123. select ETH_SPI_ETHERNET_KSZ8851SNL
  124. help
  125. Select external SPI-Ethernet module (KSZ8851SNL).
  126. endchoice # SNIFFER_ETHERNET_TYPE
  127. if SNIFFER_USE_INTERNAL_ETHERNET
  128. choice SNIFFER_ETH_PHY_MODEL
  129. prompt "Ethernet PHY Device"
  130. default SNIFFER_ETH_PHY_IP101
  131. help
  132. Select the Ethernet PHY device to use in the example.
  133. config SNIFFER_ETH_PHY_IP101
  134. bool "IP101"
  135. help
  136. IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
  137. Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
  138. config SNIFFER_ETH_PHY_RTL8201
  139. bool "RTL8201/SR8201"
  140. help
  141. RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
  142. Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
  143. config SNIFFER_ETH_PHY_LAN87XX
  144. bool "LAN87xx"
  145. help
  146. Below chips are supported:
  147. LAN8710A is a small footprint MII/RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  148. flexPWR® Technology.
  149. LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
  150. LAN8740A/LAN8741A is a small footprint MII/RMII 10/100 Energy Efficient Ethernet Transceiver
  151. with HP Auto-MDIX and flexPWR® Technology.
  152. LAN8742A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  153. flexPWR® Technology.
  154. Goto https://www.microchip.com for more information about them.
  155. config SNIFFER_ETH_PHY_DP83848
  156. bool "DP83848"
  157. help
  158. DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
  159. Goto http://www.ti.com/product/DP83848J for more information about it.
  160. config SNIFFER_ETH_PHY_KSZ8041
  161. bool "KSZ8041"
  162. help
  163. The KSZ8041 is a single supply 10Base-T/100Base-TX Physical Layer Transceiver.
  164. Goto https://www.microchip.com/wwwproducts/en/KSZ8041 for more information about it.
  165. config SNIFFER_ETH_PHY_KSZ8081
  166. bool "KSZ8081"
  167. help
  168. The KSZ8081 is a single supply 10Base-T/100Base-TX Physical Layer Transceiver.
  169. Goto https://www.microchip.com/wwwproducts/en/KSZ8081 for more information about it.
  170. endchoice # SNIFFER_ETH_PHY_MODEL
  171. config SNIFFER_ETH_MDC_GPIO
  172. int "SMI MDC GPIO number"
  173. range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
  174. default 23
  175. help
  176. Set the GPIO number used by SMI MDC.
  177. config SNIFFER_ETH_MDIO_GPIO
  178. int "SMI MDIO GPIO number"
  179. range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
  180. default 18
  181. help
  182. Set the GPIO number used by SMI MDIO.
  183. endif # SNIFFER_USE_INTERNAL_ETHERNET
  184. if SNIFFER_USE_SPI_ETHERNET
  185. config SNIFFER_ETH_SPI_HOST
  186. int "SPI Host Number"
  187. range 0 2
  188. default 1
  189. help
  190. Set the SPI host used to communicate with the SPI Ethernet Controller.
  191. config SNIFFER_ETH_SPI_SCLK_GPIO
  192. int "SPI SCLK GPIO number"
  193. range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
  194. default 14 if IDF_TARGET_ESP32
  195. default 12 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  196. default 6 if IDF_TARGET_ESP32C3
  197. help
  198. Set the GPIO number used by SPI SCLK.
  199. config SNIFFER_ETH_SPI_MOSI_GPIO
  200. int "SPI MOSI GPIO number"
  201. range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
  202. default 13 if IDF_TARGET_ESP32
  203. default 11 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  204. default 7 if IDF_TARGET_ESP32C3
  205. help
  206. Set the GPIO number used by SPI MOSI.
  207. config SNIFFER_ETH_SPI_MISO_GPIO
  208. int "SPI MISO GPIO number"
  209. range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
  210. default 12 if IDF_TARGET_ESP32
  211. default 13 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  212. default 2 if IDF_TARGET_ESP32C3
  213. help
  214. Set the GPIO number used by SPI MISO.
  215. config SNIFFER_ETH_SPI_CS_GPIO
  216. int "SPI CS GPIO number"
  217. range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
  218. default 15 if IDF_TARGET_ESP32
  219. default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
  220. help
  221. Set the GPIO number used by SPI CS.
  222. config SNIFFER_ETH_SPI_CLOCK_MHZ
  223. int "SPI clock speed (MHz)"
  224. range 5 80
  225. default 12 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C3
  226. default 36 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  227. help
  228. Set the clock speed (MHz) of SPI interface.
  229. config SNIFFER_ETH_SPI_INT_GPIO
  230. int "Interrupt GPIO number"
  231. range SNIFFER_GPIO_RANGE_MIN SNIFFER_GPIO_RANGE_MAX
  232. default 4 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
  233. help
  234. Set the GPIO number used by the SPI Ethernet module interrupt line.
  235. endif # SNIFFER_USE_SPI_ETHERNET
  236. if !SNIFFER_NO_ETHERNET
  237. config SNIFFER_ETH_PHY_RST_GPIO
  238. int "PHY Reset GPIO number"
  239. range -1 SNIFFER_GPIO_RANGE_MAX
  240. default 5
  241. help
  242. Set the GPIO number used to reset PHY chip.
  243. Set to -1 to disable PHY chip hardware reset.
  244. config SNIFFER_ETH_PHY_ADDR
  245. int "PHY Address"
  246. range 0 31
  247. default 1
  248. help
  249. Set PHY address according your board schematic.
  250. endif # !SNIFFER_NO_ETHERNET
  251. endmenu