1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #16083 from benpicco/cosy

make: add cosy as a build target
This commit is contained in:
Kaspar Schleiser 2021-02-24 13:59:11 +01:00 committed by GitHub
commit 367a8e8574
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 1 deletions

View File

@ -513,7 +513,7 @@ include $(RIOTMAKE)/modules.inc.mk
.PHONY: all link clean flash flash-only termdeps term doc debug debug-server reset objdump help info-modules
.PHONY: print-size elffile binfile hexfile flashfile
.PHONY: print-size elffile binfile hexfile flashfile cosy
.PHONY: ..in-docker-container
# Targets that depend on FORCE will always be rebuilt. Contrary to a .PHONY
@ -539,6 +539,7 @@ endif
ELFFILE ?= $(BINDIR)/$(APPLICATION).elf
HEXFILE ?= $(ELFFILE:.elf=.hex)
BINFILE ?= $(ELFFILE:.elf=.bin)
MAPFILE ?= $(ELFFILE:.elf=.map)
ifneq (,$(filter suit, $(USEMODULE)))
include $(RIOTMAKE)/suit.base.inc.mk
@ -716,6 +717,11 @@ flash-only: $(FLASHDEPS)
preflash: $(BUILD_BEFORE_FLASH)
$(PREFLASHER_PREFIX)$(PREFLASHER) $(PREFFLAGS)
# graphical memory usage analyzer
COSY_TOOL ?= $(PKGDIRBASE)/cosy/cosy.py
cosy: $(ELFFILE) $(COSY_TOOL)
$(COSY_TOOL) --riot-base $(RIOTBASE) $(APPDIR) $(BOARD) $(ELFFILE) $(MAPFILE)
ifneq (,$(TERMLOG)$(TERMTEE))
TERMTEE ?= | tee -a $(TERMLOG)
endif

9
dist/tools/cosy/Makefile vendored Normal file
View File

@ -0,0 +1,9 @@
PKG_NAME=cosy
PKG_URL=https://github.com/haukepetersen/cosy.git
PKG_VERSION=b6098f2cfc2fc9d96850a28776c82c5b785fff7a
PKG_LICENSE=GPL-3
include $(RIOTBASE)/pkg/pkg.mk
all:
:

View File

@ -22,6 +22,11 @@ $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py: $(RIOTTOOLS)/cc2538-bsl/Makefile
@CC= CFLAGS= $(MAKE) -C $(RIOTTOOLS)/cc2538-bsl
@echo "[INFO] cc2538-bsl.py successfully fetched!"
$(PKGDIRBASE)/cosy/cosy.py: $(RIOTTOOLS)/cosy/Makefile
@echo "[INFO] cosy.py not found - fetching it from GitHub now"
@CC= CFLAGS= $(MAKE) -C $(RIOTTOOLS)/cosy
@echo "[INFO] cosy.py successfully fetched!"
$(RIOTTOOLS)/edbg/edbg: $(RIOTTOOLS)/edbg/Makefile
@echo "[INFO] edbg binary not found - building it from source now"
CC= CFLAGS= $(MAKE) -C $(RIOTTOOLS)/edbg