Commit Graph

488 Commits

Author SHA1 Message Date
Gregory Nutt
9b951b4dd8 apps/nshlib: nsh_getdirpath(), use snprint instead of sprintf to avoid possibility of buffer overrun. Noted by Chung Hwan Kim. 2016-10-11 17:35:31 -06:00
Gregory Nutt
2c8ac4440a apps/nshlib: Don't try to flush output streams if stdio buffered I/O is not supported. 2016-10-06 08:36:15 -06:00
Alan Carvalho de Assis
cdedb412ed apps/nshlib: Add printf command to NSH, e.g., controlling /dev/userleds from command line: nsh> printf \x01 > /dev/userleds 2016-10-01 07:44:15 -06:00
Neil Hancock
7fc401d3c1 Correct an assertion 2016-09-12 07:26:37 -06:00
Aleksandr Vyhovanec
e832e73b99 nshlib/: Fix missing semicolon; include string.h. 2016-09-05 07:05:17 -06:00
Gregory Nutt
8cfa1dbd3b The previous commit was reverted. My concern was misplaced: There is a guard boolean to prevent running the init script more than once. This comment just restores some of the good cosmetic changes that were included in the reverted commit. 2016-08-25 14:28:25 -06:00
Gregory Nutt
4eda22b4db Revert "This commit adds nsh_consolechild(). I noticed that there are several examples that call nsh_consolemain.c to create to create a new NSH session. That will not always work because nsh_consolemain() performs the one-time initialization needed by the NSH library: Mounting, reading, and running the start-up script, configuring USB tracing. Some of those actions will cause failures if attempted twice."
This reverts commit 4d364d836a.
2016-08-25 14:19:36 -06:00
Gregory Nutt
4d364d836a This commit adds nsh_consolechild(). I noticed that there are several examples that call nsh_consolemain.c to create to create a new NSH session. That will not always work because nsh_consolemain() performs the one-time initialization needed by the NSH library: Mounting, reading, and running the start-up script, configuring USB tracing. Some of those actions will cause failures if attempted twice.
Here are some offenders: examples/cc3000/shell.c, examples/nsh/nsh_main.c, examples/nxterm/nxterm_main.c, and examples/pty_test/pty_test.c.  It is possible that for some of those, that represents the first call to nsh_consolemain().  But probably not.

