From c86bf5074d8c9fb805cabf2089c2143a36b5516d Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:26:05 +0200 Subject: [PATCH 01/13] cpu/msp430_common: Add Kconfig symbols Also specify CPU_ARCH and CPU_CORE in Makefile.features. --- cpu/msp430_common/Kconfig | 28 ++++++++++++++++++++++++++++ cpu/msp430_common/Makefile.features | 3 +++ 2 files changed, 31 insertions(+) diff --git a/cpu/msp430_common/Kconfig b/cpu/msp430_common/Kconfig index 146b1f7c29..fc60926cd4 100644 --- a/cpu/msp430_common/Kconfig +++ b/cpu/msp430_common/Kconfig @@ -1,9 +1,37 @@ # Copyright (c) 2020 Freie Universitaet Berlin +# 2020 HAW Hamburg # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. # + +config CPU_ARCH_MSP430 + bool + select HAS_ARCH_16BIT + select HAS_ARCH_MSP430 + select HAS_PERIPH_FLASHPAGE + select HAS_PERIPH_FLASHPAGE_RAW + select HAS_PERIPH_PM + +config CPU_CORE_MSP430 + bool + select CPU_ARCH_MSP430 + +## Common CPU symbols +config CPU_ARCH + default "msp430" if CPU_ARCH_MSP430 + +config CPU_CORE + default "msp430" if CPU_CORE_MSP430 + +## Definition of specific features +config HAS_ARCH_MSP430 + bool + help + Indicates that the current architecture is MSP430. + +## Specific default configuration values config GNRC_PKTBUF_SIZE default 2560 depends on KCONFIG_MODULE_GNRC_PKTBUF_STATIC diff --git a/cpu/msp430_common/Makefile.features b/cpu/msp430_common/Makefile.features index 1008370797..0b543b37f1 100644 --- a/cpu/msp430_common/Makefile.features +++ b/cpu/msp430_common/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = msp430 +CPU_CORE = msp430 + FEATURES_PROVIDED += arch_16bit FEATURES_PROVIDED += arch_msp430 FEATURES_PROVIDED += periph_flashpage From a73c03ed0cbfac490e068fd4d1ce62d8dfc7f0eb Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:27:02 +0200 Subject: [PATCH 02/13] cpu/cc430: Add Kconfig symbols Also specify CPU_FAM in Makefile.features --- cpu/cc430/Kconfig | 34 ++++++++++++++++++++++++++++++++++ cpu/cc430/Makefile.features | 4 +++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/cpu/cc430/Kconfig b/cpu/cc430/Kconfig index 35a0e06706..03b202a70c 100644 --- a/cpu/cc430/Kconfig +++ b/cpu/cc430/Kconfig @@ -1 +1,35 @@ +# Copyright (c) 2020 Freie Universität Berlin +# 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# + +config CPU_FAM_CC430 + bool + select CPU_CORE_MSP430 + select HAS_CPU_CC430 + +## CPU Models +config CPU_MODEL_CC430F6137 + bool + select CPU_FAM_CC430 + +## Definition of specific features +config HAS_CPU_CC430 + bool + help + Indicates that a 'cc430' cpu is being used. + +## Common CPU symbols +config CPU_FAM + default "cc430" if CPU_FAM_CC430 + +config CPU_MODEL + default "cc430f6137" if CPU_MODEL_CC430F6137 + +config CPU + default "cc430" if CPU_FAM_CC430 + source "$(RIOTCPU)/msp430_common/Kconfig" diff --git a/cpu/cc430/Makefile.features b/cpu/cc430/Makefile.features index fb1e9f3df3..07ce63ec76 100644 --- a/cpu/cc430/Makefile.features +++ b/cpu/cc430/Makefile.features @@ -1 +1,3 @@ --include $(RIOTCPU)/msp430_common/Makefile.features +CPU_FAM = cc430 + +include $(RIOTCPU)/msp430_common/Makefile.features From 4abc4e7de7c3f24d672cad904d367b55678f0879 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:28:19 +0200 Subject: [PATCH 03/13] cpu/msp430fxyz: Add Kconfig symbols Also specify CPU_FAM in Makefile.features --- cpu/msp430fxyz/Kconfig | 44 ++++++++++++++++++++++++++++++++ cpu/msp430fxyz/Makefile.features | 4 ++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/cpu/msp430fxyz/Kconfig b/cpu/msp430fxyz/Kconfig index 35a0e06706..21d67ce324 100644 --- a/cpu/msp430fxyz/Kconfig +++ b/cpu/msp430fxyz/Kconfig @@ -1 +1,45 @@ +# Copyright (c) 2020 Freie Universität Berlin +# 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# + +config CPU_FAM_MSP430F + bool + select CPU_CORE_MSP430 + select HAS_CPU_MSP430FXYZ + +## CPU Models +config CPU_MODEL_MSP430F1611 + bool + select CPU_FAM_MSP430F + +config CPU_MODEL_MSP430F1612 + bool + select CPU_FAM_MSP430F + +config CPU_MODEL_MSP430F2617 + bool + select CPU_FAM_MSP430F + +## Definition of specific features +config HAS_CPU_MSP430FXYZ + bool + help + Indicates that an 'msp430fxyz' cpu is being used. + +## Common CPU symbols +config CPU_FAM + default "msp430f" if CPU_FAM_MSP430F + +config CPU_MODEL + default "msp430f1611" if CPU_MODEL_MSP430F1611 + default "msp430f1612" if CPU_MODEL_MSP430F1612 + default "msp430f2617" if CPU_MODEL_MSP430F2617 + +config CPU + default "msp430fxyz" if CPU_FAM_MSP430F + source "$(RIOTCPU)/msp430_common/Kconfig" diff --git a/cpu/msp430fxyz/Makefile.features b/cpu/msp430fxyz/Makefile.features index fb1e9f3df3..c9fbba866f 100644 --- a/cpu/msp430fxyz/Makefile.features +++ b/cpu/msp430fxyz/Makefile.features @@ -1 +1,3 @@ --include $(RIOTCPU)/msp430_common/Makefile.features +CPU_FAM = msp430f + +include $(RIOTCPU)/msp430_common/Makefile.features From 69a5a56ce017fc8b45ec75ebb1f64334b865b1d4 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:29:57 +0200 Subject: [PATCH 04/13] boards/common/msb-430: Add Kconfig symbols --- boards/common/msb-430/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 boards/common/msb-430/Kconfig diff --git a/boards/common/msb-430/Kconfig b/boards/common/msb-430/Kconfig new file mode 100644 index 0000000000..cf87d207a8 --- /dev/null +++ b/boards/common/msb-430/Kconfig @@ -0,0 +1,11 @@ +# Copyright (c) 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# + +config BOARD_COMMON_MSB_430 + bool + default y + select CPU_MODEL_MSP430F1612 From 946ce73ae6462bf7eb1953b7248a2f61f2b59895 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:30:37 +0200 Subject: [PATCH 05/13] boards/common/wsn430: Add Kconfig symbols --- boards/common/wsn430/Kconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 boards/common/wsn430/Kconfig diff --git a/boards/common/wsn430/Kconfig b/boards/common/wsn430/Kconfig new file mode 100644 index 0000000000..9f4b421c2b --- /dev/null +++ b/boards/common/wsn430/Kconfig @@ -0,0 +1,18 @@ +# Copyright (c) 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +config BOARD + default "wsn430" if BOARD_WSN430 + +config BOARD_COMMON_WSN430 + bool + default y + select CPU_MODEL_MSP430F1611 + select HAS_PERIPH_GPIO + select HAS_PERIPH_GPIO_IRQ + select HAS_PERIPH_TIMER + select HAS_PERIPH_SPI + select HAS_PERIPH_UART From 915c249d52fea574639ec871dab6064a36918dee Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:31:02 +0200 Subject: [PATCH 06/13] boards/chronos: Add Kconfig symbols --- boards/chronos/Kconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 boards/chronos/Kconfig diff --git a/boards/chronos/Kconfig b/boards/chronos/Kconfig new file mode 100644 index 0000000000..4cc9feaec8 --- /dev/null +++ b/boards/chronos/Kconfig @@ -0,0 +1,15 @@ +# Copyright (c) 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +config BOARD + default "chronos" if BOARD_CHRONOS + +config BOARD_CHRONOS + bool + default y + select CPU_MODEL_CC430F6137 + select HAS_PERIPH_TIMER + select HAS_PERIPH_RTC From f5e8a25db58af42b5ffaaf9141d0f9ee05c390cb Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:31:22 +0200 Subject: [PATCH 07/13] boards/msb-430: Add Kconfig symbols --- boards/msb-430/Kconfig | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 boards/msb-430/Kconfig diff --git a/boards/msb-430/Kconfig b/boards/msb-430/Kconfig new file mode 100644 index 0000000000..e856e35179 --- /dev/null +++ b/boards/msb-430/Kconfig @@ -0,0 +1,21 @@ +# Copyright (c) 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# + +config BOARD + default "msb-430" if BOARD_MSB_430 + +config BOARD_MSB_430 + bool + default y + select HAS_PERIPH_GPIO + select HAS_PERIPH_GPIO_IRQ + select HAS_PERIPH_SPI + select HAS_PERIPH_TIMER + select HAS_PERIPH_UART + select BOARD_COMMON_MSB_430 + +source "$(RIOTBOARD)/common/msb-430/Kconfig" From 95127dea5c91a83f9a0367ab17e70d506668cf37 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:31:38 +0200 Subject: [PATCH 08/13] boards/msb-430h: Add Kconfig symbols --- boards/msb-430h/Kconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 boards/msb-430h/Kconfig diff --git a/boards/msb-430h/Kconfig b/boards/msb-430h/Kconfig new file mode 100644 index 0000000000..48d875e466 --- /dev/null +++ b/boards/msb-430h/Kconfig @@ -0,0 +1,20 @@ +# Copyright (c) 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +config BOARD + default "msb-430h" if BOARD_MSB_430H + +config BOARD_MSB_430H + bool + default y + select HAS_PERIPH_GPIO + select HAS_PERIPH_GPIO_IRQ + select HAS_PERIPH_SPI + select HAS_PERIPH_TIMER + select HAS_PERIPH_UART + select BOARD_COMMON_MSB_430 + +source "$(RIOTBOARD)/common/msb-430/Kconfig" From 6668fd879ced93c0b42b8f3c473a18be24f87582 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:32:09 +0200 Subject: [PATCH 09/13] boards/telosb: Add Kconfig symbols --- boards/telosb/Kconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 boards/telosb/Kconfig diff --git a/boards/telosb/Kconfig b/boards/telosb/Kconfig new file mode 100644 index 0000000000..021e1cafc7 --- /dev/null +++ b/boards/telosb/Kconfig @@ -0,0 +1,18 @@ +# Copyright (c) 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +config BOARD + default "telosb" if BOARD_TELOSB + +config BOARD_TELOSB + bool + default y + select CPU_MODEL_MSP430F1611 + select HAS_PERIPH_GPIO + select HAS_PERIPH_GPIO_IRQ + select HAS_PERIPH_SPI + select HAS_PERIPH_TIMER + select HAS_PERIPH_UART From b2dc185a58ab13aa5361109c50f13d8dab664104 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:32:29 +0200 Subject: [PATCH 10/13] boards/wsn430-v1_3b: Add Kconfig symbols --- boards/wsn430-v1_3b/Kconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 boards/wsn430-v1_3b/Kconfig diff --git a/boards/wsn430-v1_3b/Kconfig b/boards/wsn430-v1_3b/Kconfig new file mode 100644 index 0000000000..311e44cda4 --- /dev/null +++ b/boards/wsn430-v1_3b/Kconfig @@ -0,0 +1,15 @@ +# Copyright (c) 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +config BOARD + default "wsn430-v1_3b" if BOARD_WSN430_V1_3B + +config BOARD_WSN430_V1_3B + bool + default y + select BOARD_COMMON_WSN430 + +source "$(RIOTBOARD)/common/wsn430/Kconfig" From dfac115dd2090934c9976afce27a41b9e8985af2 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:32:52 +0200 Subject: [PATCH 11/13] boards/wsn430-v1_4: Add Kconfig symbols --- boards/wsn430-v1_4/Kconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 boards/wsn430-v1_4/Kconfig diff --git a/boards/wsn430-v1_4/Kconfig b/boards/wsn430-v1_4/Kconfig new file mode 100644 index 0000000000..f8ef47deab --- /dev/null +++ b/boards/wsn430-v1_4/Kconfig @@ -0,0 +1,15 @@ +# Copyright (c) 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +config BOARD + default "wsn430-v1_4" if BOARD_WSN430_V1_4 + +config BOARD_WSN430_V1_4 + bool + default y + select BOARD_COMMON_WSN430 + +source "$(RIOTBOARD)/common/wsn430/Kconfig" From 065b76a963073c0cef63d8463001d17b2d3115d4 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:33:09 +0200 Subject: [PATCH 12/13] boards/z1: Add Kconfig symbols --- boards/z1/Kconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 boards/z1/Kconfig diff --git a/boards/z1/Kconfig b/boards/z1/Kconfig new file mode 100644 index 0000000000..66ab18a1d5 --- /dev/null +++ b/boards/z1/Kconfig @@ -0,0 +1,18 @@ +# Copyright (c) 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +config BOARD + default "z1" if BOARD_Z1 + +config BOARD_Z1 + bool + default y + select CPU_MODEL_MSP430F2617 + select HAS_PERIPH_GPIO + select HAS_PERIPH_GPIO_IRQ + select HAS_PERIPH_SPI + select HAS_PERIPH_TIMER + select HAS_PERIPH_UART From b3ce577dd5b44676ea8a36fcd0da6771f0de2958 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 09:33:24 +0200 Subject: [PATCH 13/13] tests/kconfig_features: Add msp430 boards to whitelist --- tests/kconfig_features/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/kconfig_features/Makefile b/tests/kconfig_features/Makefile index e3991609ff..0b11c55eeb 100644 --- a/tests/kconfig_features/Makefile +++ b/tests/kconfig_features/Makefile @@ -12,10 +12,13 @@ BOARD_WHITELIST += arduino-duemilanove \ cc1352p-launchpad \ cc2650-launchpad \ cc2650stk \ + chronos \ derfmega128 \ ikea-tradfri \ mega-xplained \ microduino-corerf \ + msb-430 \ + msb-430h \ samr21-xpro \ slstk3401a \ slstk3402a \ @@ -24,8 +27,12 @@ BOARD_WHITELIST += arduino-duemilanove \ slwstk6000b-slwrb4162a \ stk3600 \ stk3700 \ - waspmote-pro - + telosb \ + waspmote-pro \ + wsn430-v1_3b \ + wsn430-v1_4 \ + z1 + # all: checks