From 4b93f27d83dff17627f955e5541a94b533bc150a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Thu, 29 Aug 2019 17:41:49 +0200 Subject: [PATCH] cpu: use makefiles/utils uppercase Convert the variables to uppercase using the 'makefiles/utils' function. --- cpu/efm32/Makefile.include | 2 +- cpu/msp430_common/Makefile.include | 3 +-- cpu/nrf5x_common/Makefile.include | 3 +-- cpu/sam0_common/Makefile.include | 2 +- cpu/sam_common/Makefile.include | 2 +- cpu/stm32_common/Makefile.include | 3 +-- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/cpu/efm32/Makefile.include b/cpu/efm32/Makefile.include index c2d33eea57..0a05483293 100644 --- a/cpu/efm32/Makefile.include +++ b/cpu/efm32/Makefile.include @@ -4,7 +4,7 @@ export CPU_ARCH = $(EFM32_ARCHITECTURE) export CPU_FAM = $(EFM32_FAMILY) # the em_device.h header requires a global define with the cpu model -CFLAGS += -D$(shell echo $(CPU_MODEL) | tr 'a-z' 'A-Z') +CFLAGS += -D$(call uppercase_and_underscore,$(CPU_MODEL)) # include Gecko SDK package USEPKG += gecko_sdk diff --git a/cpu/msp430_common/Makefile.include b/cpu/msp430_common/Makefile.include index f71d8b40a2..afcc202c1e 100644 --- a/cpu/msp430_common/Makefile.include +++ b/cpu/msp430_common/Makefile.include @@ -2,8 +2,7 @@ PSEUDOMODULES += msp430_malloc INCLUDES += -I$(RIOTCPU)/msp430_common/include/ -MODEL = $(shell echo $(CPU_MODEL) | tr 'a-z' 'A-Z') -CFLAGS += -DCPU_MODEL_$(MODEL) +CFLAGS += -DCPU_MODEL_$(call uppercase_and_underscore,$(CPU_MODEL)) export UNDEF += $(BINDIR)/msp430_common/startup.o export USEMODULE += msp430_common msp430_common_periph msp430_malloc diff --git a/cpu/nrf5x_common/Makefile.include b/cpu/nrf5x_common/Makefile.include index c29694c333..9dc47f49b0 100644 --- a/cpu/nrf5x_common/Makefile.include +++ b/cpu/nrf5x_common/Makefile.include @@ -1,5 +1,4 @@ -FAM = $(shell echo $(CPU_FAM) | tr 'a-z-' 'A-Z_') -CFLAGS += -DCPU_FAM_$(FAM) +CFLAGS += -DCPU_FAM_$(call uppercase_and_underscore,$(CPU_FAM)) # include nrf5x common periph drivers USEMODULE += nrf5x_common_periph diff --git a/cpu/sam0_common/Makefile.include b/cpu/sam0_common/Makefile.include index 085bccb5f5..19b777fbe7 100644 --- a/cpu/sam0_common/Makefile.include +++ b/cpu/sam0_common/Makefile.include @@ -1,5 +1,5 @@ # Define the CPU family so we can differentiate between them in the code -CFLAGS += -DCPU_FAM_$(shell echo $(CPU_FAM) | tr 'a-z-' 'A-Z_') +CFLAGS += -DCPU_FAM_$(call uppercase_and_underscore,$(CPU_FAM)) # Set ROM and RAM lengths according to CPU model ifneq (,$(filter samd21g18a samd21j18a saml21j18b saml21j18a samr21e18a \ diff --git a/cpu/sam_common/Makefile.include b/cpu/sam_common/Makefile.include index 23a94e2b22..37d07c52e4 100644 --- a/cpu/sam_common/Makefile.include +++ b/cpu/sam_common/Makefile.include @@ -1,5 +1,5 @@ # Define the CPU family so we can differentiate between them in the code -CFLAGS += -DCPU_FAM_$(shell echo $(CPU_FAM) | tr 'a-z-' 'A-Z_') +CFLAGS += -DCPU_FAM_$(call uppercase_and_underscore,$(CPU_FAM)) # this CPU implementation doesn't use CMSIS initialization CFLAGS += -DDONT_USE_CMSIS_INIT diff --git a/cpu/stm32_common/Makefile.include b/cpu/stm32_common/Makefile.include index 2b7f0294f4..264a2f6276 100644 --- a/cpu/stm32_common/Makefile.include +++ b/cpu/stm32_common/Makefile.include @@ -1,5 +1,4 @@ -FAM = $(shell echo $(CPU_FAM) | tr 'a-z-' 'A-Z_') -CFLAGS += -DCPU_FAM_$(FAM) +CFLAGS += -DCPU_FAM_$(call uppercase_and_underscore,$(CPU_FAM)) # All stm32 families provide pm support USEMODULE += pm_layered