mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-18 17:32:09 +08:00
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:
@@ -54,7 +54,7 @@ config EXAMPLES_FLOWC_PROGNAME1
|
||||
string "Target1 program name"
|
||||
default "receiver" if !EXAMPLES_FLOWC_SENDER1
|
||||
default "sender" if EXAMPLES_FLOWC_SENDER1
|
||||
depends on BUILD_KERNEL
|
||||
depends on BUILD_LOADABLE
|
||||
---help---
|
||||
This is the name of the Target1 program that will be use when the
|
||||
NSH ELF program is installed.
|
||||
@@ -83,7 +83,7 @@ config EXAMPLES_FLOWC_PROGNAME2
|
||||
string "Target2 program name"
|
||||
default "receiver" if !EXAMPLES_FLOWC_RECEIVER2
|
||||
default "sender" if EXAMPLES_FLOWC_RECEIVER2
|
||||
depends on BUILD_KERNEL
|
||||
depends on BUILD_LOADABLE
|
||||
---help---
|
||||
This is the name of the Target2 program that will be use when the
|
||||
NSH ELF program is installed.
|
||||
|
@@ -100,7 +100,7 @@ endif
|
||||
TARG_SRCS = $(TARG1_CRCS) $(TARG1_MAINSRC) $(TARG2_CSRCS) $(TARG2_MAINSRC)
|
||||
TARG_OBJS = $(TARG1_COBJS) $(TARG2_COBJS)
|
||||
|
||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
||||
ifneq ($(CONFIG_BUILD_LOADABLE),y)
|
||||
TARG_OBJS += $(TARG1_MAINOBJ) $(TARG2_MAINOBJ)
|
||||
endif
|
||||
|
||||
@@ -180,7 +180,7 @@ endif
|
||||
.built: config.h $(TARG_BIN) $(HOST_BIN)
|
||||
$(Q) touch .built
|
||||
|
||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
||||
ifeq ($(CONFIG_BUILD_LOADABLE),y)
|
||||
$(BIN_DIR)$(DELIM)$(PROGNAME1): $(OBJS) $(TARG1_MAINOBJ)
|
||||
@echo "LD: $(PROGNAME1)"
|
||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME1) $(ARCHCRT0OBJ) $(TARG1_MAINOBJ) $(LDLIBS)
|
||||
@@ -195,11 +195,11 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||
$(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)
|
||||
$(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 \
|
||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat
|
||||
|
@@ -48,7 +48,7 @@
|
||||
* flowc1_main
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_BUILD_KERNEL)
|
||||
#if defined(CONFIG_BUILD_LOADABLE)
|
||||
int main(int argc, FAR char *argv[])
|
||||
#elif defined(CONFIG_EXAMPLES_FLOWC_TARGET2)
|
||||
int flowc1_main(int argc, char *argv[])
|
||||
|
@@ -48,7 +48,7 @@
|
||||
* flowc2_main
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_BUILD_KERNEL)
|
||||
#if defined(CONFIG_BUILD_LOADABLE)
|
||||
int main(int argc, FAR char *argv[])
|
||||
#else
|
||||
int flowc2_main(int argc, char *argv[])
|
||||
|
Reference in New Issue
Block a user