To give other initialization options, I added nsh_consolechild() which is identical to nsh_consolemain() other than it omits all of the one-time initialization.  Of course, you would not get the result that you wanted if nsh_consolechild() were called without nsh_consolemain().
2016-08-25 14:14:23 -06:00
Gregory Nutt
e39cfc97c7 Add logic to support an NSH-specific system command 2016-08-25 11:34:36 -06:00
Mateusz Szafoni
6ff8074532 apps/nshlib/nsh_syscmds.c: missing semicolon 2016-08-25 14:26:33 +02:00
Gregory Nutt
c9378ef87e Fix hex representation of IP address. Also noted by Michał Łyszczek 2016-08-19 06:35:29 -06:00
Gregory Nutt
b9d56991f3 Update some comments. Remove trailing whitespace noted by Michał Łyszczek 2016-08-19 06:25:42 -06:00
Gregory Nutt
823b8c3981 FIFO_SIZE vs PIPE_SIZE 2016-08-04 16:25:47 -06:00
Gregory Nutt
fff8a91e52 Oops, wrong kind of comments 2016-08-04 13:32:19 -06:00
Gregory Nutt
e4914622b3 NSH: cmd_mkfifo depend son CONFIG_DEV_PIPE_SIZE > 0 2016-08-04 12:57:02 -06:00
Gregory Nutt
d5b7268d95 ramdisk.h moved from include/fs/nuttx/ to include/nuttx/drivers. 2016-07-20 14:02:41 -06:00
Gregory Nutt
7d517413cb Things that use mkfifo() and pipe() depend on CONFIG_PIPES 2016-07-20 10:46:05 -06:00
Gregory Nutt
b1230ce87a NSH: Eliminate a warning about discarding const 2016-07-15 08:31:47 -06:00
David Alessio
f48b3c73b0 When Priority Inheritance is enabled, the format of /proc/<PID>/status changes to show both the current priority and the thread’s base priority. This messes up the format of cmd_ps.
The attached patch fixes cmd_ps to ignore the base priority.
2016-07-15 07:01:02 -06:00
Gregory Nutt
dd7c4c9493 NSH library: Don't show stack usage is CONFIG_STACK_COLORATION is not enabled. 2016-07-13 07:06:32 -06:00
David Alessio
1d8ef23b88 Use fixed point math for cmd_ps removing dependency on floating point libs. 2016-07-12 06:48:30 -06:00
Sebastien Lorquet
2cbad44f1d This is the Pokemon patch to change all includes fronm <apps/bla/bla.h> to "bla/bla.h" 2016-07-11 10:11:18 -06:00
David Alessio
63ff107419 Fix a typo a a preceding change. 2016-07-11 06:56:34 -06:00
David Alessio
f553fd1316 Recent enhancements to cmd_ps trips a floating point exception if LIBC_FLOATINGPOINT is not defined (at least on Cortex M4 w/ hardfloat). I’m using a buildroot gcc configured to support Cortex-M4F and the hard float ABI, target files are compiles with: -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard. I’m not sure the best way to address this, but the attached patch file is the first that comes to mind. Note, I added the float qualifier ‘F’ after a few constants to prevent the compiler from promoting the multiplication and division to double (expensive on M4F) then demoting to single float for the store. (sorry, it’s one of my many pet peeves ;)
`
2016-07-10 17:49:58 -06:00
David Sidrane
6eab2b7811 Take 2 2016-07-01 09:45:00 -10:00
Gregory Nutt
97e41cdcc5 Add a missing blank line 2016-07-01 13:27:15 -06:00
Gregory Nutt
57a0f88728 Revert "Review of last PR"
This reverts commit 0e4c247e1d.
2016-07-01 13:26:34 -06:00
Gregory Nutt
0e4c247e1d Review of last PR 2016-07-01 13:22:36 -06:00
David Sidrane
cbe1d33786 Allow stack usage to be disabled on contrained systems 2016-07-01 08:59:46 -10:00
Gregory Nutt
f48a813e0e Move apps/include/builtin.h to apps/include/builtin/builtin.h 2016-07-01 07:08:03 -06:00
Gregory Nutt
0e76ca7474 Move apps/include/nsh.h to apps/include/nshlib/nshlib.h 2016-07-01 06:59:23 -06:00
Gregory Nutt
cd741c82cf apps/include: Move all header files associated with modules in apps/system to apps/include/system 2016-07-01 06:48:22 -06:00
Gregory Nutt
8a03660c72 Remove apps/system/usbmonitor. It has been moved to nuttx/drivers/usbmonitor. 2016-06-30 13:13:05 -06:00
Frank Benkert
65e050dbfb NSH: PS-Command: print out the stack usage if stack coloration is enabled. 2016-06-30 07:28:42 -06:00
Gregory Nutt
0559581b91 Trivial changes after review of PR 2016-06-27 11:36:34 -06:00
Mateusz Szafoni
d93e8e5c17 Remove references to CONFIG_SYSLOG 2016-06-27 18:39:55 +02:00
Gregory Nutt
a2a9e20c65 Move NSH stuff out of nuttx/configs/Kconfig to here. Why was it in the NuttX tree. 2016-06-24 07:47:03 -06:00
Gregory Nutt
fa4cd10d33 Trivial modification of debug statement 2016-06-23 08:05:06 -06:00
Gregory Nutt
bb06f7368f Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info(). 2016-06-20 11:48:15 -06:00
Gregory Nutt
5098539063 Add _ to front of remaining debug macros 2016-06-16 12:12:34 -06:00
Gregory Nutt
cc03ecefc8 Rename err() to _err() 2016-06-16 11:44:22 -06:00
Gregory Nutt
65899c99e6 apps/nshlib: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. 2016-06-14 14:18:07 -06:00
Gregory Nutt
586b0aa7e0 Change names of *dbg() * *err() 2016-06-11 15:51:27 -06:00
Gregory Nutt
f4bae25e32 Rename *lldbg to *llerr 2016-06-11 14:55:13 -06:00
Gregory Nutt
468bdcf8e6 Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES 2016-06-11 14:13:39 -06:00
Gregory Nutt
344c92e2a4 Replace all occurrences of vdbg with vinfo 2016-06-11 11:55:38 -06:00
Gregory Nutt
56e75e9db8 Rename CONFIG_DEBUG_VERBOSE to CONFIG_DEBUG_INFO 2016-06-11 11:50:38 -06:00
Sebastien Lorquet
d2aa24ad88 Make sure that APPNAME is defined in all Makefiles that generate applications 2016-06-09 10:51:04 -06:00
Gregory Nutt
a9d57ca022 Merged in marten_svanfeldt/nuttx-apps-public/for_upstream/nsh_netinit (pull request #43)
Make NSH net-initialization be a configuration option
2016-06-09 09:25:27 -06:00
David S. Alessio
bfd5ca7cd2 NTP Client: All retries; Add initialization in NSH network startup logic. 2016-06-09 08:18:49 -06:00