summaryrefslogtreecommitdiff
path: root/src/arch/esp8266
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/esp8266')
-rw-r--r--src/arch/esp8266/Kconfig11
-rw-r--r--src/arch/esp8266/Makefile.inc27
-rw-r--r--src/arch/esp8266/prompt1
3 files changed, 36 insertions, 3 deletions
diff --git a/src/arch/esp8266/Kconfig b/src/arch/esp8266/Kconfig
new file mode 100644
index 0000000..5542dd5
--- /dev/null
+++ b/src/arch/esp8266/Kconfig
@@ -0,0 +1,11 @@
+config arch_esp8266_driver_counter
+bool "Cycle Counter"
+select meta_driver_counter
+
+config arch_esp8266_driver_stdin
+bool "UART Input"
+select meta_driver_stdin
+
+config arch_esp8266_driver_uptime
+bool "Uptime Counter"
+select meta_driver_uptime
diff --git a/src/arch/esp8266/Makefile.inc b/src/arch/esp8266/Makefile.inc
index c1bb621..44a3cd7 100644
--- a/src/arch/esp8266/Makefile.inc
+++ b/src/arch/esp8266/Makefile.inc
@@ -22,7 +22,7 @@ CXXFLAGS = -std=c++11 -fno-rtti -fno-threadsafe-statics
LDFLAGS += -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static
CXX_TARGETS += src/arch/esp8266/arch.cc src/arch/esp8266/driver/gpio.cc
-CXX_TARGETS += src/arch/esp8266/driver/stdout.cc src/arch/esp8266/driver/uptime.cc
+CXX_TARGETS += src/arch/esp8266/driver/stdout.cc
OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o}
@@ -30,14 +30,35 @@ ifeq (${esp8266_led2}, 1)
COMMON_FLAGS += -DLED_ON_GPIO16
endif
+# Commandline
+
+ifneq ($(findstring counter,${arch_drivers}), )
+ CONFIG_arch_esp8266_driver_counter = y
+endif
+
ifneq ($(findstring stdin,${arch_drivers}), )
- CXX_TARGETS += src/arch/esp8266/driver/stdin.cc
+ CONFIG_arch_esp8266_driver_stdin = y
endif
-ifneq ($(findstring counter,${arch_drivers}), )
+ifeq (${timer_s}, 1)
+ CONFIG_arch_esp8266_driver_uptime = y
+endif
+
+# Kconfig
+
+ifdef CONFIG_arch_esp8266_driver_counter
CXX_TARGETS += src/arch/esp8266/driver/counter.cc
endif
+ifdef CONFIG_arch_esp8266_driver_stdin
+ CXX_TARGETS += src/arch/esp8266/driver/stdin.cc
+endif
+
+ifdef CONFIG_arch_esp8266_driver_uptime
+ COMMON_FLAGS += -DTIMER_S
+ CXX_TARGETS += src/arch/esp8266/driver/uptime.cc
+endif
+
.cc.o:
${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc}
${QUIET}${OBJCOPY} --rename-section .text=.irom0.text --rename-section .literal=.irom0.literal $@
diff --git a/src/arch/esp8266/prompt b/src/arch/esp8266/prompt
new file mode 100644
index 0000000..3428bc3
--- /dev/null
+++ b/src/arch/esp8266/prompt
@@ -0,0 +1 @@
+ESP8266