Squashed commit of the following:
Author: anchao <anchao@pinecone.net> apps/, most main() function: Correct CONFIG_BUILD_LOADABLE usage Loadable apps/: Correct loadable symbol table generate apps/system/ubloxmodem: Fix build break apps/examples/ostest: start restart/waitpid/user test from main loop apps/nshlib: Expand reboot and poweroff commands to include a second, optional mode argument Author: Gregory Nutt <gnutt@nuttx.org> An attempt to fix build issues. Does not work. apps/examples/ostest: Fix some inappropriate renaming of static functions introduced with recent patches. apps/builtin/exec_builtin.c: Fix a error introduced by recent comments. Found in build testing. Author: anchao <anchao@pinecone.net> apps/builtin/exec_builtin.c: Try posix_spawn if builtin apps do not have have an entry point. apps/Application.mk: introduce MODULE config to simplify tristate(m) apps/nsh: Change the nuttx shell module type to tristate apps: Add loadable application support script/mksymtab: Generate symbol table name by default apps/builtin: Allow loadable applications can register with apps/builtin.
This commit is contained in:
parent
d7bdf06055
commit
220653f21c
@ -37,8 +37,31 @@
|
|||||||
|
|
||||||
include $(APPDIR)/Make.defs
|
include $(APPDIR)/Make.defs
|
||||||
|
|
||||||
|
# If this is an executable program (with MAINSRC), we must build it as a
|
||||||
|
# loadable module for the KERNEL build (always) or if the tristate module
|
||||||
|
# has the value "m"
|
||||||
|
|
||||||
|
ifneq ($(MAINSRC),)
|
||||||
|
ifneq ($(MODULE),)
|
||||||
|
ifeq ($(CONFIG_$(MODULE)),m)
|
||||||
|
BUILD_MODULE = y
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Pass the definition to the C/C++ code via the CFLAGS/CXXFLAGS
|
||||||
|
|
||||||
|
ifeq ($(BUILD_MODULE),y)
|
||||||
|
CFLAGS += ${shell $(DEFINE) "$(CC)" BUILD_MODULE}
|
||||||
|
CXXFLAGS += ${shell $(DEFINE) "$(CC)" BUILD_MODULE}
|
||||||
|
endif
|
||||||
|
|
||||||
|
# File extensions
|
||||||
|
|
||||||
CXXEXT ?= .cxx
|
CXXEXT ?= .cxx
|
||||||
|
|
||||||
|
# Object files
|
||||||
|
|
||||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||||
CXXOBJS = $(CXXSRCS:$(CXXEXT)=$(OBJEXT))
|
CXXOBJS = $(CXXSRCS:$(CXXEXT)=$(OBJEXT))
|
||||||
@ -52,10 +75,12 @@ endif
|
|||||||
SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) $(MAINSRC)
|
SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) $(MAINSRC)
|
||||||
OBJS = $(AOBJS) $(COBJS) $(CXXOBJS)
|
OBJS = $(AOBJS) $(COBJS) $(CXXOBJS)
|
||||||
|
|
||||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
ifneq ($(BUILD_MODULE),y)
|
||||||
OBJS += $(MAINOBJ)
|
OBJS += $(MAINOBJ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Module install directory
|
||||||
|
|
||||||
ifeq ($(WINTOOL),y)
|
ifeq ($(WINTOOL),y)
|
||||||
BIN = "${shell cygpath -w $(APPDIR)$(DELIM)libapps$(LIBEXT)}"
|
BIN = "${shell cygpath -w $(APPDIR)$(DELIM)libapps$(LIBEXT)}"
|
||||||
INSTALL_DIR = "${shell cygpath -w $(BIN_DIR)}"
|
INSTALL_DIR = "${shell cygpath -w $(BIN_DIR)}"
|
||||||
@ -68,6 +93,8 @@ ROOTDEPPATH = --dep-path .
|
|||||||
|
|
||||||
VPATH =
|
VPATH =
|
||||||
|
|
||||||
|
# Targets follow
|
||||||
|
|
||||||
all: .built
|
all: .built
|
||||||
.PHONY: clean preconfig depend distclean
|
.PHONY: clean preconfig depend distclean
|
||||||
.PRECIOUS: $(APPDIR)/libapps$(LIBEXT)
|
.PRECIOUS: $(APPDIR)/libapps$(LIBEXT)
|
||||||
@ -89,18 +116,11 @@ $(MAINOBJ): %$(OBJEXT): %.c
|
|||||||
$(call COMPILE, $<, $@)
|
$(call COMPILE, $<, $@)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(LOADABLE),y)
|
|
||||||
.built: $(OBJS)
|
|
||||||
$(call ELFLD, $(APPNAME)_main, $(OBJS), $(APPNAME))
|
|
||||||
$(Q) mkdir -p $(BIN_DIR)
|
|
||||||
$(Q) install $(APPNAME) $(BIN_DIR)$(DELIM)$(APPNAME)
|
|
||||||
else
|
|
||||||
.built: $(OBJS)
|
.built: $(OBJS)
|
||||||
$(call ARCHIVE, $(BIN), $(OBJS))
|
$(call ARCHIVE, $(BIN), $(OBJS))
|
||||||
$(Q) touch $@
|
$(Q) touch $@
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
ifeq ($(BUILD_MODULE), y)
|
||||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
||||||
@echo "LD: $(PROGNAME)"
|
@echo "LD: $(PROGNAME)"
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
||||||
@ -118,7 +138,7 @@ ifneq ($(APPNAME),)
|
|||||||
ifneq ($(PRIORITY),)
|
ifneq ($(PRIORITY),)
|
||||||
ifneq ($(STACKSIZE),)
|
ifneq ($(STACKSIZE),)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
|
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(if $(BUILD_MODULE),,$(APPNAME)_main))
|
||||||
|
|
||||||
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
|
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
|
||||||
else
|
else
|
||||||
@ -145,9 +165,6 @@ endif
|
|||||||
depend: .depend
|
depend: .depend
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
ifeq ($(LOADABLE),y)
|
|
||||||
$(call DELFILE, $(APPNAME))
|
|
||||||
endif
|
|
||||||
$(call DELFILE, .built)
|
$(call DELFILE, .built)
|
||||||
$(call CLEAN)
|
$(call CLEAN)
|
||||||
|
|
||||||
|
42
Make.defs
42
Make.defs
@ -43,46 +43,23 @@ DEPCONFIG = $(TOPDIR)$(DELIM).config
|
|||||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
define REGISTER
|
define REGISTER
|
||||||
$(Q) echo Register: $1
|
$(Q) echo Register: $1
|
||||||
$(Q) echo { "$1", $2, $3, $4 }, > "$(BUILTIN_REGISTRY)$(DELIM)$4.bdat"
|
$(Q) echo { "$1", $2, $3, $4 }, > "$(BUILTIN_REGISTRY)$(DELIM)$1.bdat"
|
||||||
$(Q) echo int $4(int argc, char *argv[]); > "$(BUILTIN_REGISTRY)$(DELIM)$4.pdat"
|
$(Q) if [ ! -z $4 ]; then \
|
||||||
|
echo "int $4(int argc, char *argv[]);" > "$(BUILTIN_REGISTRY)$(DELIM)$1.pdat"; \
|
||||||
|
fi;
|
||||||
$(Q) touch $(BUILTIN_REGISTRY)$(DELIM).updated"
|
$(Q) touch $(BUILTIN_REGISTRY)$(DELIM).updated"
|
||||||
endef
|
endef
|
||||||
else
|
else
|
||||||
define REGISTER
|
define REGISTER
|
||||||
$(Q) echo "Register: $1"
|
$(Q) echo "Register: $1 $4"
|
||||||
$(Q) echo "{ \"$1\", $2, $3, $4 }," > "$(BUILTIN_REGISTRY)$(DELIM)$4.bdat"
|
$(Q) echo "{ \"$1\", $2, $3, $4 }," > "$(BUILTIN_REGISTRY)$(DELIM)$1.bdat"
|
||||||
$(Q) echo "int $4(int argc, char *argv[]);" > "$(BUILTIN_REGISTRY)$(DELIM)$4.pdat"
|
$(Q) if [ ! -z $4 ]; then \
|
||||||
|
echo "int $4(int argc, char *argv[]);" > "$(BUILTIN_REGISTRY)$(DELIM)$1.pdat"; \
|
||||||
|
fi;
|
||||||
$(Q) touch "$(BUILTIN_REGISTRY)$(DELIM).updated"
|
$(Q) touch "$(BUILTIN_REGISTRY)$(DELIM).updated"
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# COMPILE - a macro to compile a loadable app in C
|
|
||||||
|
|
||||||
ifeq ($(LOADABLE),y)
|
|
||||||
define COMPILE
|
|
||||||
@echo "CC) $1"
|
|
||||||
$(Q) $(CC) -c $(CELFFLAGS) -DLOADABLE_APP $1 -o $2
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
|
|
||||||
# COMPILEXX - a macro to compile a loadable app in C++
|
|
||||||
|
|
||||||
ifeq ($(LOADABLE),y)
|
|
||||||
define COMPILEXX
|
|
||||||
@echo "CXX: $1"
|
|
||||||
$(Q) $(CXX) -c $(CXXELFFLAGS) -DLOADABLE_APP $1 -o $2
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
|
|
||||||
# ELFLD - a macro to link loadable app
|
|
||||||
# Example: $(call ELFLD, entry point, in-file(s), out-file)
|
|
||||||
|
|
||||||
define ELFLD
|
|
||||||
@echo "LD: $3"
|
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $2 -o $3
|
|
||||||
$(Q) chmod +x $3
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Tools
|
# Tools
|
||||||
#
|
#
|
||||||
# In a normal build, tools will reside in the nuttx/tools sub-directory and
|
# In a normal build, tools will reside in the nuttx/tools sub-directory and
|
||||||
@ -146,3 +123,4 @@ endif
|
|||||||
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
|
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
|
||||||
CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
|
CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(APPDIR)$(DELIM)include"}
|
||||||
|
|
||||||
|
LDLIBS = $(APPDIR)/libapps.a
|
||||||
|
35
Makefile
35
Makefile
@ -67,7 +67,8 @@ LIBPATH ?= $(TOPDIR)$(DELIM)staging
|
|||||||
|
|
||||||
# The install path
|
# The install path
|
||||||
|
|
||||||
BIN_DIR = $(APPDIR)$(DELIM)bin
|
EXE_DIR = $(APPDIR)$(DELIM)exe
|
||||||
|
BIN_DIR = $(EXE_DIR)$(DELIM)system$(DELIM)bin
|
||||||
|
|
||||||
# The final build target
|
# The final build target
|
||||||
|
|
||||||
@ -75,13 +76,13 @@ BIN = libapps$(LIBEXT)
|
|||||||
|
|
||||||
# Symbol table for loadable apps.
|
# Symbol table for loadable apps.
|
||||||
|
|
||||||
SYMTABSRC = $(APPDIR)$(DELIM)symtab_apps.c
|
SYMTABSRC = $(EXE_DIR)$(DELIM)symtab_apps.c
|
||||||
SYMTABOBJ = $(APPDIR)$(DELIM)symtab_apps$(OBJEXT)
|
SYMTABOBJ = $(SYMTABSRC:.c=$(OBJEXT))
|
||||||
|
|
||||||
# Build targets
|
# Build targets
|
||||||
|
|
||||||
all: $(BIN)
|
all: $(BIN)
|
||||||
.PHONY: import symtab install dirlinks context context_serialize clean_context context_rest .depdirs preconfig depend clean distclean
|
.PHONY: import install dirlinks context context_serialize clean_context context_rest .depdirs preconfig depend clean distclean
|
||||||
.PRECIOUS: libapps$(LIBEXT)
|
.PRECIOUS: libapps$(LIBEXT)
|
||||||
|
|
||||||
define MAKE_template
|
define MAKE_template
|
||||||
@ -102,29 +103,29 @@ $(foreach SDIR, $(CONFIGURED_APPS), $(eval $(call SDIR_template,$(SDIR),depend))
|
|||||||
$(foreach SDIR, $(CLEANDIRS), $(eval $(call SDIR_template,$(SDIR),clean)))
|
$(foreach SDIR, $(CLEANDIRS), $(eval $(call SDIR_template,$(SDIR),clean)))
|
||||||
$(foreach SDIR, $(CLEANDIRS), $(eval $(call SDIR_template,$(SDIR),distclean)))
|
$(foreach SDIR, $(CLEANDIRS), $(eval $(call SDIR_template,$(SDIR),distclean)))
|
||||||
|
|
||||||
make_symbols:
|
ifeq ($(CONFIG_BUILD_LOADABLE),)
|
||||||
ifeq ($(CONFIG_SYSTEM_NSH_SYMTAB),y)
|
$(BIN): $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all)
|
||||||
mkdir -p $(BIN_DIR)
|
else
|
||||||
$(Q) $(APPDIR)$(DELIM)tools$(DELIM)mksymtab.sh $(BIN_DIR) $(SYMTABSRC)
|
$(SYMTABSRC): $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all)
|
||||||
$(call COMPILE, $(SYMTABSRC), $(SYMTABOBJ))
|
$(Q) $(MAKE) install TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
|
||||||
$(call ARCHIVE, $(APPDIR)$(DELIM)$(BIN), $(SYMTABOBJ))
|
$(Q) $(APPDIR)$(DELIM)tools$(DELIM)mksymtab.sh $(EXE_DIR)$(DELIM)system $(SYMTABSRC)
|
||||||
endif
|
|
||||||
|
|
||||||
$(BIN): $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all) make_symbols
|
$(SYMTABOBJ): %$(OBJEXT): %.c
|
||||||
|
$(call COMPILE, -fno-lto $<, $@)
|
||||||
|
|
||||||
|
$(BIN): $(SYMTABOBJ)
|
||||||
|
$(call ARCHIVE, $(BIN), $^)
|
||||||
|
endif
|
||||||
|
|
||||||
.install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install)
|
.install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install)
|
||||||
|
|
||||||
$(BIN_DIR):
|
$(BIN_DIR):
|
||||||
mkdir -p $(BIN_DIR)
|
$(Q) mkdir -p $(BIN_DIR)
|
||||||
|
|
||||||
install: $(BIN_DIR) .install
|
install: $(BIN_DIR) .install
|
||||||
|
|
||||||
.import: $(BIN) install
|
.import: $(BIN) install
|
||||||
|
|
||||||
symtab: $(BIN_DIR)
|
|
||||||
$(Q) tools/mksymtab.sh $(BIN_DIR) $(APPDIR)$(DELIM)import/symtab.c
|
|
||||||
$(call MAKE_template,import,symtab)
|
|
||||||
|
|
||||||
import:
|
import:
|
||||||
$(Q) $(MAKE) .import TOPDIR="$(APPDIR)$(DELIM)import"
|
$(Q) $(MAKE) .import TOPDIR="$(APPDIR)$(DELIM)import"
|
||||||
|
|
||||||
|
@ -181,11 +181,27 @@ int exec_builtin(FAR const char *appname, FAR char * const *argv,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start the built-in */
|
#ifdef CONFIG_LIBC_EXECFUNCS
|
||||||
|
/* A NULL entry point implies that the task is a loadable application */
|
||||||
|
|
||||||
|
if (builtin->main == NULL)
|
||||||
|
{
|
||||||
|
/* Load and execute the application. */
|
||||||
|
|
||||||
|
ret = posix_spawn(&pid, builtin->name, &file_actions,
|
||||||
|
&attr, (argv) ? &argv[1] : (FAR char * const *)NULL,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
/* Start the built-in */
|
||||||
|
|
||||||
|
ret = task_spawn(&pid, builtin->name, builtin->main, &file_actions,
|
||||||
|
&attr, (argv) ? &argv[1] : (FAR char * const *)NULL,
|
||||||
|
(FAR char * const *)NULL);
|
||||||
|
}
|
||||||
|
|
||||||
ret = task_spawn(&pid, builtin->name, builtin->main, &file_actions,
|
|
||||||
&attr, (argv) ? &argv[1] : (FAR char * const *)NULL,
|
|
||||||
(FAR char * const *)NULL);
|
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
{
|
{
|
||||||
serr("ERROR: task_spawn failed: %d\n", ret);
|
serr("ERROR: task_spawn failed: %d\n", ret);
|
||||||
|
@ -79,7 +79,7 @@ examples/alarm
|
|||||||
Configuration:
|
Configuration:
|
||||||
|
|
||||||
CONFIG_EXAMPLES_ALARM - Enable the RTC driver alarm test
|
CONFIG_EXAMPLES_ALARM - Enable the RTC driver alarm test
|
||||||
CONFIG_EXAMPLES_ALARM_PROGNAME - If CONFIG_BUILD_KERNEL=y, then this is
|
CONFIG_EXAMPLES_ALARM_PROGNAME - If CONFIG_BUILD_LOADABLE=y, then this is
|
||||||
the name of the program that will be use when the NSH ELF program is
|
the name of the program that will be use when the NSH ELF program is
|
||||||
installed.
|
installed.
|
||||||
CONFIG_EXAMPLES_ALARM_PRIORITY - Alarm daemon priority
|
CONFIG_EXAMPLES_ALARM_PRIORITY - Alarm daemon priority
|
||||||
@ -435,7 +435,7 @@ examples/flash_test
|
|||||||
* CONFIG_MTD_SMART=y - SMART block driver support
|
* CONFIG_MTD_SMART=y - SMART block driver support
|
||||||
* CONFIG_NSH_BUILTIN_APPS=y - This example can only be built as an NSH
|
* CONFIG_NSH_BUILTIN_APPS=y - This example can only be built as an NSH
|
||||||
command
|
command
|
||||||
* CONFIG_BUILD_PROTECTED=n and CONFIG_BUILD_KERNEL=n- This test uses
|
* CONFIG_BUILD_PROTECTED=n and CONFIG_BUILD_LOADABLE=n- This test uses
|
||||||
internal OS interfaces and so is not available in the NUTTX kernel
|
internal OS interfaces and so is not available in the NUTTX kernel
|
||||||
builds
|
builds
|
||||||
|
|
||||||
@ -1584,7 +1584,7 @@ examples/relays
|
|||||||
relies on internal OS interfaces that are not normally available to a
|
relies on internal OS interfaces that are not normally available to a
|
||||||
user-space program. As a result, this example cannot be used if a
|
user-space program. As a result, this example cannot be used if a
|
||||||
NuttX is built as a protected, supervisor kernel (CONFIG_BUILD_PROTECTED
|
NuttX is built as a protected, supervisor kernel (CONFIG_BUILD_PROTECTED
|
||||||
or CONFIG_BUILD_KERNEL).
|
or CONFIG_BUILD_LOADABLE).
|
||||||
|
|
||||||
examples/rfid_readuid
|
examples/rfid_readuid
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -228,7 +228,7 @@ static void parse_args(FAR struct adc_state_s *adc, int argc, FAR char **argv)
|
|||||||
* Name: adc_main
|
* Name: adc_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int adc_main(int argc, char *argv[])
|
int adc_main(int argc, char *argv[])
|
||||||
|
@ -14,7 +14,7 @@ if EXAMPLES_ADXL372_TEST
|
|||||||
config EXAMPLES_ADXL372_TEST_PROGNAME
|
config EXAMPLES_ADXL372_TEST_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "ADXL372_test"
|
default "ADXL372_test"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -387,7 +387,7 @@ quick_exit:
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int adxl372_test_main(int argc, FAR char *argv[])
|
int adxl372_test_main(int argc, FAR char *argv[])
|
||||||
|
@ -376,7 +376,7 @@ static int ajoy_calibrate(int fd)
|
|||||||
* ajoy_main
|
* ajoy_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int ajoy_main(int argc, char *argv[])
|
int ajoy_main(int argc, char *argv[])
|
||||||
|
@ -15,7 +15,7 @@ if EXAMPLES_ALARM
|
|||||||
config EXAMPLES_ALARM_PROGNAME
|
config EXAMPLES_ALARM_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "alarm"
|
default "alarm"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -208,7 +208,7 @@ static void show_usage(FAR const char *progname)
|
|||||||
* alarm_main
|
* alarm_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int alarm_main(int argc, FAR char *argv[])
|
int alarm_main(int argc, FAR char *argv[])
|
||||||
|
@ -14,7 +14,7 @@ if EXAMPLES_APA102
|
|||||||
config EXAMPLES_APA102_PROGNAME
|
config EXAMPLES_APA102_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "apa102"
|
default "apa102"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -150,7 +150,7 @@ static struct apa102_ledstrip_s hsvtorgb(uint16_t h, uint8_t s, uint8_t v)
|
|||||||
* apa102_main
|
* apa102_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int apa102_main(int argc, char *argv[])
|
int apa102_main(int argc, char *argv[])
|
||||||
|
@ -15,7 +15,7 @@ if EXAMPLES_APDS9960
|
|||||||
config EXAMPLES_APDS9960_PROGNAME
|
config EXAMPLES_APDS9960_PROGNAME
|
||||||
string "APDS-9960 Test Program name"
|
string "APDS-9960 Test Program name"
|
||||||
default "apds9960"
|
default "apds9960"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
* apds9960_main
|
* apds9960_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int apds9960_main(int argc, char *argv[])
|
int apds9960_main(int argc, char *argv[])
|
||||||
|
@ -56,7 +56,7 @@ MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
|
|||||||
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
ifneq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
OBJS += $(MAINOBJ)
|
OBJS += $(MAINOBJ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ $(ROMFS_HDR) : $(ROMFS_IMG)
|
|||||||
|
|
||||||
# Link and install the program binary
|
# Link and install the program binary
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
ifeq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
||||||
@echo "LD: $(PROGNAME)"
|
@echo "LD: $(PROGNAME)"
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
||||||
@ -132,7 +132,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
|
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(if $(CONFIG_BUILD_LOADABLE),,$(APPNAME)_main))
|
||||||
|
|
||||||
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
|
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
|
||||||
else
|
else
|
||||||
|
@ -92,7 +92,7 @@
|
|||||||
* bastest_main
|
* bastest_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int bastest_main(int argc, char *argv[])
|
int bastest_main(int argc, char *argv[])
|
||||||
|
@ -15,7 +15,7 @@ if EXAMPLES_BMP180
|
|||||||
config EXAMPLES_BMP180_PROGNAME
|
config EXAMPLES_BMP180_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "bmp180"
|
default "bmp180"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
* bmp180_main
|
* bmp180_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int bmp180_main(int argc, char *argv[])
|
int bmp180_main(int argc, char *argv[])
|
||||||
|
@ -55,7 +55,7 @@ TARG_MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
|
|||||||
TARG_SRCS = $(TARG_ASRCS) $(TARG_CSRCS) $(MAINSRC)
|
TARG_SRCS = $(TARG_ASRCS) $(TARG_CSRCS) $(MAINSRC)
|
||||||
TARG_OBJS = $(TARG_AOBJS) $(TARG_COBJS)
|
TARG_OBJS = $(TARG_AOBJS) $(TARG_COBJS)
|
||||||
|
|
||||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
ifneq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
TARG_OBJS += $(TARG_MAINOBJ)
|
TARG_OBJS += $(TARG_MAINOBJ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ $(HOST_BIN2): bridge_config.h $(HOST_OBJS2)
|
|||||||
.built: $(TARG_BIN) $(HOST_BIN1) $(HOST_BIN2)
|
.built: $(TARG_BIN) $(HOST_BIN1) $(HOST_BIN2)
|
||||||
@touch .built
|
@touch .built
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
ifeq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
$(BIN_DIR)$(DELIM)$(TARG_PROGNAME): $(TARG_OBJS) $(TARG_MAINOBJ)
|
$(BIN_DIR)$(DELIM)$(TARG_PROGNAME): $(TARG_OBJS) $(TARG_MAINOBJ)
|
||||||
@echo "LD: $(TARG_PROGNAME)"
|
@echo "LD: $(TARG_PROGNAME)"
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(TARG_INSTALL_DIR)$(DELIM)$(TARG_PROGNAME) $(ARCHCRT0OBJ) $(TARG_MAINOBJ) $(LDLIBS)
|
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(TARG_INSTALL_DIR)$(DELIM)$(TARG_PROGNAME) $(ARCHCRT0OBJ) $(TARG_MAINOBJ) $(LDLIBS)
|
||||||
@ -142,7 +142,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(TARG_APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)$(TARG_APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,$(TARG_APPNAME),$(TARG_PRIORITY),$(TARG_STACKSIZE),$(TARG_APPNAME)_main)
|
$(call REGISTER,$(TARG_APPNAME),$(TARG_PRIORITY),$(TARG_STACKSIZE),$(if $(CONFIG_BUILD_LOADABLE),,$(TARG_APPNAME)_main))
|
||||||
|
|
||||||
context: $(BUILTIN_REGISTRY)$(DELIM)$(TARG_APPNAME)_main.bdat
|
context: $(BUILTIN_REGISTRY)$(DELIM)$(TARG_APPNAME)_main.bdat
|
||||||
else
|
else
|
||||||
|
@ -681,7 +681,7 @@ errout_with_recvsd:
|
|||||||
* bridge_main
|
* bridge_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int bridge_main(int argc, char *argv[])
|
int bridge_main(int argc, char *argv[])
|
||||||
|
@ -15,7 +15,7 @@ if EXAMPLES_BUTTONS
|
|||||||
config EXAMPLES_BUTTONS_PROGNAME
|
config EXAMPLES_BUTTONS_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "buttons"
|
default "buttons"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -391,7 +391,7 @@ errout:
|
|||||||
* buttons_main
|
* buttons_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int buttons_main(int argc, FAR char *argv[])
|
int buttons_main(int argc, FAR char *argv[])
|
||||||
|
@ -219,7 +219,7 @@ static int linreg(FAR struct measurement_s *point, int num_points,
|
|||||||
* calib_udelay_main
|
* calib_udelay_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int calib_udelay_main(int argc, char *argv[])
|
int calib_udelay_main(int argc, char *argv[])
|
||||||
|
@ -156,7 +156,7 @@ static void show_usage(FAR const char *progname)
|
|||||||
* Name: can_main
|
* Name: can_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int can_main(int argc, FAR char *argv[])
|
int can_main(int argc, FAR char *argv[])
|
||||||
|
@ -508,7 +508,7 @@ errout_with_dev:
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int canard_main(int argc, FAR char *argv[])
|
int canard_main(int argc, FAR char *argv[])
|
||||||
|
@ -48,7 +48,7 @@ MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
|
|||||||
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
ifneq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
OBJS += $(MAINOBJ)
|
OBJS += $(MAINOBJ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ $(COBJS) $(MAINOBJ): %$(OBJEXT): %.c
|
|||||||
$(call ARCHIVE, $(BIN), $(OBJS))
|
$(call ARCHIVE, $(BIN), $(OBJS))
|
||||||
$(Q) touch .built
|
$(Q) touch .built
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
ifeq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
||||||
@echo "LD: $(PROGNAME)"
|
@echo "LD: $(PROGNAME)"
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
||||||
@ -109,7 +109,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
|
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(if $(CONFIG_BUILD_LOADABLE),,$(APPNAME)_main))
|
||||||
|
|
||||||
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
|
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
|
||||||
else
|
else
|
||||||
|
@ -321,7 +321,7 @@ static int chat_parse_args(FAR struct chat_app* priv)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char** argv)
|
int main(int argc, FAR char** argv)
|
||||||
#else
|
#else
|
||||||
int chat_main(int argc, FAR char** argv)
|
int chat_main(int argc, FAR char** argv)
|
||||||
|
@ -622,7 +622,7 @@ static void configdata_cleardeleted(void)
|
|||||||
* Name: configdata_main
|
* Name: configdata_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int configdata_main(int argc, char *argv[])
|
int configdata_main(int argc, char *argv[])
|
||||||
|
@ -96,7 +96,7 @@ static struct state_s
|
|||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int cpuhog_main(int argc, char *argv[])
|
int cpuhog_main(int argc, char *argv[])
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
* Name: dhcpd_main
|
* Name: dhcpd_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int dhcpd_main(int argc, char *argv[])
|
int dhcpd_main(int argc, char *argv[])
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
* discover_main
|
* discover_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int discover_main(int argc, char *argv[])
|
int discover_main(int argc, char *argv[])
|
||||||
|
@ -140,7 +140,7 @@ static void show_joystick(djoy_buttonset_t oldset, djoy_buttonset_t newset)
|
|||||||
* djoy_main
|
* djoy_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int djoy_main(int argc, char *argv[])
|
int djoy_main(int argc, char *argv[])
|
||||||
|
@ -14,7 +14,7 @@ if EXAMPLES_DSPTEST
|
|||||||
config EXAMPLES_DSPTEST_PROGNAME
|
config EXAMPLES_DSPTEST_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "dsptest"
|
default "dsptest"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
* dsptest_main
|
* dsptest_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int dsptest_main(int argc, char *argv[])
|
int dsptest_main(int argc, char *argv[])
|
||||||
|
@ -50,7 +50,7 @@ MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
|
|||||||
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
ifneq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
OBJS += $(MAINOBJ)
|
OBJS += $(MAINOBJ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ really_build: $(OBJS)
|
|||||||
@$(MAKE) -C tests TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV)
|
@$(MAKE) -C tests TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV)
|
||||||
@$(MAKE) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" really_build
|
@$(MAKE) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" really_build
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
ifeq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
||||||
@echo "LD: $(PROGNAME)"
|
@echo "LD: $(PROGNAME)"
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
||||||
|
@ -237,7 +237,7 @@ static inline void testheader(FAR const char *progname)
|
|||||||
* Name: elf_main
|
* Name: elf_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int elf_main(int argc, char *argv[])
|
int elf_main(int argc, char *argv[])
|
||||||
|
@ -28,7 +28,7 @@ config EXAMPLES_FB_DEFAULTFB
|
|||||||
config EXAMPLES_FB_PROGNAME
|
config EXAMPLES_FB_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "fb"
|
default "fb"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -284,7 +284,7 @@ static void draw_rect(FAR struct fb_state_s *state,
|
|||||||
* fb_main
|
* fb_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int fb_main(int argc, char *argv[])
|
int fb_main(int argc, char *argv[])
|
||||||
|
@ -15,7 +15,7 @@ if EXAMPLES_FBOVERLAY
|
|||||||
config EXAMPLES_FBOVERLAY_PROGNAME
|
config EXAMPLES_FBOVERLAY_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "fboverlay"
|
default "fboverlay"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -1010,7 +1010,7 @@ static void usage(const char * progname)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int fboverlay_main(int argc, char *argv[])
|
int fboverlay_main(int argc, char *argv[])
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
config EXAMPLES_FLASH_TEST
|
config EXAMPLES_FLASH_TEST
|
||||||
bool "SMART FLASH block device test"
|
bool "SMART FLASH block device test"
|
||||||
default n
|
default n
|
||||||
depends on (!BUILD_PROTECTED && !BUILD_KERNEL) && MTD_SMART && NSH_BUILTIN_APPS
|
depends on (!BUILD_PROTECTED && !BUILD_LOADABLE) && MTD_SMART && NSH_BUILTIN_APPS
|
||||||
---help---
|
---help---
|
||||||
This logic performs a SMART flash block device test. This test
|
This logic performs a SMART flash block device test. This test
|
||||||
performs a sector allocate, read, write, free and garbage collection
|
performs a sector allocate, read, write, free and garbage collection
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int flash_test_main(int argc, char *argv[])
|
int flash_test_main(int argc, char *argv[])
|
||||||
|
@ -54,7 +54,7 @@ config EXAMPLES_FLOWC_PROGNAME1
|
|||||||
string "Target1 program name"
|
string "Target1 program name"
|
||||||
default "receiver" if !EXAMPLES_FLOWC_SENDER1
|
default "receiver" if !EXAMPLES_FLOWC_SENDER1
|
||||||
default "sender" if EXAMPLES_FLOWC_SENDER1
|
default "sender" if EXAMPLES_FLOWC_SENDER1
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the Target1 program that will be use when the
|
This is the name of the Target1 program that will be use when the
|
||||||
NSH ELF program is installed.
|
NSH ELF program is installed.
|
||||||
@ -83,7 +83,7 @@ config EXAMPLES_FLOWC_PROGNAME2
|
|||||||
string "Target2 program name"
|
string "Target2 program name"
|
||||||
default "receiver" if !EXAMPLES_FLOWC_RECEIVER2
|
default "receiver" if !EXAMPLES_FLOWC_RECEIVER2
|
||||||
default "sender" if EXAMPLES_FLOWC_RECEIVER2
|
default "sender" if EXAMPLES_FLOWC_RECEIVER2
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the Target2 program that will be use when the
|
This is the name of the Target2 program that will be use when the
|
||||||
NSH ELF program is installed.
|
NSH ELF program is installed.
|
||||||
|
@ -100,7 +100,7 @@ endif
|
|||||||
TARG_SRCS = $(TARG1_CRCS) $(TARG1_MAINSRC) $(TARG2_CSRCS) $(TARG2_MAINSRC)
|
TARG_SRCS = $(TARG1_CRCS) $(TARG1_MAINSRC) $(TARG2_CSRCS) $(TARG2_MAINSRC)
|
||||||
TARG_OBJS = $(TARG1_COBJS) $(TARG2_COBJS)
|
TARG_OBJS = $(TARG1_COBJS) $(TARG2_COBJS)
|
||||||
|
|
||||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
ifneq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
TARG_OBJS += $(TARG1_MAINOBJ) $(TARG2_MAINOBJ)
|
TARG_OBJS += $(TARG1_MAINOBJ) $(TARG2_MAINOBJ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ endif
|
|||||||
.built: config.h $(TARG_BIN) $(HOST_BIN)
|
.built: config.h $(TARG_BIN) $(HOST_BIN)
|
||||||
$(Q) touch .built
|
$(Q) touch .built
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
ifeq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
$(BIN_DIR)$(DELIM)$(PROGNAME1): $(OBJS) $(TARG1_MAINOBJ)
|
$(BIN_DIR)$(DELIM)$(PROGNAME1): $(OBJS) $(TARG1_MAINOBJ)
|
||||||
@echo "LD: $(PROGNAME1)"
|
@echo "LD: $(PROGNAME1)"
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME1) $(ARCHCRT0OBJ) $(TARG1_MAINOBJ) $(LDLIBS)
|
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME1) $(ARCHCRT0OBJ) $(TARG1_MAINOBJ) $(LDLIBS)
|
||||||
@ -195,11 +195,11 @@ endif
|
|||||||
|
|
||||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(MAINNAME1))
|
$(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(if $(CONFIG_BUILD_LOADABLE),,$(MAINNAME1)))
|
||||||
|
|
||||||
ifeq ($(CONFIG_EXAMPLES_FLOWC_TARGET2),y)
|
ifeq ($(CONFIG_EXAMPLES_FLOWC_TARGET2),y)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(MAINNAME2))
|
$(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(if $(CONFIG_BUILD_LOADABLE),,$(MAINNAME2)))
|
||||||
|
|
||||||
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat \
|
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat \
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat
|
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
* flowc1_main
|
* flowc1_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_BUILD_KERNEL)
|
#if defined(CONFIG_BUILD_LOADABLE)
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#elif defined(CONFIG_EXAMPLES_FLOWC_TARGET2)
|
#elif defined(CONFIG_EXAMPLES_FLOWC_TARGET2)
|
||||||
int flowc1_main(int argc, char *argv[])
|
int flowc1_main(int argc, char *argv[])
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
* flowc2_main
|
* flowc2_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_BUILD_KERNEL)
|
#if defined(CONFIG_BUILD_LOADABLE)
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int flowc2_main(int argc, char *argv[])
|
int flowc2_main(int argc, char *argv[])
|
||||||
|
@ -752,7 +752,7 @@ static int fstest_directory(void)
|
|||||||
* Name: fstest_main
|
* Name: fstest_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int fstest_main(int argc, char *argv[])
|
int fstest_main(int argc, char *argv[])
|
||||||
|
@ -36,7 +36,7 @@ config EXAMPLES_FT80X_EXCLUDE_BITMAPS
|
|||||||
config EXAMPLES_FT80X_PROGNAME
|
config EXAMPLES_FT80X_PROGNAME
|
||||||
string "FT80x program name"
|
string "FT80x program name"
|
||||||
default "ft80x"
|
default "ft80x"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -288,7 +288,7 @@ static int ft80x_example(int fd, FAR struct ft80x_dlbuffer_s *buffer,
|
|||||||
* ft80x_main
|
* ft80x_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int ft80x_main(int argc, char *argv[])
|
int ft80x_main(int argc, char *argv[])
|
||||||
|
@ -365,7 +365,7 @@ int ftpc_parse(SESSION handle, char *cmdline)
|
|||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int ftpc_main(int argc, char **argv, char **envp)
|
int ftpc_main(int argc, char **argv, char **envp)
|
||||||
|
@ -50,7 +50,7 @@ MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
|
|||||||
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
ifneq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
OBJS += $(MAINOBJ)
|
OBJS += $(MAINOBJ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ $(COBJS) $(MAINOBJ): %$(OBJEXT): %.c
|
|||||||
$(call ARCHIVE, $(BIN), $(OBJS))
|
$(call ARCHIVE, $(BIN), $(OBJS))
|
||||||
@touch .built
|
@touch .built
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
ifeq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
||||||
@echo "LD: $(PROGNAME)"
|
@echo "LD: $(PROGNAME)"
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
||||||
@ -109,10 +109,10 @@ endif
|
|||||||
|
|
||||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)ftpd_start.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)ftpd_start.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,ftpd_start,SCHED_PRIORITY_DEFAULT,$(CONFIG_EXAMPLES_FTPD_STACKSIZE),ftpd_main)
|
$(call REGISTER,ftpd_start,SCHED_PRIORITY_DEFAULT,$(CONFIG_EXAMPLES_FTPD_STACKSIZE),$(if $(CONFIG_BUILD_LOADABLE),,ftpd_main))
|
||||||
|
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)ftpd_stop.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)ftpd_stop.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,ftpd_stop,SCHED_PRIORITY_DEFAULT,$(CONFIG_EXAMPLES_FTPD_STACKSIZE),ftpd_stop)
|
$(call REGISTER,ftpd_stop,SCHED_PRIORITY_DEFAULT,$(CONFIG_EXAMPLES_FTPD_STACKSIZE),$(if $(CONFIG_BUILD_LOADABLE),,ftpd_stop))
|
||||||
|
|
||||||
context: $(BUILTIN_REGISTRY)$(DELIM)ftpd_start.bdat $(BUILTIN_REGISTRY)$(DELIM)ftpd_stop.bdat
|
context: $(BUILTIN_REGISTRY)$(DELIM)ftpd_start.bdat $(BUILTIN_REGISTRY)$(DELIM)ftpd_stop.bdat
|
||||||
else
|
else
|
||||||
|
@ -247,7 +247,7 @@ int ftpd_daemon(int s_argc, char **s_argv)
|
|||||||
* Name: ftpd_main
|
* Name: ftpd_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int ftpd_main(int s_argc, char **s_argv)
|
int ftpd_main(int s_argc, char **s_argv)
|
||||||
|
@ -15,7 +15,7 @@ if EXAMPLES_GPIO
|
|||||||
config EXAMPLES_GPIO_PROGNAME
|
config EXAMPLES_GPIO_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "gpio"
|
default "gpio"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -73,7 +73,7 @@ static void show_usage(FAR const char *progname)
|
|||||||
* gpio_main
|
* gpio_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int gpio_main(int argc, char *argv[])
|
int gpio_main(int argc, char *argv[])
|
||||||
|
@ -15,7 +15,7 @@ if EXAMPLES_GPS
|
|||||||
config EXAMPLES_GPS_PROGNAME
|
config EXAMPLES_GPS_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "gps"
|
default "gps"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
* gps_main
|
* gps_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int gps_main(int argc, char *argv[])
|
int gps_main(int argc, char *argv[])
|
||||||
|
@ -14,7 +14,7 @@ if EXAMPLES_HELLO
|
|||||||
config EXAMPLES_HELLO_PROGNAME
|
config EXAMPLES_HELLO_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "hello"
|
default "hello"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -42,12 +42,8 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE ?= 2048
|
|||||||
|
|
||||||
APPNAME = hello
|
APPNAME = hello
|
||||||
|
|
||||||
ifeq ($(CONFIG_EXAMPLES_HELLO),m)
|
|
||||||
LOADABLE = y
|
|
||||||
else
|
|
||||||
PRIORITY = $(CONFIG_EXAMPLES_HELLO_PRIORITY)
|
PRIORITY = $(CONFIG_EXAMPLES_HELLO_PRIORITY)
|
||||||
STACKSIZE = $(CONFIG_EXAMPLES_HELLO_STACKSIZE)
|
STACKSIZE = $(CONFIG_EXAMPLES_HELLO_STACKSIZE)
|
||||||
endif
|
|
||||||
|
|
||||||
# Hello, World! Example
|
# Hello, World! Example
|
||||||
|
|
||||||
@ -58,4 +54,6 @@ MAINSRC = hello_main.c
|
|||||||
CONFIG_EXAMPLES_HELLO_PROGNAME ?= hello$(EXEEXT)
|
CONFIG_EXAMPLES_HELLO_PROGNAME ?= hello$(EXEEXT)
|
||||||
PROGNAME = $(CONFIG_EXAMPLES_HELLO_PROGNAME)
|
PROGNAME = $(CONFIG_EXAMPLES_HELLO_PROGNAME)
|
||||||
|
|
||||||
|
MODULE = EXAMPLES_HELLO
|
||||||
|
|
||||||
include $(APPDIR)/Application.mk
|
include $(APPDIR)/Application.mk
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
* hello_main
|
* hello_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined (CONFIG_BUILD_KERNEL) || defined (LOADABLE_APP)
|
#if defined (CONFIG_BUILD_LOADABLE)
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int hello_main(int argc, char *argv[])
|
int hello_main(int argc, char *argv[])
|
||||||
|
@ -49,11 +49,9 @@ PROGNAME = $(CONFIG_EXAMPLES_HELLOXX_PROGNAME)
|
|||||||
|
|
||||||
APPNAME = helloxx
|
APPNAME = helloxx
|
||||||
|
|
||||||
ifeq ($(CONFIG_EXAMPLES_HELLOXX),m)
|
|
||||||
LOADABLE = y
|
|
||||||
else
|
|
||||||
PRIORITY = SCHED_PRIORITY_DEFAULT
|
PRIORITY = SCHED_PRIORITY_DEFAULT
|
||||||
STACKSIZE = 2048
|
STACKSIZE = 2048
|
||||||
endif
|
|
||||||
|
MODULE = EXAMPLES_HELLOXX
|
||||||
|
|
||||||
include $(APPDIR)/Application.mk
|
include $(APPDIR)/Application.mk
|
||||||
|
@ -127,7 +127,7 @@ static CHelloWorld g_HelloWorld;
|
|||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#if defined (CONFIG_BUILD_KERNEL) || defined (LOADABLE_APP)
|
#if defined (CONFIG_BUILD_LOADABLE)
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int helloxx_main(int argc, char *argv[])
|
int helloxx_main(int argc, char *argv[])
|
||||||
|
@ -14,7 +14,7 @@ if EXAMPLES_HIDKBD
|
|||||||
config EXAMPLES_HIDKBD_PROGNAME
|
config EXAMPLES_HIDKBD_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "hidkbd"
|
default "hidkbd"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the Nettest
|
This is the name of the program that will be use when the Nettest
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -200,7 +200,7 @@ static void hidkbd_decode(FAR char *buffer, ssize_t nbytes)
|
|||||||
* Name: hidkbd_main
|
* Name: hidkbd_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int hidkbd_main(int argc, char *argv[])
|
int hidkbd_main(int argc, char *argv[])
|
||||||
|
@ -78,7 +78,7 @@ config EXAMPLES_I2SCHAR_BUFSIZE
|
|||||||
config EXAMPLES_I2SCHAR_DEVINIT
|
config EXAMPLES_I2SCHAR_DEVINIT
|
||||||
bool "Architecture-specific device initialization"
|
bool "Architecture-specific device initialization"
|
||||||
default 256
|
default 256
|
||||||
depends on !BUILD_PROTECTED && !BUILD_KERNEL
|
depends on !BUILD_PROTECTED && !BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
Define if architecture-specific I2S device initialize is available.
|
Define if architecture-specific I2S device initialize is available.
|
||||||
If defined, the platform specific code must provide a function
|
If defined, the platform specific code must provide a function
|
||||||
|
@ -236,7 +236,7 @@ static void parse_args(FAR struct i2schar_state_s *i2schar, int argc, FAR char *
|
|||||||
* Name: i2schar_main
|
* Name: i2schar_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int i2schar_main(int argc, char *argv[])
|
int i2schar_main(int argc, char *argv[])
|
||||||
|
@ -73,7 +73,7 @@ static void _signal_handler(int number)
|
|||||||
* Name: i2sloop_main
|
* Name: i2sloop_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int i2sloop_main(int argc, char *argv[])
|
int i2sloop_main(int argc, char *argv[])
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
* igmp_main
|
* igmp_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int igmp_main(int argc, char *argv[])
|
int igmp_main(int argc, char *argv[])
|
||||||
|
@ -14,7 +14,7 @@ if EXAMPLES_INA219
|
|||||||
config EXAMPLES_INA219_PROGNAME
|
config EXAMPLES_INA219_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "ina219"
|
default "ina219"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
* ina219_main
|
* ina219_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int ina219_main(int argc, char *argv[])
|
int ina219_main(int argc, char *argv[])
|
||||||
|
@ -30,7 +30,7 @@ endchoice # L3 Protocol
|
|||||||
config EXAMPLES_IPFORWARD_PROGNAME
|
config EXAMPLES_IPFORWARD_PROGNAME
|
||||||
string "IP forwarding rogram name"
|
string "IP forwarding rogram name"
|
||||||
default "ipfwd"
|
default "ipfwd"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -760,7 +760,7 @@ static FAR void *ipfwd_sender(FAR void *arg)
|
|||||||
* Name: fstest_main
|
* Name: fstest_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int ipfwd_main(int argc, char *argv[])
|
int ipfwd_main(int argc, char *argv[])
|
||||||
|
@ -237,7 +237,7 @@ static void create_objects(void)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int json_main(int argc, const char *argv[])
|
int json_main(int argc, const char *argv[])
|
||||||
|
@ -15,7 +15,7 @@ if EXAMPLES_LEDS
|
|||||||
config EXAMPLES_LEDS_PROGNAME
|
config EXAMPLES_LEDS_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "leds"
|
default "leds"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -191,7 +191,7 @@ errout:
|
|||||||
* leds_main
|
* leds_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int leds_main(int argc, FAR char *argv[])
|
int leds_main(int argc, FAR char *argv[])
|
||||||
|
@ -16,7 +16,7 @@ if EXAMPLES_LIS3DSH_READER
|
|||||||
config EXAMPLES_LIS3DSH_READER_PROGNAME
|
config EXAMPLES_LIS3DSH_READER_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "lis3dsh_reader"
|
default "lis3dsh_reader"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
* lis3dsh_reader_main
|
* lis3dsh_reader_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int lis3dsh_reader_main(int argc, FAR char *argv[])
|
int lis3dsh_reader_main(int argc, FAR char *argv[])
|
||||||
|
@ -14,7 +14,7 @@ if EXAMPLES_LSM330SPI_TEST
|
|||||||
config EXAMPLES_LSM330SPI_TEST_PROGNAME
|
config EXAMPLES_LSM330SPI_TEST_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "lsm330spi_test"
|
default "lsm330spi_test"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -623,7 +623,7 @@ quick_exit:
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int lsm330spi_test_main(int argc, FAR char *argv[])
|
int lsm330spi_test_main(int argc, FAR char *argv[])
|
||||||
|
@ -141,7 +141,7 @@ static FAR void *tick_func(void *data)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int lvgldemo_main(int argc, char *argv[])
|
int lvgldemo_main(int argc, char *argv[])
|
||||||
|
@ -14,7 +14,7 @@ if EXAMPLES_MAX31855
|
|||||||
config EXAMPLES_MAX31855_PROGNAME
|
config EXAMPLES_MAX31855_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "max31855"
|
default "max31855"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int max31855_main(int argc, char *argv[])
|
int max31855_main(int argc, char *argv[])
|
||||||
|
@ -65,7 +65,7 @@ config EXAMPLES_MEDIA_BLOCKSIZE
|
|||||||
config EXAMPLES_MEDIA_PROGNAME
|
config EXAMPLES_MEDIA_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "media"
|
default "media"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -124,7 +124,7 @@ static void get_blocksize(int fd, FAR struct media_info_s *info)
|
|||||||
* media_main
|
* media_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int media_main(int argc, FAR char *argv[])
|
int media_main(int argc, FAR char *argv[])
|
||||||
|
@ -287,7 +287,7 @@ static void do_frees(void **mem, const int *size, const int *seq, int n)
|
|||||||
* Name: mm_main
|
* Name: mm_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int mm_main(int argc, char *argv[])
|
int mm_main(int argc, char *argv[])
|
||||||
|
@ -359,7 +359,7 @@ static void modbus_showusage(FAR const char *progname, int exitcode)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int modbus_main(int argc, char *argv[])
|
int modbus_main(int argc, char *argv[])
|
||||||
|
@ -128,7 +128,7 @@ config EXAMPLES_MODULE_NOSTRIP
|
|||||||
config EXAMPLES_MODULE_LIBC
|
config EXAMPLES_MODULE_LIBC
|
||||||
bool "Link with LIBC"
|
bool "Link with LIBC"
|
||||||
default n
|
default n
|
||||||
depends on !BUILD_KERNEL && EXPERIMENTAL
|
depends on !BUILD_LOADABLE && EXPERIMENTAL
|
||||||
---help---
|
---help---
|
||||||
Link with the C library (and also math library if it was built).
|
Link with the C library (and also math library if it was built).
|
||||||
By default, all undefined symbols must be provided via a symbol
|
By default, all undefined symbols must be provided via a symbol
|
||||||
@ -147,6 +147,6 @@ config EXAMPLES_MODULE_LIBC
|
|||||||
config EXAMPLES_MODULE_LIBGCC
|
config EXAMPLES_MODULE_LIBGCC
|
||||||
bool "Link with LIBGCC"
|
bool "Link with LIBGCC"
|
||||||
default n
|
default n
|
||||||
depends on !BUILD_KERNEL && EXPERIMENTAL
|
depends on !BUILD_LOADABLE && EXPERIMENTAL
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -64,7 +64,7 @@ MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
|
|||||||
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
ifneq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
OBJS += $(MAINOBJ)
|
OBJS += $(MAINOBJ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ really_build: $(OBJS)
|
|||||||
@$(MAKE) -C drivers TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV)
|
@$(MAKE) -C drivers TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV)
|
||||||
@$(MAKE) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" really_build
|
@$(MAKE) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" really_build
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
ifeq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
||||||
@echo "LD: $(PROGNAME)"
|
@echo "LD: $(PROGNAME)"
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ)
|
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ)
|
||||||
@ -131,7 +131,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
|
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(if $(CONFIG_BUILD_LOADABLE),,$(APPNAME)_main))
|
||||||
|
|
||||||
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
|
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
|
||||||
else
|
else
|
||||||
|
@ -147,7 +147,7 @@ extern const int g_mod_nexports;
|
|||||||
* Name: module_main
|
* Name: module_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int module_main(int argc, char *argv[])
|
int module_main(int argc, char *argv[])
|
||||||
|
@ -571,7 +571,7 @@ static void succeed_stat(const char *path)
|
|||||||
* Name: mount_main
|
* Name: mount_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int mount_main(int argc, char *argv[])
|
int mount_main(int argc, char *argv[])
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
config EXAMPLES_MTDPART
|
config EXAMPLES_MTDPART
|
||||||
bool "MTD partition test"
|
bool "MTD partition test"
|
||||||
default n
|
default n
|
||||||
depends on MTD_PARTITION && !BUILD_PROTECTED && !BUILD_KERNEL
|
depends on MTD_PARTITION && !BUILD_PROTECTED && !BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
Enable the MTD partition test example.
|
Enable the MTD partition test example.
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ extern FAR struct mtd_dev_s *mtdpart_archinitialize(void);
|
|||||||
* Name: mtdpart_main
|
* Name: mtdpart_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int mtdpart_main(int argc, char *argv[])
|
int mtdpart_main(int argc, char *argv[])
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
config EXAMPLES_MTDRWB
|
config EXAMPLES_MTDRWB
|
||||||
bool "MTD R/W buffer test"
|
bool "MTD R/W buffer test"
|
||||||
default n
|
default n
|
||||||
depends on (MTD_WRBUFFER || MTD_READAHEAD) && !BUILD_PROTECTED && !BUILD_KERNEL
|
depends on (MTD_WRBUFFER || MTD_READAHEAD) && !BUILD_PROTECTED && !BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
Enable the MTD R/W buffer test example.
|
Enable the MTD R/W buffer test example.
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ if EXAMPLES_MTDRWB
|
|||||||
config EXAMPLES_MTDRWB_PROGNAME
|
config EXAMPLES_MTDRWB_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "mtdrwb"
|
default "mtdrwb"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
@ -132,7 +132,7 @@ extern FAR struct mtd_dev_s *mtdrwb_archinitialize(void);
|
|||||||
* Name: mtdrwb_main
|
* Name: mtdrwb_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int mtdrwb_main(int argc, char *argv[])
|
int mtdrwb_main(int argc, char *argv[])
|
||||||
|
@ -249,7 +249,7 @@ errout_with_socket:
|
|||||||
* Name: netloop_main
|
* Name: netloop_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int netloop_main(int argc, char *argv[])
|
int netloop_main(int argc, char *argv[])
|
||||||
|
@ -129,7 +129,7 @@ static void netpkt_usage(void)
|
|||||||
* Name: netpkt_main
|
* Name: netpkt_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int netpkt_main(int argc, char **argv)
|
int netpkt_main(int argc, char **argv)
|
||||||
|
@ -23,7 +23,7 @@ config EXAMPLES_NETTEST_SENDSIZE
|
|||||||
config EXAMPLES_NETTEST_PROGNAME1
|
config EXAMPLES_NETTEST_PROGNAME1
|
||||||
string "Target1 program name"
|
string "Target1 program name"
|
||||||
default "nettest"
|
default "nettest"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the program that will be use when the Nettest
|
This is the name of the program that will be use when the Nettest
|
||||||
program is installed.
|
program is installed.
|
||||||
@ -72,7 +72,7 @@ config EXAMPLES_NETTEST_PROGNAME2
|
|||||||
string "Target2 program name"
|
string "Target2 program name"
|
||||||
default "tcpserver" if !EXAMPLES_NETTEST_SERVER2
|
default "tcpserver" if !EXAMPLES_NETTEST_SERVER2
|
||||||
default "tcpclient" if EXAMPLES_NETTEST_SERVER2
|
default "tcpclient" if EXAMPLES_NETTEST_SERVER2
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_LOADABLE
|
||||||
---help---
|
---help---
|
||||||
This is the name of the Target2 program that will be use when the
|
This is the name of the Target2 program that will be use when the
|
||||||
NSH ELF program is installed.
|
NSH ELF program is installed.
|
||||||
@ -132,7 +132,7 @@ config EXAMPLES_NETTEST_INIT
|
|||||||
bool "Initialize network"
|
bool "Initialize network"
|
||||||
default n if NSH_BUILTIN_APPS
|
default n if NSH_BUILTIN_APPS
|
||||||
default y if !NSH_BUILTIN_APPS
|
default y if !NSH_BUILTIN_APPS
|
||||||
depends on !BUILD_KERNEL && !EXAMPLES_NETTEST_LOOPBACK
|
depends on !BUILD_LOADABLE && !EXAMPLES_NETTEST_LOOPBACK
|
||||||
---help---
|
---help---
|
||||||
Include logic to initialize the network. This should not be done if
|
Include logic to initialize the network. This should not be done if
|
||||||
the network is already initialized when nettest runs. This is
|
the network is already initialized when nettest runs. This is
|
||||||
|
@ -118,7 +118,7 @@ endif
|
|||||||
TARG_SRCS = $(TARG1_CRCS) $(TARG1_MAINSRC) $(TARG2_CSRCS) $(TARG2_MAINSRC) $(TARGCMN_CSRCS)
|
TARG_SRCS = $(TARG1_CRCS) $(TARG1_MAINSRC) $(TARG2_CSRCS) $(TARG2_MAINSRC) $(TARGCMN_CSRCS)
|
||||||
TARG_OBJS = $(TARG1_COBJS) $(TARG2_COBJS) $(TARGCMN_COBJS)
|
TARG_OBJS = $(TARG1_COBJS) $(TARG2_COBJS) $(TARGCMN_COBJS)
|
||||||
|
|
||||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
ifneq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
TARG_OBJS += $(TARG1_MAINOBJ) $(TARG2_MAINOBJ)
|
TARG_OBJS += $(TARG1_MAINOBJ) $(TARG2_MAINOBJ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ endif
|
|||||||
$(call ARCHIVE, $(TARG_BIN), $(TARG_OBJS))
|
$(call ARCHIVE, $(TARG_BIN), $(TARG_OBJS))
|
||||||
$(Q) touch .built
|
$(Q) touch .built
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
ifeq ($(CONFIG_BUILD_LOADABLE),y)
|
||||||
$(BIN_DIR)$(DELIM)$(PROGNAME1): $(OBJS) $(TARG1_MAINOBJ)
|
$(BIN_DIR)$(DELIM)$(PROGNAME1): $(OBJS) $(TARG1_MAINOBJ)
|
||||||
@echo "LD: $(PROGNAME1)"
|
@echo "LD: $(PROGNAME1)"
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME1) $(ARCHCRT0OBJ) $(TARG1_MAINOBJ) $(LDLIBS)
|
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME1) $(ARCHCRT0OBJ) $(TARG1_MAINOBJ) $(LDLIBS)
|
||||||
@ -229,11 +229,11 @@ endif
|
|||||||
|
|
||||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(MAINNAME1))
|
$(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(if $(CONFIG_BUILD_LOADABLE),,$(MAINNAME1)))
|
||||||
|
|
||||||
ifeq ($(CONFIG_EXAMPLES_NETTEST_TARGET2),y)
|
ifeq ($(CONFIG_EXAMPLES_NETTEST_TARGET2),y)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(MAINNAME2))
|
$(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(if $(CONFIG_BUILD_LOADABLE),,$(MAINNAME2)))
|
||||||
|
|
||||||
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat \
|
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat \
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat
|
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat
|
||||||
|
@ -69,7 +69,7 @@ static int server_child(int argc, char *argv[])
|
|||||||
* nettest_main
|
* nettest_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_BUILD_KERNEL)
|
#if defined(CONFIG_BUILD_LOADABLE)
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#elif defined(CONFIG_EXAMPLES_NETTEST_TARGET2)
|
#elif defined(CONFIG_EXAMPLES_NETTEST_TARGET2)
|
||||||
int nettest1_main(int argc, char *argv[])
|
int nettest1_main(int argc, char *argv[])
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
* nettest_main
|
* nettest_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef BUILD_MODULE
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int nettest2_main(int argc, char *argv[])
|
int nettest2_main(int argc, char *argv[])
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user