summaryrefslogtreecommitdiff
path: root/src/arch/posix
diff options
context:
space:
mode:
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