Skip to content

Commit 4a6e478

Browse files
JordanYateskartben
authored andcommitted
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: Jordan Yates <[email protected]>
1 parent ce4bab5 commit 4a6e478

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

modules/segger/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
if(CONFIG_USE_SEGGER_RTT)
22
zephyr_library()
3+
zephyr_library_compile_definitions(SEGGER_RTT_ALIGNMENT=CONFIG_SEGGER_RTT_CB_ALIGNMENT)
34
set(SEGGER_DIR ${ZEPHYR_CURRENT_MODULE_DIR})
45
zephyr_include_directories_ifdef(CONFIG_USE_SEGGER_RTT
56
${SEGGER_DIR}/SEGGER

modules/segger/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ config SEGGER_RTT_CUSTOM_LOCKING
2525
help
2626
Enable custom locking using Zephyr APIs.
2727

28+
config SEGGER_RTT_CB_ALIGNMENT
29+
int "Alignment of the RTT control block"
30+
default 16
31+
help
32+
Specify the alignment of the RTT control block in memory. The default
33+
alignment of 16 bytes is chosen because PyOCD fails to discover blocks
34+
where the 16 byte `acID` field falls across a 32 byte boundary.
35+
2836
config SEGGER_RTT_MAX_NUM_UP_BUFFERS
2937
int "Maximum number of up-buffers"
3038
default 3

0 commit comments

Comments
 (0)