Application.mk and main.c files: Change builtin's entry point from main to xxx_main by macro expansion. This change make the entry point fully compliant with POSIX/ANSI standard.

This commit is contained in:
Xiang Xiao 2019-10-06 06:14:39 -06:00 • committed by Gregory Nutt
parent ab7c5a7d4e
commit e806097c70
550 changed files with 664 additions and 2928 deletions

View file

@ -39,14 +39,9 @@ include $(TOPDIR)/Make.defs
MAINSRC = cdcacm_main.c
CONFIG_XYZ_PROGNAME ?= cdcacm$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
APPNAME = sercon serdis
PROGNAME = sercon serdis
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 2048
MODULE = CONFIG_SYSTEM_CDCACM
MODULE = $(CONFIG_SYSTEM_CDCACM)
include $(APPDIR)/Application.mk

View file

@ -13,7 +13,6 @@ system/cdcacm
CONFIG_USBDEV=y : USB device support must be enabled
CONFIG_CDCACM=y : The CDC/ACM driver must be built
CONFIG_NSH_BUILTIN_APPS : NSH built-in application support must be enabled
Configuration options specific to this add-on:

View file

@ -60,10 +60,6 @@
# error "CONFIG_CDCACM is not defined"
#endif
#ifndef CONFIG_NSH_BUILTIN_APPS
# error "This add-on can only be built as an NSH built-in application"
#endif
/* Default configuration values */
#ifndef CONFIG_SYSTEM_CDCACM_DEVMINOR

View file

