summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-01-27 23:42:11 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-01-27 23:42:11 +0300
commit1df1642b706eb6d39f93936e70df22cbdfb0ec36 (patch)
treeab94f3d43f03f970983f15fab2a5d464fd8fe268
parent40e72e4a5cc59fa005259b9e85393a13a32c0a12 (diff)
downloadmicropython-1df1642b706eb6d39f93936e70df22cbdfb0ec36.tar.gz
micropython-1df1642b706eb6d39f93936e70df22cbdfb0ec36.zip
zephyr: Allow to have per-board Zephyr config fragments.
To enable options which may be incompatible with other boards, etc.
-rw-r--r--zephyr/Makefile7
-rw-r--r--zephyr/prj_base.conf (renamed from zephyr/prj.conf)7
-rw-r--r--zephyr/prj_qemu_x86.conf6
3 files changed, 12 insertions, 8 deletions
diff --git a/zephyr/Makefile b/zephyr/Makefile
index 7f35eefb5f..4c28e4da85 100644
--- a/zephyr/Makefile
+++ b/zephyr/Makefile
@@ -62,7 +62,7 @@ CFLAGS = $(KBUILD_CFLAGS) $(NOSTDINC_FLAGS) $(ZEPHYRINCLUDE) \
include ../py/mkrules.mk
-$(Z_EXPORTS):
+$(Z_EXPORTS): $(CONF_FILE)
$(MAKE) -f Makefile.zephyr BOARD=$(BOARD) CONF_FILE=$(CONF_FILE) initconfig outputexports
GENERIC_TARGETS = all zephyr qemu qemugdb flash debug
@@ -95,3 +95,8 @@ clean: z_clean
z_clean:
$(MAKE) -f Makefile.zephyr BOARD=$(BOARD) clean
+
+.PHONY: prj.conf
+prj.conf: prj_base.conf
+ cat $< >$@
+ if [ -f prj_$(BOARD).conf ]; then cat prj_$(BOARD).conf >>$@; fi
diff --git a/zephyr/prj.conf b/zephyr/prj_base.conf
index a2fcb64d95..43aedd8fec 100644
--- a/zephyr/prj.conf
+++ b/zephyr/prj_base.conf
@@ -10,10 +10,3 @@ CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_NET_NBUF_RX_COUNT=4
-
-# Networking drivers
-# SLIP driver for QEMU
-CONFIG_NET_SLIP_TAP=y
-
-# BOARD-specific config (qemu_x86)
-CONFIG_RAM_SIZE=256
diff --git a/zephyr/prj_qemu_x86.conf b/zephyr/prj_qemu_x86.conf
new file mode 100644
index 0000000000..cb90834ac0
--- /dev/null
+++ b/zephyr/prj_qemu_x86.conf
@@ -0,0 +1,6 @@
+# Networking drivers
+# SLIP driver for QEMU
+CONFIG_NET_SLIP_TAP=y
+
+# Default RAM easily overflows with uPy and networking
+CONFIG_RAM_SIZE=256