drivers/segger: Support the customize SEGGER_RTT_[BUFFER_]SECTION

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-07-04 20:05:06 +08:00 committed by Alan Carvalho de Assis
parent f3e8decad2
commit 3308f77e7c
2 changed files with 21 additions and 0 deletions

View File

@ -12,6 +12,19 @@ config SEGGER_RTT
if SEGGER_RTT if SEGGER_RTT
config SEGGER_RTT_SECTION
string "Segger RTT Control Block Section"
default ""
---help---
Declare _SEGGER_RTT global variable in the specific data section.
config SEGGER_RTT_BUFFER_SECTION
string "Segger RTT Buffer Block Section"
default SEGGER_RTT_SECTION
---help---
Declare _acUpBuffer/_acDownBuffer global variables in the specific
data section.
config SEGGER_RTT_CPU_CACHE_LINE_SIZE config SEGGER_RTT_CPU_CACHE_LINE_SIZE
int "Segger RTT Cache Line Size" int "Segger RTT Cache Line Size"
default 0 default 0

View File

@ -26,6 +26,14 @@ ifeq ($(CONFIG_SEGGER_RTT),y)
CFLAGS += -Wno-shadow -Wno-array-bounds CFLAGS += -Wno-shadow -Wno-array-bounds
ifneq ($(CONFIG_SEGGER_RTT_SECTION),"")
CFLAGS += ${shell $(DEFINE) "$(CC)" SEGGER_RTT_SECTION=CONFIG_SEGGER_RTT_SECTION}
endif
ifneq ($(CONFIG_SEGGER_RTT_BUFFER_SECTION),"")
CFLAGS += ${shell $(DEFINE) "$(CC)" SEGGER_RTT_BUFFER_SECTION=CONFIG_SEGGER_RTT_BUFFER_SECTION}
endif
CFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)config} CFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)config}
CFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)RTT$(DELIM)RTT} CFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)RTT$(DELIM)RTT}