Skip to content

Commit

Permalink
[jlink] add build option RTT_BUFFER_SIZE to set the RTT buffer size
Browse files Browse the repository at this point in the history
When debugging OT via the RTT, OT output logs are often truncated
because the RTT buffer size is too small. This commit adds the
build option RTT_BUFFER_SIZE to easily change the RTT buffer size.
  • Loading branch information
zhanglongxia committed Nov 20, 2024
1 parent 58d937a commit b78b2aa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions third_party/jlink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ else()
)
endif()

option(RTT_BUFFER_SIZE "sets the RTT up buffer size")
if(RTT_BUFFER_SIZE)
target_compile_options(jlinkrtt PRIVATE
-DSEGGER_RTT_CONFIG_BUFFER_SIZE_UP=${RTT_BUFFER_SIZE}
)
endif()

target_compile_options(jlinkrtt PRIVATE
-DSEGGER_RTT_CONFIG_H=\"${PROJECT_SOURCE_DIR}/third_party/NordicSemiconductor/segger_rtt/SEGGER_RTT_Conf.h\"
-DUSE_APP_CONFIG=1
Expand Down

0 comments on commit b78b2aa

Please sign in to comment.