Commit 4a6e478d authored by Jordan Yates's avatar Jordan Yates Committed by Benjamin Cabé
Browse files

modules: segger: RTT control block alignment

Make the alignment of the RTT control block configurable, defaulting to
16 bytes. The default is chosen as PyOCD fails to discover the control
block if the 16 byte ID array falls across a 32 byte boundary.

Signed-off-by: default avatarJordan Yates <jordan@embeint.com>
parent ce4bab56
Loading
Loading
Loading
Loading
+1 −0
Changes for modules/segger/CMakeLists.txt: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
if(CONFIG_USE_SEGGER_RTT)
  zephyr_library()
  zephyr_library_compile_definitions(SEGGER_RTT_ALIGNMENT=CONFIG_SEGGER_RTT_CB_ALIGNMENT)
  set(SEGGER_DIR ${ZEPHYR_CURRENT_MODULE_DIR})
  zephyr_include_directories_ifdef(CONFIG_USE_SEGGER_RTT
    ${SEGGER_DIR}/SEGGER
+8 −0
Changes for modules/segger/Kconfig: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -25,6 +25,14 @@ config SEGGER_RTT_CUSTOM_LOCKING
	help
	  Enable custom locking using Zephyr APIs.

config SEGGER_RTT_CB_ALIGNMENT
	int "Alignment of the RTT control block"
	default 16
	help
	  Specify the alignment of the RTT control block in memory. The default
	  alignment of 16 bytes is chosen because PyOCD fails to discover blocks
	  where the 16 byte `acID` field falls across a 32 byte boundary.

config SEGGER_RTT_MAX_NUM_UP_BUFFERS
	int "Maximum number of up-buffers"
	default 3