drivers/segger: download the RTT/SystemView from github

RTT:
https://github.com/SEGGERMicro/RTT/archive/refs/tags/V7.54.zip

SystemView:
https://github.com/SEGGERMicro/SystemView/archive/refs/tags/V3.30.zip

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2022-01-26 22:34:47 +08:00 committed by Xiang Xiao
parent 3fc18d50b8
commit 11f04e516a
4 changed files with 36 additions and 3 deletions

View File

@ -103,7 +103,7 @@ OBJS = $(AOBJS) $(COBJS)
BIN = libdrivers$(LIBEXT) BIN = libdrivers$(LIBEXT)
all: $(BIN) all: $(BIN)
.PHONY: depend clean distclean .PHONY: context depend clean distclean
$(AOBJS): %$(OBJEXT): %.S $(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@) $(call ASSEMBLE, $<, $@)
@ -114,6 +114,8 @@ $(COBJS): %$(OBJEXT): %.c
$(BIN): $(OBJS) $(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS)) $(call ARCHIVE, $@, $(OBJS))
context::
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^) $(call CATFILE, Make.dep, $^)
$(call DELFILE, $^) $(call DELFILE, $^)
@ -128,7 +130,7 @@ clean:
$(call DELFILE, $(BIN)) $(call DELFILE, $(BIN))
$(call CLEAN) $(call CLEAN)
distclean: clean distclean:: clean
$(call DELFILE, Make.dep) $(call DELFILE, Make.dep)
$(call DELFILE, .depend) $(call DELFILE, .depend)

View File

@ -1,2 +1,3 @@
/RTT /RTT
/SystemView /SystemView
/*.zip

View File

@ -18,6 +18,9 @@
# #
############################################################################ ############################################################################
TARGET_ZIP =
SGDIR = segger
ifeq ($(CONFIG_SEGGER_RTT),y) ifeq ($(CONFIG_SEGGER_RTT),y)
CSRCS += segger/RTT/RTT/SEGGER_RTT.c CSRCS += segger/RTT/RTT/SEGGER_RTT.c
@ -29,6 +32,16 @@ ifeq ($(CONFIG_SEGGER_RTT),y)
ifeq ($(CONFIG_ARCH_ARMV7M),y) ifeq ($(CONFIG_ARCH_ARMV7M),y)
ASRCS += segger/RTT/RTT/SEGGER_RTT_ASM_ARMv7M.S ASRCS += segger/RTT/RTT/SEGGER_RTT_ASM_ARMv7M.S
endif endif
RTT_VERSION ?= 7.54
$(SGDIR)/RTT.zip:
$(Q) curl -L https://github.com/SEGGERMicro/RTT/archive/refs/tags/V$(RTT_VERSION).zip -o $(SGDIR)/RTT.zip
$(Q) unzip -o $(SGDIR)/RTT.zip -d $(SGDIR)
$(Q) mv $(SGDIR)/RTT-$(RTT_VERSION) $(SGDIR)/RTT
TARGET_ZIP += $(SGDIR)/RTT.zip
endif endif
ifeq ($(CONFIG_SEGGER_SYSVIEW),y) ifeq ($(CONFIG_SEGGER_SYSVIEW),y)
@ -38,4 +51,21 @@ ifeq ($(CONFIG_SEGGER_SYSVIEW),y)
CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched} CFLAGS += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched}
CFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)SystemView$(DELIM)SEGGER} CFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)SystemView$(DELIM)SEGGER}
CFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)SystemView$(DELIM)SYSVIEW} CFLAGS += ${shell $(INCDIR) "$(CC)" segger$(DELIM)SystemView$(DELIM)SYSVIEW}
SYSVIEW_VERSION ?= 3.30
$(SGDIR)/SystemView.zip:
$(Q) curl -L https://github.com/SEGGERMicro/SystemView/archive/refs/tags/V$(SYSVIEW_VERSION).zip -o $(SGDIR)/SystemView.zip
$(Q) unzip -o $(SGDIR)/SystemView.zip -d $(SGDIR)
$(Q) mv $(SGDIR)/SystemView-$(SYSVIEW_VERSION) $(SGDIR)/SystemView
TARGET_ZIP += $(SGDIR)/SystemView.zip
endif endif
context:: $(TARGET_ZIP)
distclean::
$(call DELDIR, $(SGDIR)/SystemView)
$(call DELDIR, $(SGDIR)/RTT)
$(call DELFILE, $(TARGET_ZIP))

View File

@ -61,7 +61,7 @@ ifeq ($(EXTERNALDIR),external)
KERNDEPDIRS += external KERNDEPDIRS += external
endif endif
CONTEXTDIRS = boards fs $(APPDIR) $(ARCH_SRC) CONTEXTDIRS = boards drivers fs $(APPDIR) $(ARCH_SRC)
CLEANDIRS += pass1 CLEANDIRS += pass1
ifeq ($(CONFIG_BUILD_FLAT),y) ifeq ($(CONFIG_BUILD_FLAT),y)