summaryrefslogtreecommitdiff
path: root/src/arch/stm32f446re-nucleo
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-08-28 15:25:37 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-08-28 15:25:37 +0200
commit3a66ae51c3f34108428e582ef693866d71496d16 (patch)
tree6a8ab3774af1b1077720671a92f40a92d5425bcf /src/arch/stm32f446re-nucleo
parente12d6d528705344628568000dc2fddb919457411 (diff)
Expose configuration via Kconfig
Diffstat (limited to 'src/arch/stm32f446re-nucleo')
-rw-r--r--src/arch/stm32f446re-nucleo/Kconfig11
-rw-r--r--src/arch/stm32f446re-nucleo/Makefile.inc31
-rw-r--r--src/arch/stm32f446re-nucleo/prompt1
3 files changed, 29 insertions, 14 deletions
diff --git a/src/arch/stm32f446re-nucleo/Kconfig b/src/arch/stm32f446re-nucleo/Kconfig
new file mode 100644
index 0000000..df64674
--- /dev/null
+++ b/src/arch/stm32f446re-nucleo/Kconfig
@@ -0,0 +1,11 @@
+config arch_stm32f446re_nucleo_driver_counter
+bool "Cycle Counter"
+select meta_driver_counter
+
+config arch_stm32f446re_nucleo_driver_timer
+bool "Timer with Interrupts"
+select meta_driver_timer
+
+config arch_stm32f446re_nucleo_driver_uptime
+bool "Uptime Counter"
+select meta_driver_uptime
diff --git a/src/arch/stm32f446re-nucleo/Makefile.inc b/src/arch/stm32f446re-nucleo/Makefile.inc
index 22115f7..554c7a8 100644
--- a/src/arch/stm32f446re-nucleo/Makefile.inc
+++ b/src/arch/stm32f446re-nucleo/Makefile.inc
@@ -27,34 +27,37 @@ endif
CXX_TARGETS += src/arch/stm32f446re-nucleo/driver/gpio.cc
CXX_TARGETS += src/arch/stm32f446re-nucleo/driver/stdout.cc
-CXX_TARGETS += src/arch/stm32f446re-nucleo/driver/uptime.cc
-ifneq ($(findstring stdin,${arch_drivers}), )
- CXX_TARGETS += src/arch/stm32f446re-nucleo/driver/stdin.cc
+# Commandline
+
+ifneq ($(findstring counter,${arch_drivers}), )
+ CONFIG_arch_stm32f446re_nucleo_driver_counter = y
endif
-ifneq ($(findstring softi2c,${drivers}), )
-else ifneq ($(findstring i2c,${arch_drivers}), )
- CXX_TARGETS += src/arch/stm32f446re-nucleo/driver/i2c.cc
- COMMON_FLAGS += -DDRIVER_I2C
+ifneq ($(findstring timer,${arch_drivers}), )
+ CONFIG_arch_stm32f446re_nucleo_driver_timer = y
endif
-ifneq ($(findstring spi_a1,${arch_drivers}), )
- CXX_TARGETS += src/arch/stm32f446re-nucleo/driver/spi_a1.cc
+ifeq (${timer_s}, 1)
+ CONFIG_arch_stm32f446re_nucleo_driver_uptime = y
endif
-ifneq ($(findstring spi_b,${arch_drivers}), )
- CXX_TARGETS += src/arch/stm32f446re-nucleo/driver/spi_b.cc
+# Kconfig
+
+ifdef CONFIG_arch_stm32f446re_nucleo_driver_counter
+ CXX_TARGETS += src/arch/stm32f446re-nucleo/driver/counter.cc
endif
-ifneq ($(findstring timer,${arch_drivers}), )
+ifdef CONFIG_arch_stm32f446re_nucleo_driver_timer
CXX_TARGETS += src/arch/stm32f446re-nucleo/driver/timer.cc
endif
-ifneq ($(findstring counter,${arch_drivers}), )
- CXX_TARGETS += src/arch/stm32f446re-nucleo/driver/counter.cc
+ifdef CONFIG_arch_stm32f446re_nucleo_driver_uptime
+ COMMON_FLAGS += -DTIMER_S
+ CXX_TARGETS += src/arch/stm32f446re-nucleo/driver/uptime.cc
endif
+
ifneq (${cpu_freq}, )
COMMON_FLAGS += -DF_CPU=${cpu_freq}UL
else
diff --git a/src/arch/stm32f446re-nucleo/prompt b/src/arch/stm32f446re-nucleo/prompt
new file mode 100644
index 0000000..e81bb4b
--- /dev/null
+++ b/src/arch/stm32f446re-nucleo/prompt
@@ -0,0 +1 @@
+STM32F446RE Nucleo