Gregory Nutt
b65c3dac0e
netutils/netlib/netlib_getarptab.c: Misc fixes from initial testing with the 'arp -t' commeand.
2019-11-03 19:29:20 -06:00
Gregory Nutt
400995dec6
nshlib/nsh_netcmds.c: Add a -t option to the arp command which will enable printing the entire ARP table.
2019-11-03 16:19:14 -06:00
Gregory Nutt
29160741d8
apps/nshlib/README.txt: Update to include the new rptun command.
2019-11-03 09:50:13 -06:00
Gregory Nutt
c3dd0b9c06
apps/nshlib/README.txt: Update to include the new rptun command.
2019-11-03 09:44:02 -06:00
ligd
611bc6c139
apps/nshlib: Add rptun cmd for boot remote core.
2019-11-03 09:36:49 -06:00
Xiang Xiao
93017735ef
apps/nshlib/nsh.h: nsh: Remove the redundant check for netcmd. Checking FS_PROCFS and FS_PROCFS_EXCLUDE_NET is enough and make the type of network device could be shown by ifconfig.
2019-11-03 09:33:57 -06:00
Gregory Nutt
0dde32fb43
nshlib/nsh_romfsetc.c and graphics/traveler/trv_romfs.c: Replace direct calls to romdisk_register() with indirect calls via boardioctl(BOARDIOC_ROMDISK). This not only fixes the violation of the portable POSIX OS interface, but also permits use of ROM disks in PROTECTED and KERNEL modes. There are still multiple illegal calls to romdisk_register() from code under apps/examples. These all must also be converted to use boardioctl(BOARDIOC_ROMDISK) someday.
2019-10-26 13:47:03 -06:00
Gregory Nutt
06acc559a1
apps/nshlib: Tighten up some of the conditional logic for mkrd.
2019-10-26 12:26:16 -06:00
Gregory Nutt
e0dff13094
apps/nshlib/Kconfig and examples/mount/Kconfig: Automatically select CONFIG_DRVR_MKRD is it is needed by the configuration.
2019-10-26 11:45:00 -06:00
Gregory Nutt
0bc798c7a9
apps/examples/mount: Replace illegal call to ramdisk_register() with a call to boardctl(BOARDIOC_MKRD).
2019-10-26 10:22:34 -06:00
Gregory Nutt
c8a066f699
apps/nshlib/nsh_fscmds.c: The NSH mkrd command was in violation of the NuttX portable POSIX interface. it was calling the internal OS function ramdisk_register() directly. No only is this a violation of the interface specification, but also prevents use of mkrd in PROTECTED or KERNEL buils.
...
With this commit, the NSH mkrd command now used the BOARDIOC_MKRD boardctl() command. This command is availabe in all build modes. The effect of this change is to move the hear of the NSH mkrd command into to OS and provide user-space access via boardctl().
2019-10-26 09:42:51 -06:00
Xiang Xiao
403b4a0178
In all Make.defs files, append CONFIGURED_APPS with the consistent ifeq/ifneq.
2019-10-17 11:42:49 -06:00
Xiang Xiao
7808eb62d2
apps/: In all Make.def files, append to CONFIGURED_APPS patch with the absolute path.
2019-10-17 11:33:59 -06:00
Gregory Nutt
3a23523147
Makefiles: This reverts part of commit cf0365ea9
. It restores 'conditional' inclusion of TOPDIR/Make.defs. Otherwise all make targets fail if the board has not been configured. That is okay most of the time, but not for things like clean and distclean which should not depend on being configured.
2019-10-15 09:25:48 +08:00
Dave Marples
b4134a674d
nshlib/ and system/cle: Add basic color support to the CLE editor.
2019-10-12 00:47:29 +08:00
Xiang Xiao
cf0365ea92
Clean up Makefile under apps folder no functional changes.
2019-10-04 08:35:46 -06:00
Xiang Xiao
63c3772888
CONFIG_BUILD_LOADABLE: Check the kernel function callable by BUILD_KERNEL instead of BUILD_LOADABLE since BUILD_LOADABLE could be turned on even with BUILD_FLAT.
2019-10-03 14:10:32 -06:00
Gregory Nutt
3457c30c33
apps/nshlib: Fix some typos and minor coding staqndard problems.
2019-09-12 15:38:53 -06:00
Gregory Nutt
ac61c18fcc
Move apps/builtins/builtin_forindex.c to nuttx/libs/libc/builtin since it is required by kernel logic as well. Other changes account for movement of builtin.h from nuttx/include/nuttx/binfmt/built.h to nuttx/include/lib/builtin.h.
2019-08-23 09:12:45 -06:00
Gregory Nutt
e6ba3ccff8
Update comments, README's, etc. to reflect changes to nuttx/boards directory reorganization.
2019-08-09 08:40:22 -06:00
Gregory Nutt
dd36f7ca4d
Fix paths in README.txt files which have changed due to the restructuring of nuttx/boards directory.
2019-08-05 10:22:56 -06:00
Gregory Nutt
2a8dccb75d
Change name configs/ to boards/ in comments, Documentation, Tools, etc.
2019-08-05 07:33:16 -06:00
Gregory Nutt
49e08ca3a9
apps/nshlib/nsh_fsutils.c: As noted by David S. Alessio, 'cat' should not output any additional newline at the end of the cat'ed file content. This was done to assure that the NSH prompt was presented on a new line. However, that is not the correct behavior of 'cat' per the IEEE std: "The standard output shall contain the sequence of bytes read from the input files. Nothing else shall be written to the standard output." Reference: https://pubs.opengroup.org/onlinepubs/009695399/utilities/cat.html
...
This commit changes the function nsh_catfile() which underlies the 'cat' command and well as other NSH commands. Although this is the correct behavior for 'cat' it may not be the correct behavor for other commands implemented via nsh_catfile(). That remains to be determined.
2019-07-29 20:49:39 -06:00
Gregory Nutt
24e590b072
apps/nshlib/nsh_ddcmd.c: Seemingly nonsense change but somehow works around a compilation error using the ZDS-II toolchain. It was claiming that vtbl was undefined indd_outfopen().
2019-06-03 11:32:56 -06:00
Gregory Nutt
8c36ec3f33
nshlib/nsh_parse.c: Fix a warning about an uninitialized variable from the ZDS-II compiler.
2019-06-03 09:29:44 -06:00
Gregory Nutt
6c815a8d48
apps/nshlib/nsh_ddcmd.c: Cosmetic edition of FAR
2019-06-03 09:19:09 -06:00
Gregory Nutt
7409dd57bb
Fix a warning found in build testing.
2019-05-22 08:22:12 -06:00
Gregory Nutt
dd35a7cacc
apps/: Removed all references to CONFIG_DISABLE_POLL. The standard POSIX poll() can not longer be disabled.
2019-05-21 19:08:12 -06:00
Valmantas Paliksa
5cad41c973
apps/nshlib: Fix all places where cle() and readline() are used. readline() returns EOF on a failure. cle() returns a negated errno value. Checking only for EOF causes failues to be missed (and infinite loops ensuing).
2019-05-21 08:43:09 -06:00
Gregory Nutt
8f5944c4a8
Squashed commit of the following:
...
include/ and netutils/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
nshlib/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
system/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
testing/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
examples/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
2019-04-29 14:53:38 -06:00
Gregory Nutt
94a0d92b54
This commit removes the private network initialization logic from NSH and puts in a common location at apps/netutils/netinit. Now that netork initialization logic can be used by applications that do not include NSH.
...
Squashed commit of the following:
apps/nshlib: Remove NSH initialization. Now uses the common apps/netutils/netinit logic (which was cloned from nshlib to begin with).
apps/netutils/netinit: Clone network initialization logic from NSH to this directory so that it can be available for general use.
2019-04-29 10:22:56 -06:00
raiden00pl
0a6726bc3e
Merged in raiden00/apps (pull request #174 )
...
Small fixes
examples/pca9635/pca9635_main.c: fix compilation
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-04-28 11:33:21 +00:00
Valmantas Palikša
5484407877
nshlib/nsh_timcmds.c: Initialized struct tm cause 'date -s' to fail.
2019-03-18 08:04:40 -06:00
Gregory Nutt
b2f46360de
apps/: Remove/replace all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0. That value is always greater than zero now. In places just replace with #ifdef CONFIG_NET.
2019-02-11 16:23:55 -06:00
Gregory Nutt
fe41f72a95
Fix typo found in building testing. There will probably be a few more.
2019-02-11 13:25:48 -06:00
Gregory Nutt
9db029e318
The file system can no longer be disabled. Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS==0
2019-02-11 13:10:10 -06:00
Gregory Nutt
b1352458ab
apps/nshlib/nsh_netinit.c: Update for changes to signal notification structures.
2019-01-27 16:45:56 -06:00
David Sidrane
7db2a352fb
nshlib/nsh_console.h: Fix copy paste errors. Some Kconfig configuration names needed CONFIG_ prefix.
2019-01-24 06:36:26 -06:00
Gregory Nutt
6fb399fd65
Update README
2019-01-19 08:54:01 -06:00
Masayuki Ishikawa
060a8fff4b
Merged in masayuki2009/nuttx.apps/fix_redirection_error (pull request #167 )
...
apps/nshlib: Fix buffer overrun when redirected to a file.
SAVE_SIZE must be the same as sizeof(struct serialsave_s)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-19 12:38:49 +00:00
Anthony Merlino
7cde7e921d
Merged in antmerlino/apps/addroute-default-gw (pull request #166 )
...
addroute: Adds command for setting default gateway. addroute default <ipaddr> <interface>
Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-13 14:20:15 +00:00
Ken Pettit
e08d100919
apps/nshlib/nsh_parse.c: Fixes an error in the NSH parser. There was a bug when executing an nsh shell script which contains a redirection. When the command in the script is executed, it sets the vtbl->np.np_redirect flag (as it should), but then doesn't restore it, leaving it set at the end of the script execution. Then the vtbl->np.np_redirect flag is set when the 'sh' command completes, causing a restore from un-initialized variables, thus leading to a crash. See the code snippet below for an example test case.
...
Test case:
NuttShell (NSH)
nsh> mkrd -s 1024 40
nsh> mkfatfs /dev/ram0
nsh> mount -t vfat /dev/ram0 /tmp
nsh> echo "echo 1 > /dev/null" > /tmp/test.sh
nsh> cat /tmp/test.sh
echo 1 > /dev/null
nsh> sh /tmp/test.sh
...
The nsh prompt doesn't get printed. You can type a couple of commands, but then the system will crash because of bad pointers.
2019-01-12 10:56:48 -06:00
Gregory Nutt
eaec674e7b
apps/nshlib/nsh_command.c: In all multi-column help output, make the number of rows presented dependent upon the maximum width of the widest column.
2019-01-11 09:21:59 -06:00
Gregory Nutt
d789194836
apps/nshlib/nsh_command.c: In all multi-column help output, calculate an optimal column width rather than using a hard-coded width that may or may not be appropriate.
2019-01-11 08:59:36 -06:00
Gregory Nutt
806ba4ee83
apps/nshlib/nsh_command.c: Fix a few long lines
2019-01-11 07:39:23 -06:00
Ken Pettit
a6d056cf76
apps/nshlib/nsh_command.c: display built-in apps using multi-column mode like the nsh commands
2019-01-11 07:35:04 -06:00
Gregory Nutt
3257ea42d5
apps/nshlib/nsh_parrse.c: Correct some coding standard problems in last PR.
2019-01-06 10:00:19 -06:00
Daniel Agar
c700bf9739
Merged in dagar/nuttx-apps/pr-nshlib (pull request #163 )
...
[WIP] nshlib add var expansion in nsh parse
Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-06 15:52:18 +00:00
GregoryN
3bf4b6d245
Merged altconsole into master
2018-12-08 18:53:54 -06:00
David Sidrane
8eb249eea5
apps/nshlib/nsh_romfsetc.c: Add support for CROMFS start-up script
2018-12-06 15:41:18 -06:00
Alan Carvalho de Assis
368f14852e
apps/nshlib: Change the way SLCD is supported. Works better
2018-11-30 18:05:18 -06:00
Lwazi Dube
2b8685b63f
wireless/bluetooth/btsak/btsak_main.c: Fix address parsing
2018-11-30 06:28:36 -06:00
Gregory Nutt
c0f64622e4
nshlib/nsh_slcd.c: Use file descriptor zero for the NSH console.
2018-11-30 06:18:44 -06:00
Alan Carvalho de Assis
c21d640eaf
apps/nshlib: Add support to use SLCD as NSH Console
2018-11-29 18:42:02 -06:00
Lwazi Dube
6af45bdee0
wireless/bluetooth/btsak: Fix some errors in btsak
2018-11-27 08:02:43 -06:00
Xiang Xiao
2db0252e61
nshlib/nsh_envcmds.c: Fix warning g_oldpwd defined but not used [-Wunused-const-variable]
2018-11-07 11:28:28 -06:00
Xiang Xiao
6aee984c91
nshlib/nsh_netinit.c: Move call netlib_icmpv6_autoconfiguration() into nsh_net_bringup() like DHCP
2018-11-07 11:25:39 -06:00
Xiang Xiao
173c985395
nshlib/nsh_fsutils.c: nsh_catfile() should not append '\n' if the last char in file is already '\n'
2018-11-07 11:23:07 -06:00
ligd
19dc7cd3b3
nshlib/nsh_console.c: Add fflush to nsh_consolewrite(). This resolves this problem:
...
> cat /dev/ttyCP &
> echo ls >/dev/ttyCP
Can't get the 'ls' result immediately, because 'cat' cmd uses nsh_consolewrite() and that uses fwrite with no fflush. We can get the 'ls' result after type '\n', because nsh will fflush output when get '\n'.
2018-11-07 11:18:03 -06:00
Gregory Nutt
b5e032e050
apps/nshlib/README.txt: Another trivial update.
2018-10-02 13:47:16 -06:00
Gregory Nutt
3a474c573c
apps/nshlib/README.txt: Trivial correction in comparison to Bash behavior.
2018-10-02 12:15:07 -06:00
Gregory Nutt
cf6c6a9556
apps/nshlib: If CONFIG_NSH_VARS=y, the NSH 'set' command with not argument will list all of the local NSH variables.
2018-10-02 11:54:18 -06:00
Gregory Nutt
cb982ea8df
apps/nshlib: Eliminate more new warnings found in build testing.
2018-10-02 11:16:15 -06:00
Gregory Nutt
2bc4d1e8e2
apps/nshlib/nsh_parse.c: Fix a warning (really a bug) detected in build testing.
2018-10-02 11:08:17 -06:00
Gregory Nutt
7f7b728231
apps/nshlib/nsh_parse.c: Correct an error in conditional compilation found in build testing.
2018-10-02 10:21:33 -06:00
Gregory Nutt
8b01ea4434
Update a README/Improve some C comments.
2018-10-02 06:53:16 -06:00
Gregory Nutt
65e0b791b7
apps/nshlib/nsh_envcmds.c: Once an NSH variable has been promoted to an environment variable, subsequent set operations should act on the environment variable rather than creating a new NSH variable that shadows the environment variable.
2018-10-01 16:22:04 -06:00
Gregory Nutt
ee01445aa2
apps/nshlib: Fix an incorrect usage of a configuration variable in a previous commit.
2018-10-01 15:44:41 -06:00
Gregory Nutt
23b32baf98
apps/nshlib: Update README.txt
2018-10-01 14:28:07 -06:00
Gregory Nutt
15da89649d
Damn. Forgot to add a file before the last commit.. AGAIN.
2018-10-01 13:31:06 -06:00
Gregory Nutt
e9edfd064f
apps/nshlib: Add support for NSH local variables if CONFIG_NSH_VARS are set. These are like environment variables but are local to NSH. The importance of this is that these variables are *not* inherited when NSH creates a new task. The new command 'export' was added. In this case, the NSH variable will be promoted to an environment variable and will then be inherited by any tasks executed by NSH.
2018-10-01 13:30:25 -06:00
Gregory Nutt
d376723ad2
Trivial typo fix
2018-09-30 11:16:10 -06:00
Gregory Nutt
14a262001d
apps/nshlib: Add support for the 'env' command.
2018-09-30 10:55:23 -06:00
Gregory Nutt
4bbfdbb9fa
nshlib/, examples/: Update to show newer file system object types returned by stat().
2018-09-22 13:24:24 -06:00
Eunbong Song
2985d3f42b
apps/nshlib: Correct maximum number of arguments that can be provided to the mksmartfs command.
2018-09-18 07:24:24 -06:00
Gregory Nutt
42e99d59ce
Correct some network-related configuration variable names. All *_MTU defines were changes to *_PKTSIZE gut that was not reflected in apps/
2018-09-14 07:06:06 -06:00
Gregory Nutt
c5edf40542
apps/examples/udpblaster: Add option to use poll() on output (only). Also picks up some fixes to various typographical errors.
2018-09-14 06:59:23 -06:00
anchao
b5cfd93444
apps/: Modification to build system: Unified application compilation rules
2018-09-03 09:29:56 -06:00
Gregory Nutt
3e396d8e4e
apps/nshlib: Fix a copy paste error introduced in commit 9a42be5e9b
2018-09-02 15:33:22 -06:00
Gregory Nutt
9a42be5e9b
apps/nshlib: When using waitpid() to wait for a built-in application or a file application to exit. Add the WUNTRACED options to so the the waitpid() call will also be awakened if the waited-for task is stopped as well.
2018-09-02 14:19:30 -06:00
Juha Niskanen
cef306e335
apps/nshlib/nsh_console.c: Do not dereference NULL 'pstate'
2018-08-29 06:18:30 -06:00
Gregory Nutt
c4512f5ddf
apps/nshlib: Fix problem in last commit. CONFIG_BOARDCTL_FINALINIT=y is an insufficient condition for calling boardctl(BOARDIOC_FINALINIT, 0). Also need CONFIG_NSH_ARCHINIT=y.
2018-08-28 15:48:51 -06:00
ligd
93f1c13b62
apps/: Call BOARDIOC_FINALINIT after start-up script (or immediately after BOARIOC_INIT is there is no start-up script).
2018-08-28 15:44:03 -06:00
Gregory Nutt
bb4c5c49ef
Replace usage of SIGKILL with SIGINIT
2018-08-28 12:02:26 -06:00
anchao
3c2396116d
apps/nshlib/Kconfig: Move 'option modules' from NSH_FILE_APPS to BUILD_LOADABLE
2018-08-27 07:04:29 -06:00
ligd
d36e1c87fe
apps/nshlib: Add control-C support for terminating built-in and exec'ed file tasks.
2018-08-26 07:48:38 -06:00
anchao
220653f21c
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.
2018-08-23 11:06:15 -06:00
Xiang Xiao
dbf152cbeb
apps/nshlib: (1) NSH prompt string is now configurable. nsh> is still the default. (2) Increase the default configuration for the maximum number of command line arguments to 7 (CONFIG_NSH_MAXARGUMENTS). This is needed for 'mount' with the -o option.
2018-08-23 07:34:30 -06:00
Xiang Xiao
8116d10da3
apps/fsutils/mksmartfs: Add a check to see if the SmartFS is already formatted. apps/nshlib: Add a force flag (-f) to mksmartfs. SmartFS will be formatted only if (1) the FLASH does not already hold a SmartFS, or (2) the force flag is set
2018-08-23 07:14:30 -06:00
ligd
bee98898f0
apps/nshlib: Expand reboot and poweroff commands to include a second, optional mode argument
2018-08-23 06:21:47 -06:00
Gregory Nutt
2f982e9c77
Revert "Squashed commit of the following:"
...
This reverts commit 25b92edd9f
.
2018-08-22 12:06:32 -06:00
anchao
25b92edd9f
Squashed commit of the following:
...
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.
2018-08-22 09:30:38 -06:00
Gregory Nutt
32f50985a6
Fix references to examples/nsh left in previous commit.
2018-08-18 09:33:25 -06:00
Gregory Nutt
a57610c2c4
Remove trailing spaces at the end of lines.
2018-08-13 07:47:26 -06:00
Gregory Nutt
f2ef84f048
apps/nshlib: Back out 516a743344
. While the change is fuly functional and adds a pleasing symmetry to the control commands, it is also redundant and serves no real purpose other than requiring more FLASH.
2018-08-12 06:15:29 -06:00
Gregory Nutt
f759ad3196
Backs out most of commit 093391fcff
. I was confused. I re-emplemented a feature that already existed. Silly me.
2018-08-11 10:47:46 -06:00
Gregory Nutt
a7f4a9db23
Revert "apps/nshlib/nsh_command.c: Update help text."
...
This reverts commit 0511002543
.
2018-08-11 10:39:48 -06:00
Gregory Nutt
0511002543
apps/nshlib/nsh_command.c: Update help text.
2018-08-11 10:34:57 -06:00
Gregory Nutt
093391fcff
apps/nshlib/nsh_test.c: The test command will now accept '!' inversion when used in the form: [ ! <expression> ].
2018-08-11 10:20:03 -06:00
Gregory Nutt
ff192a4a58
apps/nshlib: I was able to cause an assertion with some typos in an testing the 'fi' command. Not an important thing, but this will protect against the assertion.
2018-08-11 09:30:53 -06:00
Gregory Nutt
5cfe9c2787
Update README file.
2018-08-11 08:21:52 -06:00
Gregory Nutt
516a743344
apps/nshlib: Extend Beat Küng's commit 888ad352eb
so that inverted logic may also be used in repeat and while loops.
2018-08-11 07:53:22 -06:00
Beat Küng
888ad352eb
Merged in bkueng/nuttx-apps (pull request #150 )
...
nsh: add inverted logic support in the form of 'if ! <cmd>'
Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-11 13:14:41 +00:00
Gregory Nutt
303629dbe4
apps/nshlib: Small parsing improvement plus some added comments.
2018-08-06 15:52:02 -06:00
Gregory Nutt
cb556d6236
apps/nshlib: Add parsing support for back-slash quoted characters. Currenlty only implemented properly if CONFIG_NSH_ARGCAT is also selected. This commit is in response to Bitbucket Issue 11 opened by Maciej Wójcik
2018-08-06 13:28:31 -06:00
Gregory Nutt
922283ee5d
Squashed commit of the following:
...
Merged in masayuki2009/nuttx.apps/loadable_app (pull request #148 )
loadable app support
* apps: Introduce a build system for loadable apps for nsh.
This PR consits of following changes. (NOTE: Changes to each
application will be provided separately)
apps/nshlib/Kconfig:
Add 'option modules' to NSH_FILE_APPS so that a user can change
an application configuration to tristate (y/n/m)
apps/Make.defs:
Override COMPILE and COMPILEXX macros to compile loadable apps.
To make loadable apps, -DLOADABLE_APP is added to the flags.
Also, introduce ELFLD to link a lodable app.
Please note that the variable 'LOADABLE' must be defined in
each application Makefile if you want to make a loadable app.
apps/Application.mk:
Add .build target in case of 'LOADABLE=y' which is used to
link a final loadable application and install the app to
apps/bin.
apps/Makefile:
Add SYMTABSRC and SYMTABOBJ variables for loadable apps which
will be generated under the apps directory.
Add make_symbols target which will be called when all applications
are installed to generate symtab_app.c which is used for
nsh to inform symbol information to the NuttX kernel.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* apps/examples/hello: Apply changes to support a lodable app.
Kconfig:
Change the application state from bool to tristate
Make.defs:
Change the condition to build. By default, the application is
not selected (i.e. 'n'), so if other states (i.e. y/m) are
selected, the application will be compiled.
Makefile:
If the application is specified to 'm', the variable 'LOADABLE'
must be defined here. Also note that other variables (PRIORITY
and STACKSIZE) can only be used for built-in apps.
hello_main.c
Add LOADABLE_APP condition to main().
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* apps/examples/helloxx: Apply changes to support a lodable app.
Kconfig:
Change the application state from bool to tristate
Make.defs:
Change the condition to build. By default, the application is
not selected (i.e. 'n'), so if other states (i.e. y/m) are
selected, the application will be compiled.
Makefile:
If the application is specified to 'm', the variable 'LOADABLE'
must be defined here. Also note that other variables (PRIORITY
and STACKSIZE) can only be used for built-in apps.
helloxx_main.c
Add LOADABLE_APP condition to main().
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-03 12:05:01 -06:00
Gregory Nutt
3403b1b0e9
apps/nshlib/README.txt: Clarify arguments to the mkrd command.
2018-06-22 11:35:44 -06:00
Gregory Nutt
36d6348368
apps/nslib: Try to eliminate and uninitialized variable warning.
2018-06-17 15:37:42 -06:00
Beat Küng
c6697c150d
Merged in bkueng/nuttx-apps (pull request #138 )
...
nsh_parse.c: fix 'while' and 'until' loop condition
The loop condition logic was inverted:
while true; do echo "test"; done
would exit immediately, while using 'until' would stay in the loop.
This is the opposite of how it is supposed to work.
The reason is that 'state' was set wrong because 'whilematch' is a bool.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-06-06 12:50:41 +00:00
Boris Astardzhiev
940b7f8a3e
apps/nshlib/nsh.h: Fix typo.. #undef not #undefine.
2018-05-14 07:24:46 -06:00
Boris Astardzhiev
2c2fc512d6
nshlib/nsh_fscmds.c: Add the -r option which can be used to specify the number of entries in the FAT12/FAT16 root directory.
2018-05-11 09:50:54 -06:00
Juha Niskanen
052a7009b3
Merged in juniskane/apps_upstream/echo_fix_pr (pull request #135 )
...
apps/nshlib: Fix echo command with zero arguments, broken after commit 8ecf618
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-04-19 04:12:51 +00:00
Juha Niskanen
c4ca133b6f
apps/nshlib: Remove non-existent CONFIG_NSH_TMPDIR from README.txt
2018-04-17 05:54:00 -06:00
Gregory Nutt
0094b411da
apps/netutils/netlib: Various fixes needed to get a clean netlib build with Bluetooth only.
2018-04-03 10:01:55 -06:00
Gregory Nutt
467a7980f0
apps/nshlib/: In netcommds.c, the UNUSED() macro may be applied to an undefined symbol when IPv6 is enabled but IPv4 is not.
2018-03-31 09:27:52 -06:00
Gregory Nutt
bb6877ed78
apps/nshlib: Fix compile error when CONFIG_NSH_DISABLESCRIPT is not defined. The field np_flags does not exist if scripting is disabled.
2018-01-22 08:32:40 -06:00
Gregory Nutt
e2e53117a5
Remove some section headers when the sections are empty.
2018-01-13 08:35:44 -06:00
Gregory Nutt
661718ee19
apps/nshlib: Add irqinfo command.
2018-01-12 17:58:44 -06:00
Gregory Nutt
d96c236b31
Revert "apps/nshlib: restore space delimiter that was removed in last change to the NSH echo command."
...
This reverts commit 7cdf9b07d8
.
2018-01-10 07:53:03 -06:00
Gregory Nutt
7cdf9b07d8
apps/nshlib: restore space delimiter that was removed in last change to the NSH echo command.
2018-01-10 07:46:24 -06:00
Gregory Nutt
99512b90db
apps/nshlib: truncate command will now use ftruncate (vs. truncate) if it had to create the file with creat().
2018-01-10 07:26:21 -06:00
Masayuki Ishikawa
8ecf618a4d
apps/nshlib: Add support for '-n' option to the echo command.
2018-01-10 07:26:20 -06:00
Masayuki Ishikawa
bd6bf35ffd
nshlib/nsh_telnetd.c: Add support for telnet character mode.
...
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2018-01-10 07:15:16 +09:00
Gregory Nutt
7a2aac8876
apps/nshlib: Add support for a truncate command. This will be used to test the new ftruncate file system support.
2018-01-04 12:52:17 -06:00
Gregory Nutt
626f41084b
apps/nshlib: Correct error introduced to conditional compilation
2017-11-14 08:42:16 -06:00
Gregory Nutt
e37f4b7004
apps/nshlib: Big simplification of last change. /proc/kmm, umm, and progmem have been replaced with a single procfs file called /proc/meminfo. The NSH free command now degenerates to a simple dump of /proc/meminfo.
2017-11-13 13:35:04 -06:00
Gregory Nutt
0cda4cec15
apps/nshlib: The free commands no longer used mallinfo() to get the state of the use heap. Two reasons: That is not useful information in the kernel build. And (2) there are other memory resources of interest in other configurations such as the Kernel heap in PROTECTED and KERNEL builds, and the prog mem uses when FLASH is used to hold modifiable data. The free command has been extended to just dump the content of procfs entries and to include all of these other memory resources of the procfs entries are available.
2017-11-13 12:55:03 -06:00
Dmitriy Linikov
dea8d93f64
Merged in hardlulz/modem-3.0-nuttx-apps/fix-compile-nsh_routecmds (pull request #118 )
...
Fixed the compilation of nsh_routecmds.c, broken after commit 6b9d23c6aa
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-11-03 12:28:19 +00:00
Gregory Nutt
7556eb3814
nshlib/: Fix some botched conditional compilation.
2017-11-02 17:13:49 -06:00
DL
bf209bcf1d
Fixed misprint in cmd_wget
2017-11-01 06:18:40 +03:00
Gregory Nutt
ef353ed632
Fix parsing of empty strings when CONFIG_NSH_CMDPARMS is not defined. Problem noted by Juha Niskanen.
2017-10-27 06:41:26 -06:00
Gregory Nutt
62f7838c5e
nshlib: Tighten up some conditional logic
2017-10-26 16:07:42 -06:00
Gregory Nutt
40d9701ea0
nshlib: Remove a dangling function that is no longer used after last mount/df chagnes
2017-10-26 13:38:30 -06:00
Gregory Nutt
1f1d114901
Update some comments
2017-10-26 13:31:57 -06:00
Gregory Nutt
3788928cbf
nshlib: df command no long uses the non-standard OS interface foreach_mountpoint(). No simply cats /proc/fs/blocks or /proc/fs/usage.
2017-10-26 13:28:37 -06:00
Gregory Nutt
20076688c2
nshlib: mount command no long uses the non-standard OS interface foreach_mountpoint(). No simply cats /proc/fs/mount when there are no arguments to the mount command.
2017-10-26 12:17:03 -06:00
Anthony Merlino
a8bf5718f5
apps/nshlib: ifconfig improvements
2017-10-24 17:26:17 -06:00
Gregory Nutt
749ea9e881
This commit removes the ping6 command from NSH and replaces it with the apps/system/ping6 built-in command. The NSH ping6 command had to be removed because it violated the portable POSIX OS interface. The apps/system/ping6 command uses the sem-standard IPPROTO_ICMP6 socket interface.
...
Squashed commit of the following:
apps/system ping and ping6: Fix a backward test.
apps/system/ping6: ping6 logic now builds without error.
apps/system/ping and ping6: Minor clean-up to configuration settings.
apps/system/ping6: Minor clean-up to be able to configure CONFIG_SYSTEM_PING6
apps/nshlib: Remove support for ping6 from NSH.
apps/system/ping6: Add IPPROTO_ICMPv6 ping6. Initial commit is simply a clone of the IPPROTO_ICMP ping logic.
Rename CONFIG_NET_ICMPv6_PING to CONFIG_NET_ICMPv6_SOCKET.
2017-10-24 11:19:41 -06:00
Gregory Nutt
bccf0092a4
nshlib: Remove some dangling IPv4 ping logic. system/ping: Add DNS hostname support.
2017-10-23 09:59:03 -06:00
Gregory Nutt
ed9dd1db53
Update a README.txt file
2017-10-23 09:22:42 -06:00
Gregory Nutt
c1ec7db8a9
This commite eliminates the ping command from NSH and replaces it with a ping 'built-in' at apps/system/ping. The original NSH version of ping violated the portable POSIX interface and, hence, had to be removed. The new system/ping command uses the new IPPROTO_ICMP AF_INET datagram sockets to implement ping.
...
Squashed commit of the following:
apps/system/ping: Fix some timing issues.
apps/system/ping: A few timing related corrections.
apps/nshlib: Remove support for the NSH 'ping' command. The implementation of that command violated the portable POSIX interface and has been replaced with a ping 'built-in' command at apps/system/ping.
apps/system/ping: Add larger payload. Verify content of echoed payload.
apps/system/ping: Various fixes for a clean compile
system/ping: Add new build structure for system ping command.
2017-10-23 08:50:01 -06:00
Gregory Nutt
35ec1b9244
Squashed commit of the following:
...
apps/fsutils/mkfatfs: New user-space fatfs appears to work fine.
apps/fsutils/mkfatfs: Move mkfatfs from the OS to here. Not fully integrated on the intial commit.
2017-10-20 12:35:19 -06:00
Gregory Nutt
976ce0550c
NSH: eliminate a warning
2017-09-27 12:05:19 -06:00
Masayuki Ishikawa
4822878990
nshlib/nsh_netcmds.c: Fix a compilation error when IPv4/IPv6 dual stack is enabled
2017-09-26 11:28:40 +09:00
Bruno Herrera
3fe720d1e2
Fixes for problems found by Coverity in the apps/ repository:
...
nshlib/nsh_parse.c: Avoid truncating the strcmp result into a unsigned char variable.
nshlib/nsh_netcmds.c: Check for valid hostip before using it.
nshlib/nsh_ddcmd.c: Fix resouce leak when 'if=' or 'of=' params are repeated in the command line. For example:
dd if=/dev/null if=/dev/zero of=/dev/null or
dd if=/dev/zero of=/dev/zero of=/dev/null
2017-09-25 07:34:34 -06:00
Gregory Nutt
cdf0528933
examples/dac: Lets use printf instead of _info in application code.
2017-09-01 07:39:39 -06:00
Gregory Nutt
3367bde8fe
NSH: Add conditions so that ifconfig and ifup will not be disabled if we are using only PF_IEEE802154
2017-08-21 09:32:07 -06:00
Gregory Nutt
41ce937ed0
Changes to netlib and nsh so that you build build with PF_IEEE802154 enabled and 6LoWPAN disabled.
2017-08-20 09:09:47 -06:00
Gregory Nutt
767b29335c
Eliminate some warnings found in build testing.
2017-08-13 12:25:22 -06:00
Gregory Nutt
7a8561728c
The last change added .PRECIOUS: $(BIN) to everyway Makefile in hopes the libapps.a will not be deleted on Control-C (unproven so far). However, $(BIN) may contain back slashes in some build platforms and that causes problems for make: It can't handle the backslashes in the .PRECIOUS dependency list. $(BIN) replaced with ../../libapp.a, where the number of ../ depends on the depth of the Makefile in the apps/ source tree.
2017-08-13 11:03:17 -06:00