@ -72,11 +72,7 @@ static struct cdcacm_state_s g_cdcacm;
*
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int sercon_main(int argc, char *argv[])
#endif
{
struct boardioc_usbdev_ctrl_s ctrl;
int ret;
@ -125,11 +121,7 @@ int sercon_main(int argc, char *argv[])
* device.
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char **argv)
#else
int serdis_main(int argc, char *argv[])
#endif
{
struct boardioc_usbdev_ctrl_s ctrl;

View file

@ -6,7 +6,7 @@
config SYSTEM_CFGDATA
tristate "Cfgdata Command"
default n
depends on MTD_CONFIG && NSH_BUILTIN_APPS
depends on MTD_CONFIG
---help---
Enable support for the CFGDATA tool.

View file

@ -41,20 +41,12 @@
include $(TOPDIR)/Make.defs
# config Application
# TODO: appname can be automatically extracted from the directory name
CONFIG_SYSTEM_CFGDATA_STACKSIZE ?= 2048
CONFIG_SYSTEM_CFGDATA_PRIORITY ?= SCHED_PRIORITY_DEFAULT
APPNAME = cfgdata
PROGNAME = cfgdata
PRIORITY = $(CONFIG_SYSTEM_CFGDATA_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_CFGDATA_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_CFGDATA)
MAINSRC = cfgdata_main.c
CONFIG_XYZ_PROGNAME ?= cfgdata$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
MODULE = CONFIG_SYSTEM_CFGDATA
include $(APPDIR)/Application.mk

View file

@ -661,11 +661,7 @@ static void cfgdatacmd_show_all_config_items(void)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int cfgdata_main(int argc, char *argv[])
#endif
{
/* Argument given? */

View file

@ -39,15 +39,11 @@ include $(TOPDIR)/Make.defs
MAINSRC = composite_main.c
CONFIG_XYZ_PROGNAME ?= composite$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
# USB storage built-in application info
APPNAME = conn disconn
PROGNAME = conn disconn
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 2048
MODULE = CONFIG_SYSTEM_COMPOSITE
MODULE = $(CONFIG_SYSTEM_COMPOSITE)
include $(APPDIR)/Application.mk

View file

@ -521,11 +521,7 @@ static int echo_serial(void)
*
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int conn_main(int argc, char *argv[])
#endif
{
struct boardioc_usbdev_ctrl_s ctrl;
int config = CONFIG_SYSTEM_COMPOSITE_DEFCONFIG;
@ -709,18 +705,13 @@ errout:
*
* Description:
* This is a program entry point that will disconnect the USB mass storage
* device. This program is only available if CONFIG_NSH_BUILTIN_APPS
* device. This program is only available if CONFIG_SYSTEM_COMPOSITE = y
* is defined in the NuttX configuration. In that case, this program can
* be executed by entering the "msdis" command at the NSH console.
*
****************************************************************************/
#ifdef CONFIG_NSH_BUILTIN_APPS
#ifdef BUILD_MODULE
int main(int argc, FAR char **argv)
#else
int disconn_main(int argc, char *argv[])
#endif
{
struct boardioc_usbdev_ctrl_s ctrl;
int config = CONFIG_SYSTEM_COMPOSITE_DEFCONFIG;
@ -766,4 +757,3 @@ int disconn_main(int argc, char *argv[])
final_memory_usage("Final memory usage");
return 0;
}
#endif

View file

@ -6,7 +6,7 @@
menuconfig SYSTEM_CRITMONITOR
tristate "Critcal Section Monitor"
default n
depends on FS_PROCFS && !_FS_PROCFS_EXCLUDE_PROCESS && SCHED_CRITMONITOR
depends on FS_PROCFS && !FS_PROCFS_EXCLUDE_PROCESS && SCHED_CRITMONITOR
---help---
If the critical section monitor is enabled (CONFIGSCHED_CRITMONITOR)
this option will enable a critical section monitor daemon. This daemon

View file

@ -37,19 +37,11 @@ include $(TOPDIR)/Make.defs
# Stack Monitor Application
CONFIG_SYSTEM_CRITMONITOR_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_SYSTEM_CRITMONITOR_STACKSIZE ?= 2048
PROGNAME = critmon_start critmon_stop
PRIORITY = $(CONFIG_SYSTEM_CRITMONITOR_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_CRITMONITOR_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_CRITMONITOR)
MAINSRC = critmon.c
CONFIG_XYZ_PROGNAME ?= critmon$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
APPNAME = critmon_start critmon_stop
MODULE = CONFIG_SYSTEM_CRITMONITOR
include $(APPDIR)/Application.mk

View file

@ -496,7 +496,7 @@ static int critmon_daemon(int argc, char **argv)
* Public Functions
****************************************************************************/
int critmon_start_main(int argc, char **argv)
int main(int argc, char **argv)
{
/* Has the monitor already started? */

View file

@ -37,16 +37,9 @@ include $(TOPDIR)/Make.defs
MAINSRC = cu_main.c
CONFIG_XYZ_PROGNAME ?= cu$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
CONFIG_SYSTEM_CUTERM_STACKSIZE ?= 2048
CONFIG_SYSTEM_CUTERM_PRIORITY ?= SCHED_PRIORITY_DEFAULT
APPNAME = cu
PROGNAME = cu
PRIORITY = $(CONFIG_SYSTEM_CUTERM_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_CUTERM_STACKSIZE)
MODULE = CONFIG_SYSTEM_CUTERM
MODULE = $(CONFIG_SYSTEM_CUTERM)
include $(APPDIR)/Application.mk

View file

@ -266,11 +266,7 @@ static int cu_cmd(char bcmd)
*
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int cu_main(int argc, FAR char *argv[])
#endif
{
pthread_attr_t attr;
struct sigaction sa;

View file

@ -16,7 +16,6 @@ if SYSTEM_DHCPC_RENEW
config DHCPC_RENEW_PROGNAME
string "Program name"
default "renew"
depends on BUILD_LOADABLE
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

View file

@ -37,20 +37,13 @@ include $(TOPDIR)/Make.defs
# DHCPC address renewal built-in application info
CONFIG_DHCPC_RENEW_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_DHCPC_RENEW_STACKSIZE ?= 2048
APPNAME = renew
PROGNAME = $(CONFIG_DHCPC_RENEW_PROGNAME)
PRIORITY = $(CONFIG_DHCPC_RENEW_PRIORITY)
STACKSIZE = $(CONFIG_DHCPC_RENEW_STACKSIZE)
CONFIG_DHCPC_RENEW_PROGNAME ?= renew$(EXEEXT)
PROGNAME = $(CONFIG_DHCPC_RENEW_PROGNAME)
MODULE = $(CONFIG_SYSTEM_DHCPC_RENEW)
# DHCPC address renewal
MAINSRC = renew_main.c
MODULE = CONFIG_SYSTEM_DHCPC_RENEW
include $(APPDIR)/Application.mk

View file

@ -69,11 +69,7 @@ static void dhcpc_showusage(FAR const char *progname, int exitcode)
* renew_main
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int renew_main(int argc, char *argv[])
#endif
{
FAR const char *devname;
FAR void *handle;

View file

@ -6,7 +6,7 @@
config SYSTEM_FLASH_ERASEALL
tristate "FLASH Erase-all Command"
default n
depends on MTD && NSH_BUILTIN_APPS
depends on MTD
select FSUTILS_FLASH_ERASEALL
---help---
Enable support for the FLASH eraseall tool.

View file

@ -35,23 +35,15 @@
#
############################################################################
# TODO, this makefile should run make under the app dirs, instead of
# sourcing the Make.defs!
include $(TOPDIR)/Make.defs
# flash_eraseall Application
# TODO: appname can be automatically extracted from the directory name
APPNAME = flash_eraseall
PROGNAME = flash_eraseall
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 1024
MODULE = $(CONFIG_SYSTEM_FLASH_ERASEALL)
MAINSRC = flash_eraseall_main.c
CONFIG_XYZ_PROGNAME ?= flash_eraseall$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
MODULE = CONFIG_SYSTEM_FLASH_ERASEALL
include $(APPDIR)/Application.mk

View file

@ -49,11 +49,7 @@
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int flash_eraseall_main(int argc, char *argv[])
#endif
{
/* Argument given? */

View file

@ -15,7 +15,6 @@ if SYSTEM_HEX2BIN
config SYSTEM_HEX2BIN_BUILTIN
bool "NSH hex2bin Built-In"
default n
depends on NSH_BUILTIN_APPS
---help---
By default, a flexible hex2bin library function built. An NSH
builtin function can also be generated to convert Intel HEX file
@ -67,7 +66,6 @@ endif # SYSTEM_HEX2BIN_BUILTIN
config SYSTEM_HEX2MEM_BUILTIN
bool "NSH hex2mem Built-In"
default n
depends on NSH_BUILTIN_APPS
---help---
By default, a flexible hex2bin library function built. An NSH
builtin function can also be generated to copy Intel HEX files

View file

@ -37,38 +37,20 @@ include $(TOPDIR)/Make.defs
# Hex2bin utility
CONFIG_SYSTEM_HEX2BIN_PROGNAME ?= hex2bin$(EXEEXT)
CONFIG_SYSTEM_HEX2BIN_STACKSIZE ?= 1536
CONFIG_SYSTEM_HEX2BIN_PRIORITY ?= 100
CONFIG_SYSTEM_HEX2MEM_PROGNAME ?= hex2mem$(EXEEXT)
CONFIG_SYSTEM_HEX2MEM_STACKSIZE ?= 1536
CONFIG_SYSTEM_HEX2MEM_PRIORITY ?= 100
ifeq ($(CONFIG_SYSTEM_HEX2BIN),m)
MAINSRC = hex2bin_main.c hex2mem_main.c
PROGNAME = $(CONFIG_SYSTEM_HEX2BIN_PROGNAME) $(CONFIG_SYSTEM_HEX2MEM_PROGNAME)
APPNAME = hex2bin hex2mem
STACKSIZE = $(CONFIG_SYSTEM_HEX2BIN_STACKSIZE) $(CONFIG_SYSTEM_HEX2MEM_STACKSIZE)
PRIORITY = $(CONFIG_SYSTEM_HEX2BIN_PRIORITY) $(CONFIG_SYSTEM_HEX2MEM_PRIORITY)
else
ifeq ($(CONFIG_SYSTEM_HEX2BIN_BUILTIN),y)
MAINSRC = hex2bin_main.c
PROGNAME = $(CONFIG_SYSTEM_HEX2BIN_PROGNAME)
APPNAME = hex2bin
STACKSIZE = $(CONFIG_SYSTEM_HEX2BIN_STACKSIZE)
PRIORITY = $(CONFIG_SYSTEM_HEX2BIN_PRIORITY)
endif
ifeq ($(CONFIG_SYSTEM_HEX2MEM_BUILTIN),y)
MAINSRC += hex2mem_main.c
PROGNAME += $(CONFIG_SYSTEM_HEX2MEM_PROGNAME)
APPNAME += hex2mem
STACKSIZE += $(CONFIG_SYSTEM_HEX2MEM_STACKSIZE)
PRIORITY += $(CONFIG_SYSTEM_HEX2MEM_PRIORITY)
endif
ifeq ($(CONFIG_SYSTEM_HEX2BIN_BUILTIN),y)
MAINSRC = hex2bin_main.c
PROGNAME = hex2bin
STACKSIZE = $(CONFIG_SYSTEM_HEX2BIN_STACKSIZE)
PRIORITY = $(CONFIG_SYSTEM_HEX2BIN_PRIORITY)
endif
MODULE = CONFIG_SYSTEM_HEX2BIN
ifeq ($(CONFIG_SYSTEM_HEX2MEM_BUILTIN),y)
MAINSRC += hex2mem_main.c
PROGNAME = hex2mem
STACKSIZE += $(CONFIG_SYSTEM_HEX2MEM_STACKSIZE)
PRIORITY += $(CONFIG_SYSTEM_HEX2MEM_PRIORITY)
endif
MODULE = $(CONFIG_SYSTEM_HEX2BIN)
include $(APPDIR)/Application.mk

View file

@ -109,11 +109,7 @@ static void show_usage(FAR const char *progname, int exitcode)
*
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int hex2bin_main(int argc, char **argv)
#endif
{
struct lib_stdinstream_s stdinstream;
struct lib_stdsostream_s stdoutstream;

View file

@ -104,11 +104,7 @@ static void show_usage(FAR const char *progname, int exitcode)
*
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int hex2mem_main(int argc, char **argv)
#endif
{
struct lib_stdinstream_s stdinstream;
struct lib_memsostream_s memoutstream;

View file

@ -37,25 +37,18 @@ include $(TOPDIR)/Make.defs
# hexed Application
CONFIG_SYSTEM_HEXED_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_SYSTEM_HEXED_STACKSIZE ?= 2048
APPNAME = hexed
PROGNAME = hexed
PRIORITY = $(CONFIG_SYSTEM_HEXED_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_HEXED_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_HEXED)
CSRCS = bfile.c cmdargs.c hexcopy.c hexdump.c hexenter.c hexhelp.c
CSRCS += hexinsert.c hexmove.c hexremove.c hexword.c
MAINSRC = hexed.c
CONFIG_XYZ_PROGNAME ?= hexed$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" include}
VPATH += :src
ROOTDEPPATH += --dep-path src
MODULE = CONFIG_SYSTEM_HEXED
include $(APPDIR)/Application.mk

View file

@ -371,11 +371,7 @@ int runargs(void)
/* hexed - Hexadecimal File Editor */
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int hexed_main(int argc, char *argv[])
#endif
{
struct cmdargs_s args;

View file

@ -40,13 +40,9 @@ CSRCS = i2c_bus.c i2c_common.c i2c_dev.c i2c_get.c i2c_set.c i2c_verf.c
CSRCS += i2c_devif.c
MAINSRC = i2c_main.c
CONFIG_XYZ_PROGNAME ?= i2c$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
APPNAME = i2c
PROGNAME = i2c
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 2048
MODULE = CONFIG_SYSTEM_I2CTOOL
MODULE = $(CONFIG_SYSTEM_I2CTOOL)
include $(APPDIR)/Application.mk

View file

@ -347,11 +347,7 @@ static void i2c_teardown(FAR struct i2ctool_s *i2ctool)
* Name: i2c_main
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int i2c_main(int argc, char *argv[])
#endif
{
/* Verify settings */

View file

@ -37,18 +37,11 @@ include $(TOPDIR)/Make.defs
# LM-75 Temperature Sensor Application
CONFIG_SYSTEM_LM75_PRIORITY ?= 100
CONFIG_SYSTEM_LM75_STACKSIZE ?= 1024
APPNAME = lm75
PROGNAME = lm75
PRIORITY = $(CONFIG_SYSTEM_LM75_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_LM75_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_LM75)
MAINSRC = lm75.c
CONFIG_XYZ_PROGNAME ?= lm75$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
MODULE = CONFIG_SYSTEM_LM75
include $(APPDIR)/Application.mk

View file

@ -183,11 +183,7 @@ static void parse_args(int argc, FAR char **argv)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int lm75_main(int argc, char *argv[])
#endif
{
#ifdef CONFIG_LIBC_FLOATINGPOINT
double temp;

View file

@ -32,7 +32,6 @@ config SYSTEM_LZF_BLOG
config SYSTEM_LZF_PROGNAME
string "Program name"
default "lzf"
depends on BUILD_LOADABLE
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

View file

@ -37,20 +37,13 @@ include $(TOPDIR)/Make.defs
# LZF built-in application info
CONFIG_SYSTEM_LZF_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_SYSTEM_LZF_STACKSIZE ?= 20480
APPNAME = lzf
PROGNAME = $(CONFIG_SYSTEM_LZF_PROGNAME)
PRIORITY = $(CONFIG_SYSTEM_LZF_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_LZF_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_LZF)
# LZF compression example tool
MAINSRC = lzf_main.c
CONFIG_SYSTEM_LZF_PROGNAME ?= lzf$(EXEEXT)
PROGNAME = $(CONFIG_SYSTEM_LZF_PROGNAME)
MODULE = CONFIG_SYSTEM_LZF
include $(APPDIR)/Application.mk

View file

@ -433,11 +433,7 @@ static int run_file(FAR const char *fname)
* lzf_main
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int lzf_main(int argc, FAR char *argv[])
#endif
{
FAR char *p = argv[0];
int optc;

View file

@ -37,17 +37,13 @@ include $(TOPDIR)/Make.defs
# MDIO tool built-in application info
APPNAME = mdio
PROGNAME = mdio
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 2048
MODULE = $(CONFIG_SYSTEM_MDIO)
# MDIO tool
MAINSRC = mdio_main.c
CONFIG_XYZ_PROGNAME ?= mdio$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
MODULE = CONFIG_SYSTEM_MDIO
include $(APPDIR)/Application.mk

View file

@ -159,11 +159,7 @@ int set_phy_reg(uint16_t phy_id, uint16_t reg_num, uint16_t val)
* mdio_main
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int mdio_main(int argc, char *argv[])
#endif
{
int ret;
int i;

View file

@ -37,17 +37,11 @@ include $(TOPDIR)/Make.defs
# netdb Application
PROGNAME = netdb$(EXEEXT)
CONFIG_SYSTEM_NETDB_STACKSIZE ?= 2048
CONFIG_SYSTEM_NETDB_PRIORITY ?= 100
APPNAME = netdb
PROGNAME = netdb
PRIORITY = $(CONFIG_SYSTEM_NETDB_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_NETDB_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_NETDB)
MAINSRC = netdb_main.c
MODULE = CONFIG_SYSTEM_NETDB
include $(APPDIR)/Application.mk

View file

@ -94,11 +94,7 @@ static void show_usage(FAR const char *progname, int exitcode)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int netdb_main(int argc, char **argv)
#endif
{
FAR struct hostent *host;
FAR const char *addrtype;

View file

@ -72,7 +72,6 @@ endif # SYSTEM_NSH_SYMTAB
config SYSTEM_NSH_PROGNAME
string "Program name"
default "nsh"
depends on BUILD_LOADABLE
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

View file

@ -39,15 +39,9 @@ include $(TOPDIR)/Make.defs
MAINSRC = nsh_main.c
CONFIG_SYSTEM_NSH_PROGNAME ?= nsh$(EXEEXT)
PROGNAME = $(CONFIG_SYSTEM_NSH_PROGNAME)
ifeq ($(CONFIG_SYSTEM_NSH),m)
APPNAME = $(CONFIG_SYSTEM_NSH_PROGNAME)
PRIORITY = $(CONFIG_SYSTEM_NSH_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_NSH_STACKSIZE)
endif
MODULE = CONFIG_SYSTEM_NSH
MODULE = $(CONFIG_SYSTEM_NSH)
include $(APPDIR)/Application.mk

View file

@ -258,11 +258,7 @@ static int nsh_task(void)
* Name: nsh_main
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int nsh_main(int argc, char *argv[])
#endif
{
struct sched_param param;

View file

@ -37,18 +37,13 @@ include $(TOPDIR)/Make.defs
# NTPC address renewal built-in application info
CONFIG_SYSTEM_NTPC_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_SYSTEM_NTPC_STACKSIZE ?= 2048
PROGNAME = ntpcstart ntpcstop
PRIORITY = $(CONFIG_SYSTEM_NTPC_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_NTPC_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_NTPC)
# NTPC address renewal
MAINSRC = ntpcstart_main.c ntpcstop_main.c
APPNAME = ntpcstart ntpcstop
PROGNAME = ntpcstart$(EXEEXT) ntpcstop$(EXEEXT)
MODULE = CONFIG_SYSTEM_NTPC
include $(APPDIR)/Application.mk

View file

@ -52,11 +52,7 @@
* ntpcstart_main
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int ntpcstart_main(int argc, char *argv[])
#endif
{
int pid = ntpc_start();
if (pid < 0)

View file

@ -52,11 +52,7 @@
* ntpcstop_main
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int ntpcstop_main(int argc, char *argv[])
#endif
{
int ret = ntpc_stop();
if (ret < 0)

View file

@ -4,7 +4,7 @@
#
config SYSTEM_NXPLAYER
tristate "NxPlayer Media Player"
bool "NxPlayer Media Player"
default n
depends on AUDIO
---help---
@ -26,7 +26,7 @@ config NXPLAYER_PLAYTHREAD_STACKSIZE
Stack size to use with the NxPlayer play thread.
config NXPLAYER_COMMAND_LINE
bool "Include nxplayer command line application"
tristate "Include nxplayer command line application"
default y
---help---
Compiles in code for the nxplayer command line control.

View file

@ -41,40 +41,13 @@ include $(TOPDIR)/Make.defs
CSRCS = nxplayer.c
# NxPlayer Application
# Make be built as a library:
# CONFIG_SYSTEM_NXPLAYER=y
# CONFIG_NXPLAYER_COMMAND_LINE=n
# As an NSH built-in task:
# CONFIG_SYSTEM_NXPLAYER=y
# CONFIG_NXPLAYER_COMMAND_LINE=y
# As an loadable module
# CONFIG_SYSTEM_NXPLAYER=m
# CONFIG_NXPLAYER_COMMAND_LINE=y
# Assume building as a library (with no main entry point)
MAINSRC =
MODULE =
APPNAME =
PRIORITY =
STACKSIZE =
ifeq ($(CONFIG_SYSTEM_NXPLAYER),m)
# Build as a loadable module
MAINSRC = nxplayer_main.c
ifneq ($(CONFIG_NXPLAYER_COMMAND_LINE),)
PROGNAME = nxplayer
MODULE = m
else ifeq ($(CONFIG_NXPLAYER_COMMAND_LINE),y)
# Build as an NSH built-in application
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = $(CONFIG_NXPLAYER_MAINTHREAD_STACKSIZE)
MODULE = $(CONFIG_NXPLAYER_COMMAND_LINE)
MAINSRC = nxplayer_main.c
APPNAME = nxplayer
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = CONFIG_NXPLAYER_MAINTHREAD_STACKSIZE
MODULE = y
endif
include $(APPDIR)/Application.mk

View file

@ -653,11 +653,7 @@ static int nxplayer_cmd_help(FAR struct nxplayer_s *pPlayer, char *parg)
*
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int nxplayer_main(int argc, char *argv[])
#endif
{
char buffer[64];
int len, x, running;

View file

@ -4,7 +4,7 @@
#
config SYSTEM_NXRECORDER
tristate "NxRecorder pcm raw data Recorder"
bool "NxRecorder pcm raw data Recorder"
default n
depends on AUDIO
---help---
@ -20,7 +20,7 @@ config NXRECORDER_RECORDTHREAD_STACKSIZE
Stack size to use with the NxRecorder record thread.
config NXRECORDER_COMMAND_LINE
bool "Include nxrecorder command line application"
tristate "Include nxrecorder command line application"
default y
---help---
Compiles in code for the nxrecorder command line control.

View file

@ -38,21 +38,14 @@ include $(TOPDIR)/Make.defs
CSRCS = nxrecorder.c
APPNAME = nxrecorder
ifneq ($(CONFIG_NXRECORDER_COMMAND_LINE),)
PROGNAME = nxrecorder
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 2048
MODULE = $(CONFIG_NXRECORDER_COMMAND_LINE)
ifeq ($(CONFIG_SYSTEM_NXRECORDER),m)
MAINSRC = nxrecorder_main.c
else
ifeq ($(CONFIG_NXRECORDER_COMMAND_LINE),y)
MAINSRC = nxrecorder_main.c
endif
endif
CONFIG_XYZ_PROGNAME ?= nxrecorder$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
MODULE = CONFIG_SYSTEM_NXRECORDER
include $(APPDIR)/Application.mk

View file

@ -391,11 +391,7 @@ static int nxrecorder_cmd_help(FAR struct nxrecorder_s *pRecorder, char *parg)
*
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int nxrecorder_main(int argc, char *argv[])
#endif
{
char buffer[64];
int len, x, running;

View file

@ -16,7 +16,6 @@ if SYSTEM_PING
config SYSTEM_PING_PROGNAME
string "Ping program name"
default "ping"
depends on BUILD_LOADABLE
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

View file

@ -37,20 +37,13 @@ include $(TOPDIR)/Make.defs
# ICMP ping command
CONFIG_SYSTEM_PING_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_SYSTEM_PING_STACKSIZE ?= 2048
APPNAME = ping
PROGNAME = $(CONFIG_SYSTEM_PING_PROGNAME)
PRIORITY = $(CONFIG_SYSTEM_PING_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_PING_STACKSIZE)
CONFIG_SYSTEM_PING_PROGNAME ?= ping$(EXEEXT)
PROGNAME = $(CONFIG_SYSTEM_PING_PROGNAME)
MODULE = $(CONFIG_SYSTEM_PING)
# Files
MAINSRC = ping.c
MODULE = CONFIG_SYSTEM_PING
include $(APPDIR)/Application.mk

View file

@ -218,11 +218,7 @@ static void ping_result(FAR const struct ping_result_s *result)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int ping_main(int argc, char **argv)
#endif
{
struct ping_info_s info;
FAR char *endptr;

View file

@ -15,7 +15,6 @@ if SYSTEM_PING6
config SYSTEM_PING6_PROGNAME
string "Ping program name"
default "ping6"
depends on BUILD_LOADABLE
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

View file

@ -37,20 +37,13 @@ include $(TOPDIR)/Make.defs
# ICMP ping6 command
CONFIG_SYSTEM_PING6_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_SYSTEM_PING6_STACKSIZE ?= 2048
APPNAME = ping6
PROGNAME = $(CONFIG_SYSTEM_PING6_PROGNAME)
PRIORITY = $(CONFIG_SYSTEM_PING6_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_PING6_STACKSIZE)
CONFIG_SYSTEM_PING6_PROGNAME ?= ping6$(EXEEXT)
PROGNAME = $(CONFIG_SYSTEM_PING6_PROGNAME)
MODULE = $(CONFIG_SYSTEM_PING6)
# Files
MAINSRC = ping6.c
MODULE = CONFIG_SYSTEM_PING6
include $(APPDIR)/Application.mk

View file

@ -215,11 +215,7 @@ static void ping6_result(FAR const struct ping6_result_s *result)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int ping6_main(int argc, char **argv)
#endif
{
struct ping6_info_s info;
FAR char *endptr;

View file

@ -4,7 +4,7 @@
#
menuconfig SYSTEM_PRUN
tristate "Pascal P-Code interpreter"
bool "Pascal P-Code interpreter"
default n
depends on INTERPRETERS_PCODE
---help---
@ -16,7 +16,7 @@ menuconfig SYSTEM_PRUN
if SYSTEM_PRUN
config SYSTEM_PEXEC
bool "Pascal P-Code command"
tristate "Pascal P-Code command"
default n
---help---
Generates an NSH built-in task that may be used to execute P-Code

View file

@ -42,22 +42,15 @@ CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" \
"$(APPDIR)$(DELIM)interpreters$(DELIM)pcode$(DELIM)include" \
"$(APPDIR)$(DELIM)interpreters$(DELIM)pcode$(DELIM)insn$(DELIM)include"}
CONFIG_SYSTEM_PEXEC_STACKSIZE ?= 1536
CONFIG_SYSTEM_PEXEC_PRIORITY ?= 100
APPNAME = pexec
PRIORITY = $(CONFIG_SYSTEM_PEXEC_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_PEXEC_STACKSIZE)
CSRCS = prun.c
ifeq ($(CONFIG_SYSTEM_PEXEC),y)
ifneq ($(CONFIG_SYSTEM_PEXEC),)
PROGNAME = pexec
PRIORITY = $(CONFIG_SYSTEM_PEXEC_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_PEXEC_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_PEXEC)
MAINSRC += pexec_main.c
endif
CONFIG_XYZ_PROGNAME ?= prun$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
MODULE = CONFIG_SYSTEM_PRUN
include $(APPDIR)/Application.mk

View file

@ -81,11 +81,7 @@ static void show_usage(FAR const char *progname, int errcode)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int pexec_main(int argc, FAR char **argv)
#endif
{
FAR char *filename = NULL;
FAR char *endptr;

View file

@ -4,7 +4,7 @@
#
menuconfig SYSTEM_PSMQ
bool "psmq"
tristate "psmq"
default n
depends on !DISABLE_MQUEUE && SYSTEM_EMBEDLOG
---help---
@ -90,11 +90,6 @@ config PSMQ_TOOLS_SUB
if PSMQ_TOOLS_SUB
config PSMQ_SUB_PROGNAME
string "psmq_sub program name"
default "psmq_sub"
depends on BUILD_KERNEL
config PSMQ_SUB_PRIORITY
int "psmq_sub broker task priority"
default 100

View file

@ -56,18 +56,8 @@ CSRCS = $(PSMQ_SOURCES)/lib/psmq.c \
$(PSMQ_SOURCES)/src/broker.c \
$(PSMQ_SOURCES)/src/cfg.c \
$(PSMQ_SOURCES)/src/globals.c \
$(PSMQ_SOURCES)/src/psmqd.c \
$(PSMQ_SOURCES)/src/topic-list.c
# optional source files to compile depending on Kconfig options
ifeq ($(CONFIG_PSMQ_TOOLS_PUB),y)
CSRCS += $(PSMQ_SOURCES)/src/psmq-pub.c
endif
ifeq ($(CONFIG_PSMQ_TOOLS_SUB),y)
CSRCS += $(PSMQ_SOURCES)/src/psmq-sub.c
endif
# compile-time options from Kconfig
CFLAGS += -DPSMQ_MAX_CLIENTS=$(CONFIG_PSMQ_MAX_CLIENTS)
CFLAGS += -DPSMQ_PAYLOAD_MAX=$(CONFIG_PSMQ_PAYLOAD_MAX)
@ -93,25 +83,25 @@ CFLAGS += -DPACKAGE_STRING="\"psmq $(PSMQ_VERSION)\""
CFLAGS += -DPACKAGE_VERSION=\"$(PSMQ_VERSION)\"
# register psmqd broker daemon application
PROGNAME = psmqd
PRIORITY = $(CONFIG_PSMQD_PRIORITY)
STACKSIZE = $(CONFIG_PSMQD_STACKSIZE)
APPNAME = psmqd
PROGNAME = psmqd$(EXEEXT)
MAINSRC = $(PSMQ_SOURCES)/src/psmqd.c
# register psmq_pub application if it was enabled
ifeq ($(CONFIG_PSMQ_TOOLS_PUB),y)
PROGNAME += psmq_pub
PRIORITY += $(CONFIG_PSMQ_PUB_PRIORITY)
STACKSIZE += $(CONFIG_PSMQ_PUB_STACKSIZE)
APPNAME += psmq_pub
PROGNAME += psmq_pub$(EXEEXT)
MAINSRC += $(PSMQ_SOURCES)/src/psmq-pub.c
endif
# register psmq_sub application if it was enabled
ifeq ($(CONFIG_PSMQ_TOOLS_SUB),y)
PROGNAME += psmq_sub
PRIORITY += $(CONFIG_PSMQ_SUB_PRIORITY)
STACKSIZE += $(CONFIG_PSMQ_SUB_STACKSIZE)
APPNAME += psmq_sub
PROGNAME += psmq_sub$(EXEEXT)
MAINSRC += $(PSMQ_SOURCES)/src/psmq-sub.c
endif
# download and build psmq
@ -142,4 +132,6 @@ distclean::
$(Q) $(call DELDIR, $(PSMQ_SOURCES))
$(Q) $(call DELDIR, $(PSMQ_TARBALL))
MODULE = $(CONFIG_SYSTEM_PSMQ)
include $(APPDIR)/Application.mk

View file

@ -14,7 +14,6 @@ if SYSTEM_RAMTEST
config SYSTEM_RAMTEST_PROGNAME
string "Program name"
default "ramtest"
depends on BUILD_LOADABLE
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

View file

@ -37,18 +37,11 @@ include $(TOPDIR)/Make.defs
# RAM test
CONFIG_SYSTEM_RAMTEST_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_SYSTEM_RAMTEST_STACKSIZE ?= 1024
APPNAME = ramtest
PROGNAME = $(CONFIG_SYSTEM_RAMTEST_PROGNAME)
PRIORITY = $(CONFIG_SYSTEM_RAMTEST_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_RAMTEST_STACKSIZE)
CONFIG_SYSTEM_RAMTEST_PROGNAME ?= ramtest$(EXEEXT)
PROGNAME = $(CONFIG_SYSTEM_RAMTEST_PROGNAME)
MODULE = $(CONFIG_SYSTEM_RAMTEST)
MAINSRC = ramtest.c
MODULE = CONFIG_SYSTEM_RAMTEST
include $(APPDIR)/Application.mk

View file

@ -555,11 +555,7 @@ static void addr_in_addr(FAR struct ramtest_s *info)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int ramtest_main(int argc, char **argv)
#endif
{
struct ramtest_s info;

View file

@ -15,7 +15,6 @@ if SYSTEM_NOTE
config SYSTEM_NOTE_PROGNAME
string "Program name"
default "note"
depends on BUILD_LOADABLE
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

View file

@ -37,20 +37,13 @@ include $(TOPDIR)/Make.defs
# LED driver test built-in application info
CONFIG_SYSTEM_NOTE_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_SYSTEM_NOTE_STACKSIZE ?= 2048
APPNAME = note
PROGNAME = $(CONFIG_SYSTEM_NOTE_PROGNAME)
PRIORITY = $(CONFIG_SYSTEM_NOTE_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_NOTE_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_NOTE)
# LED driver test
MAINSRC = note_main.c
CONFIG_SYSTEM_NOTE_PROGNAME ?= note$(EXEEXT)
PROGNAME = $(CONFIG_SYSTEM_NOTE_PROGNAME)
MODULE = CONFIG_SYSTEM_NOTE
include $(APPDIR)/Application.mk

View file

@ -641,11 +641,7 @@ errout:
* note_main
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int note_main(int argc, FAR char *argv[])
#endif
{
int ret;

View file

@ -13,7 +13,6 @@ if SYSTEM_SETLOGMASK
config SYSTEM_SETLOGMASK_PROGNAME
string "setlogmask program name"
default "setlogmask"
depends on BUILD_LOADABLE
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

View file

@ -37,20 +37,13 @@ include $(TOPDIR)/Make.defs
# setlogmask command
CONFIG_SYSTEM_SETLOGMASK_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_SYSTEM_SETLOGMASK_STACKSIZE ?= 2048
APPNAME = setlogmask
PROGNAME = $(CONFIG_SYSTEM_SETLOGMASK_PROGNAME)
PRIORITY = $(CONFIG_SYSTEM_SETLOGMASK_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_SETLOGMASK_STACKSIZE)
CONFIG_SYSTEM_SETLOGMASK_PROGNAME ?= setlogmask$(EXEEXT)
PROGNAME = $(CONFIG_SYSTEM_SETLOGMASK_PROGNAME)
MODULE = $(CONFIG_SYSTEM_SETLOGMASK)
# Files
MAINSRC = setlogmask.c
MODULE = CONFIG_SYSTEM_SETLOGMASK
include $(APPDIR)/Application.mk

View file

@ -85,11 +85,7 @@ static void show_usage(FAR const char *progname, int exitcode)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int setlogmask_main(int argc, char **argv)
#endif
{
if (argc < 2)
{

View file

@ -16,7 +16,6 @@ if SYSTEM_SPITOOL
config SPITOOL_PROGNAME
string "Program name"
default "hello"
depends on BUILD_LOADABLE
---help---
This is the name of the program that will be used when the ELF
program is installed.

View file

@ -40,16 +40,9 @@ include $(TOPDIR)/Make.defs
CSRCS = spi_bus.c spi_devif.c spi_exch.c spi_common.c
MAINSRC = spi_main.c
CONFIG_SPITOOL_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_SPITOOL_STACKSIZE ?= 2048
APPNAME = spi
PROGNAME = $(CONFIG_SPITOOL_PROGNAME)
PRIORITY = $(CONFIG_SPITOOL_PRIORITY)
STACKSIZE = $(CONFIG_SPITOOL_STACKSIZE)
CONFIG_SPITOOL_PROGNAME ?= spi$(EXEEXT)
PROGNAME = $(CONFIG_SPITOOL_PROGNAME)
MODULE = CONFIG_SYSTEM_SPITOOL
MODULE = $(CONFIG_SYSTEM_SPITOOL)
include $(APPDIR)/Application.mk

View file

@ -357,11 +357,7 @@ static void spi_teardown(FAR struct spitool_s *spitool)
* Name: spi_main
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int spi_main(int argc, char *argv[])
#endif
{
/* Verify settings */

View file

@ -6,7 +6,7 @@
menuconfig SYSTEM_STACKMONITOR
tristate "Stack Monitor"
default n
depends on FS_PROCFS && !_FS_PROCFS_EXCLUDE_PROCESS && STACK_COLORATION
depends on FS_PROCFS && !FS_PROCFS_EXCLUDE_PROCESS && STACK_COLORATION
---help---
If the stack coloration feature is enabled (STACK_COLORATION) this
option will select the Stack Monitor. The stack monitor is a daemon

View file

@ -37,16 +37,11 @@ include $(TOPDIR)/Make.defs
# Stack Monitor Application
PROGNAME = stackmonitor_start stackmonitor_stop
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 2048
MODULE = $(CONFIG_SYSTEM_STACKMONITOR)
MAINSRC = stackmonitor.c
CONFIG_XYZ_PROGNAME ?= stackmon$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
APPNAME = stackmonitor_start stackmonitor_stop
MODULE = CONFIG_SYSTEM_STACKMONITOR
include $(APPDIR)/Application.mk

View file

@ -418,7 +418,7 @@ static int stackmonitor_daemon(int argc, char **argv)
* Public Functions
****************************************************************************/
int stackmonitor_start_main(int argc, char **argv)
int main(int argc, char **argv)
{
/* Has the monitor already started? */

View file

@ -37,17 +37,11 @@ include $(TOPDIR)/Make.defs
# Sudoku Application
CONFIG_SYSTEM_SUDOKU_STACKSIZE ?= 1536
CONFIG_SYSTEM_SUDOKU_PRIORITY ?= 100
PROGNAME = sudoku
STACKSIZE = $(CONFIG_SYSTEM_SUDOKU_STACKSIZE)
PRIORITY = $(CONFIG_SYSTEM_SUDOKU_PRIORITY)
MODULE = $(CONFIG_SYSTEM_SUDOKU)
MAINSRC = sudoku.c
CONFIG_XYZ_PROGNAME ?= sudoku$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
MODULE = CONFIG_SYSTEM_SUDOKU
include $(APPDIR)/Application.mk

View file

@ -500,11 +500,7 @@ static inline void count_cells(void)
* Private Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int sudoku_main(int argc, char **argv, char **envp)
#endif
{
int cmd;
int nchanged;

View file

@ -14,7 +14,6 @@ if SYSTEM_TASKSET
config SYSTEM_TASKSET_PROGNAME
string "Taskset program name"
default "taskset"
depends on BUILD_LOADABLE
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

View file

@ -37,20 +37,13 @@ include $(TOPDIR)/Make.defs
# taskset command
CONFIG_SYSTEM_TASKSET_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_SYSTEM_TASKSET_STACKSIZE ?= 2048
APPNAME = taskset
PROGNAME = $(CONFIG_SYSTEM_TASKSET_PROGNAME)
PRIORITY = $(CONFIG_SYSTEM_TASKSET_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_TASKSET_STACKSIZE)
CONFIG_SYSTEM_TASKSET_PROGNAME ?= taskset$(EXEEXT)
PROGNAME = $(CONFIG_SYSTEM_TASKSET_PROGNAME)
MODULE = $(CONFIG_SYSTEM_TASKSET)
# Files
MAINSRC = taskset.c
MODULE = CONFIG_SYSTEM_TASKSET
include $(APPDIR)/Application.mk

View file

@ -95,11 +95,7 @@ static bool get_cpuset(const char *arg, cpu_set_t *cpu_set)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int taskset_main(int argc, char **argv)
#endif
{
FAR char *nshargv[2];
char command[CONFIG_NSH_LINELEN];

View file

@ -39,18 +39,11 @@ include $(TOPDIR)/Make.defs
# tee command
CONFIG_SYSTEM_TEE_STACKSIZE ?= 1536
CONFIG_SYSTEM_TEE_PRIORITY ?= 100
APPNAME = tee
PROGNAME = tee
PRIORITY = $(CONFIG_SYSTEM_TEE_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_TEE_PRIORITY)
MODULE = $(CONFIG_SYSTEM_TEE)
MAINSRC = tee.c
CONFIG_XYZ_PROGNAME ?= tee$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
MODULE = CONFIG_SYSTEM_TEE
include $(APPDIR)/Application.mk

View file

@ -121,11 +121,7 @@ static void show_usage(FAR const char *progrname, int exitcode)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int tee_main(int argc, char *argv[])
#endif
{
FAR struct tee_list_s *head = NULL;
FAR struct tee_list_s *curr;

View file

@ -16,9 +16,6 @@ if SYSTEM_TELNET_CHATD
config SYSTEM_TELNET_CHATD_PROGNAME
string "Chat daemon program name"
default "chatd"
depends on BUILD_LOADABLE
if NSH_BUILTIN_APPS
config SYSTEM_TELNET_CHATD_STACKSIZE
int "Chat daemon stacksize"
@ -28,7 +25,6 @@ config SYSTEM_TELNET_CHATD_PRIORITY
int "Chat daemon priority"
default 100
endif # NSH_BUILTIN_APPS
endif # SYSTEM_TELNET_CHATD
menuconfig SYSTEM_TELNET_CLIENT
@ -45,9 +41,6 @@ if SYSTEM_TELNET_CLIENT
config SYSTEM_TELNET_CLIENT_PROGNAME
string "Telnet client program name"
default "telnet"
depends on BUILD_LOADABLE
if NSH_BUILTIN_APPS
config SYSTEM_TELNET_CLIENT_STACKSIZE
int "Telnet client stacksize"
@ -57,5 +50,4 @@ config SYSTEM_TELNET_CLIENT_PRIORITY
int "Telnet client priority"
default 100
endif # NSH_BUILTIN_APPS
endif # SYSTEM_TELNET_CLIENT

View file

@ -39,16 +39,11 @@ ifneq ($(CONFIG_SYSTEM_TELNET_CHATD),)
MAINSRC = telnet_chatd.c
CONFIG_SYSTEM_TELNET_CHATD_PROGNAME ?= chatd
CONFIG_SYSTEM_TELNET_CHATD_PRIORITY ?= 100
CONFIG_SYSTEM_TELNET_CHATD_STACKSIZE ?= 2048
APPNAME = chatd
PROGNAME = $(CONFIG_SYSTEM_TELNET_CHATD_PROGNAME)
PRIORITY = $(CONFIG_SYSTEM_TELNET_CHATD_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_TELNET_CHATD_STACKSIZE)
MODULE = CONFIG_CONFIG_SYSTEM_TELNET_CHATD
MODULE = $(CONFIG_CONFIG_SYSTEM_TELNET_CHATD)
endif
@ -56,16 +51,11 @@ ifneq ($(CONFIG_SYSTEM_TELNET_CLIENT),)
MAINSRC += telnet_client.c
CONFIG_SYSTEM_TELNET_CLIENT_PROGNAME ?= telnet
CONFIG_SYSTEM_TELNET_CLIENT_PRIORITY ?= 100
CONFIG_SYSTEM_TELNET_CLIENT_STACKSIZE ?= 2048
APPNAME += telnet
PROGNAME += $(CONFIG_SYSTEM_TELNET_CLIENT_PROGNAME)
PRIORITY += $(CONFIG_SYSTEM_TELNET_CLIENT_PRIORITY)
STACKSIZE += $(CONFIG_SYSTEM_TELNET_CLIENT_STACKSIZE)
MODULE = CONFIG_CONFIG_SYSTEM_TELNET_CLIENT
MODULE = $(CONFIG_CONFIG_SYSTEM_TELNET_CLIENT)
endif

View file

@ -321,11 +321,7 @@ static void _event_handler(struct telnet_s *telnet,
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int chatd_main(int argc, char *argv[])
#endif
{
char buffer[512];
short listen_port;

View file

@ -271,11 +271,7 @@ static void show_usage(const char *progname, int exitcode)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int telnet_main(int argc, char *argv[])
#endif
{
char buffer[512];
union

View file

@ -39,13 +39,9 @@ include $(TOPDIR)/Make.defs
MAINSRC = ubloxmodem_main.c
CONFIG_XYZ_PROGNAME ?= ubloxmodem$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
APPNAME = ubloxmodem
PROGNAME = ubloxmodem
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 2048
MODULE = CONFIG_SYSTEM_UBLOXMODEM
MODULE = $(CONFIG_SYSTEM_UBLOXMODEM)
include $(APPDIR)/Application.mk

View file

@ -406,11 +406,7 @@ static int ubloxmodem_exec(FAR struct ubloxmodem_cxt *cxt)
*
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char** argv)
#else
int ubloxmodem_main(int argc, FAR char** argv)
#endif
{
struct ubloxmodem_cxt cxt;
int ret;

View file

@ -99,7 +99,7 @@ config SYSTEM_USBMSC_DEBUGMM
config SYSTEM_USBMSC_TRACE
bool "Trace USB activity"
default n
depends on (USBDEV_TRACE || DEBUG_USB) && !NSH_BUILTIN_APPS
depends on USBDEV_TRACE || DEBUG_USB
---help---
If this add-on is built as a standalone task and if USB device tracing is
enabled, then this add-on can be configured to unobtrusively monitor
@ -154,8 +154,6 @@ config SYSTEM_USBMSC_TRACEINTERRUPTS
endif # SYSTEM_USBMSC_TRACE
if NSH_BUILTIN_APPS
config SYSTEM_USBMSC_CMD_STACKSIZE
int "Stacksize of msconn and msdis commands"
default 768
@ -170,6 +168,5 @@ config SYSTEM_USBMSC_CMD_PRIORITY
---help---
Priority of the small 'msconn' and 'msdis' command applications.
endif # NSH_BUILTIN_APPS
endif # SYSTEM_USBMSC

View file

@ -35,21 +35,11 @@
include $(TOPDIR)/Make.defs
CONFIG_SYSTEM_USBMSC_CMD_STACKSIZE ?= 768
CONFIG_SYSTEM_USBMSC_CMD_PRIORITY ?= SCHED_PRIORITY_DEFAULT
PROGNAME = msconn msdis
PRIORITY = $(CONFIG_SYSTEM_USBMSC_CMD_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_USBMSC_CMD_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_USBMSC)
MAINSRC = usbmsc_main.c
PROGNAME = usbmsc$(EXEEXT)
ifeq ($(CONFIG_SYSTEM_USBMSC),m)
APPNAME = usbmsc
else
APPNAME = msconn msdis
endif
MODULE = CONFIG_SYSTEM_USBMSC
include $(APPDIR)/Application.mk

View file

@ -434,11 +434,7 @@ static void usbmsc_disconnect(FAR void *handle)
*
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int msconn_main(int argc, char *argv[])
#endif
{
struct boardioc_usbdev_ctrl_s ctrl;
FAR void *handle;
@ -619,18 +615,13 @@ int msconn_main(int argc, char *argv[])
*
* Description:
* This is a program entry point that will disconnect the USB mass storage
* device. This program is only available if CONFIG_NSH_BUILTIN_APPS
* device. This program is only available if CONFIG_SYSTEM_USBMSC == y
* is defined in the NuttX configuration. In that case, this program can
* be executed by entering the "msdis" command at the NSH console.
*
****************************************************************************/
#ifdef CONFIG_NSH_BUILTIN_APPS
#ifdef BUILD_MODULE
int main(int argc, FAR char **argv)
#else
int msdis_main(int argc, char *argv[])
#endif
{
/* First check if the USB mass storage device is already connected */
@ -654,4 +645,3 @@ int msdis_main(int argc, char *argv[])
final_memory_usage("Final memory usage");
return EXIT_SUCCESS;
}
#endif

View file

@ -71,8 +71,6 @@ config SYSTEM_VI_DEBUGLEVEL
readable debug output, syslog'ing should sent to some device other
than /dev/console (which is the default).
if NSH_BUILTIN_APPS
config SYSTEM_VI_STACKSIZE
int "Builtin task stack size"
default 2048
@ -103,5 +101,4 @@ config SYSTEM_VI_INCLUDE_COMMAND_REPEAT
# ---help---
# Number of undo / redo operations saved.
endif # NSH_BUILTIN_APPS
endif # SYSTEM_VI

View file

@ -37,18 +37,11 @@ include $(TOPDIR)/Make.defs
# VI-Workalike Editor
CONFIG_SYSTEM_VI_STACKSIZE ?= 2048
CONFIG_SYSTEM_VI_PRIORITY ?= 100
APPNAME = vi
PROGNAME = vi
PRIORITY = $(CONFIG_SYSTEM_VI_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_VI_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_VI)
MAINSRC = vi.c
CONFIG_XYZ_PROGNAME ?= vi$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
MODULE = CONFIG_SYSTEM_VI
include $(APPDIR)/Application.mk

View file

@ -5758,11 +5758,7 @@ static void vi_showusage(FAR struct vi_s *vi, FAR const char *progname,
*
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int vi_main(int argc, char **argv)
#endif
{
FAR struct vi_s *vi;
int option;

View file

@ -35,23 +35,13 @@
include $(TOPDIR)/Make.defs
CONFIG_SYSTEM_SZPROGNAME ?= sz$(EXEEXT)
PROGNAME = $(CONFIG_SYSTEM_SZPROGNAME)
CONFIG_SYSTEM_RZPROGNAME ?= rz$(EXEEXT)
PROGNAME += $(CONFIG_SYSTEM_RZPROGNAME)
CONFIG_SYSTEM_ZMODEM_PRIORITY ?= 100
CONFIG_SYSTEM_ZMODEM_STACKSIZE ?= 2048
PROGNAME = sz rz
PRIORITY = $(CONFIG_SYSTEM_ZMODEM_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_ZMODEM_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_ZMODEM)
CSRCS = zm_send.c zm_receive.c zm_state.c zm_proto.c zm_watchdog.c
CSRCS += zm_utils.c
MAINSRC = sz_main.c rz_main.c
APPNAME = sz rz
MODULE = CONFIG_SYSTEM_ZMODEM
include $(APPDIR)/Application.mk

View file

@ -74,11 +74,7 @@ static void show_usage(FAR const char *progname, int errcode)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int rz_main(int argc, FAR char **argv)
#endif
{
ZMRHANDLE handle;
FAR const char *devname = CONFIG_SYSTEM_ZMODEM_DEVNAME;

View file

@ -91,11 +91,7 @@ static void show_usage(FAR const char *progname, int errcode)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int sz_main(int argc, FAR char **argv)
#endif
{
enum zm_xfertype_e xfrtype = XM_XFERTYPE_NORMAL;
enum zm_option_e xfroption = XM_OPTION_REPLACE;