From 32666422a8b8e89645bfa2ef98af8cfdff3501e1 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 3 Sep 2015 08:19:15 -0600 Subject: [PATCH] apps/examples/netloop: will now build as an NSH built-in app --- examples/netloop/Kconfig | 13 ++++++++++++- examples/netloop/Makefile | 15 +++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/examples/netloop/Kconfig b/examples/netloop/Kconfig index 86b27845f..0cf60041e 100644 --- a/examples/netloop/Kconfig +++ b/examples/netloop/Kconfig @@ -6,9 +6,20 @@ config EXAMPLES_NETLOOP bool "Local loopback example" default n - depends on !NSH_BUILTIN_APPS && NET_LOOPBACK && NET_TCP && NET_TCPBACKLOG && NET_TCP_READAHEAD && NET_TCP_WRITE_BUFFERS && NET_IPv4 + depends on NET_LOOPBACK && NET_TCP && NET_TCPBACKLOG && NET_TCP_READAHEAD && NET_TCP_WRITE_BUFFERS && NET_IPv4 ---help--- Enable the local loopback example if EXAMPLES_NETLOOP +if NSH_BUILTIN_APPS + +config EXAMPLES_NETLOOP_STACKSIZE + int "Loopback test stack size" + default 2048 + +config EXAMPLES_NETLOOP_PRIORITY + int "Loopback test task priority" + default 100 + +endif # NSH_BUILTIN_APPS endif # EXAMPLES_NETLOOP diff --git a/examples/netloop/Makefile b/examples/netloop/Makefile index 6bbe496e4..ac7991881 100644 --- a/examples/netloop/Makefile +++ b/examples/netloop/Makefile @@ -70,6 +70,13 @@ else INSTALL_DIR = $(BIN_DIR) endif +CONFIG_EXAMPLES_NETLOOP_STACKSIZE ?= 2048 +CONFIG_EXAMPLES_NETLOOP_PRIORITY ?= 100 + +APPNAME = netloop +PRIORITY = $(CONFIG_EXAMPLES_NETLOOP_PRIORITY) +STACKSIZE = $(CONFIG_EXAMPLES_NETLOOP_STACKSIZE) + CONFIG_XYZ_PROGNAME ?= poll$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) @@ -105,7 +112,15 @@ install: endif +ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) +$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile + $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) + +context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat +else context: +endif + .depend: Makefile $(SRCS) @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep