summaryrefslogtreecommitdiff
path: root/src/arch/posix
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/posix
parente12d6d528705344628568000dc2fddb919457411 (diff)
Expose configuration via Kconfig
Diffstat (limited to 'src/arch/posix')
-rw-r--r--src/arch/posix/Kconfig10
-rw-r--r--src/arch/posix/Makefile.inc18
-rw-r--r--src/arch/posix/prompt1
3 files changed, 28 insertions, 1 deletions
diff --git a/src/arch/posix/Kconfig b/src/arch/posix/Kconfig
new file mode 100644
index 0000000..d88cbfc
--- /dev/null
+++ b/src/arch/posix/Kconfig
@@ -0,0 +1,10 @@
+config gpio_trace
+bool "Trace GPIO changes on stdout"
+
+config arch_posix_driver_counter
+bool "Cycle counter"
+select meta_driver_counter
+
+config arch_posix_driver_uptime
+bool "Uptime counter"
+select meta_driver_uptime
diff --git a/src/arch/posix/Makefile.inc b/src/arch/posix/Makefile.inc
index 7bf4ba0..22ddba9 100644
--- a/src/arch/posix/Makefile.inc
+++ b/src/arch/posix/Makefile.inc
@@ -13,17 +13,33 @@ ifeq (${aspectc}, 1)
endif
CXX_TARGETS += src/arch/posix/arch.cc src/arch/posix/driver/gpio.cc
-CXX_TARGETS += src/arch/posix/driver/stdout.cc src/arch/posix/driver/uptime.cc
+CXX_TARGETS += src/arch/posix/driver/stdout.cc
ifneq ($(findstring counter,${arch_drivers}), )
+ CONFIG_arch_posix_driver_counter = y
+endif
+
+ifeq (${timer_s}, 1)
+ CONFIG_arch_arduino_nano_driver_uptime = y
+endif
+
+ifdef CONFIG_arch_posix_driver_counter
CXX_TARGETS += src/arch/posix/driver/counter.cc
endif
+ifdef CONFIG_arch_arduino_nano_driver_uptime
+ COMMON_FLAGS += -DTIMER_S
+ CXX_TARGETS += src/arch/arduino-nano/driver/uptime.cc
+endif
+
OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o}
ifneq (${gpio_trace}, )
COMMON_FLAGS += -DGPIO_TRACE
endif
+ifdef CONFIG_gpio_trace
+ COMMON_FLAGS += -DGPIO_TRACE
+endif
.cc.o:
${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc}
diff --git a/src/arch/posix/prompt b/src/arch/posix/prompt
new file mode 100644
index 0000000..9615075
--- /dev/null
+++ b/src/arch/posix/prompt
@@ -0,0 +1 @@
+POSIX