Kconfig.rtt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Virtual UART RTT driver option
  2. # Copyright (c) 2019 omSquare s.r.o.
  3. # SPDX-License-Identifier: Apache-2.0
  4. menuconfig UART_RTT
  5. bool "Enable UART RTT driver"
  6. depends on USE_SEGGER_RTT
  7. select SEGGER_RTT_CUSTOM_LOCKING
  8. help
  9. This option enables access RTT channel as UART device.
  10. if UART_RTT
  11. # Workaround for not being able to have commas in macro arguments
  12. DT_COMPAT_SEGGER_RTT_UART := segger,rtt-uart
  13. config UART_RTT_0
  14. def_bool $(dt_nodelabel_has_compat,rtt0,$(DT_COMPAT_SEGGER_RTT_UART))
  15. depends on SEGGER_RTT_MAX_NUM_UP_BUFFERS >= 1 && SEGGER_RTT_MAX_NUM_DOWN_BUFFERS >= 1
  16. depends on SEGGER_RTT_MODE_NO_BLOCK_SKIP
  17. select SERIAL_HAS_DRIVER
  18. select UART_RTT_DRIVER
  19. help
  20. Enable UART on (default) RTT channel 0. Default channel has to be configured in non-blocking skip mode.
  21. config UART_RTT_1
  22. def_bool $(dt_nodelabel_has_compat,rtt1,$(DT_COMPAT_SEGGER_RTT_UART))
  23. depends on SEGGER_RTT_MAX_NUM_UP_BUFFERS >= 2 && SEGGER_RTT_MAX_NUM_DOWN_BUFFERS >= 2
  24. select SERIAL_HAS_DRIVER
  25. select UART_RTT_DRIVER
  26. help
  27. Enable UART on RTT channel 1
  28. config UART_RTT_2
  29. def_bool $(dt_nodelabel_has_compat,rtt2,$(DT_COMPAT_SEGGER_RTT_UART))
  30. depends on SEGGER_RTT_MAX_NUM_UP_BUFFERS >= 3 && SEGGER_RTT_MAX_NUM_DOWN_BUFFERS >= 3
  31. select SERIAL_HAS_DRIVER
  32. select UART_RTT_DRIVER
  33. help
  34. Enable UART on RTT channel 2
  35. config UART_RTT_3
  36. def_bool $(dt_nodelabel_has_compat,rtt3,$(DT_COMPAT_SEGGER_RTT_UART))
  37. depends on SEGGER_RTT_MAX_NUM_UP_BUFFERS >= 4 && SEGGER_RTT_MAX_NUM_DOWN_BUFFERS >= 4
  38. select SERIAL_HAS_DRIVER
  39. select UART_RTT_DRIVER
  40. help
  41. Enable UART on RTT channel 3
  42. config UART_RTT_DRIVER
  43. bool
  44. endif