Commit Graph

728 Commits

Author SHA1 Message Date
Ouss4
a1b8ad9190 system/readline/readline_common.c: Fix nxstyle issues. 2020-08-22 05:11:02 -07:00
Xiang Xiao
9d80399bd5 nsh: Accept the command line arguments like sh
Usage: nsh [<script-path>|-c <command>]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ifb76b27e7fd09d26b1f6e48c391fed0972018041
2020-08-19 14:32:53 -07:00
spiriou
18158ed271 system: add libuv port for NuttX 2020-08-17 11:09:47 -03:00
Oleg Evseev
fcd3937d7c system/cu: refactor, add option -c to disable \n -> \r\n conversion
option -c will disable \n -> \r\n conversion both for serial device and console if it is a tty

refactor: use only one function to set termios parameters, use termious related code and options only if CONFIG_SERIAL_TERMIOS is defined
2020-08-14 00:58:55 +01:00
Xiang Xiao
e6c5ff9208 Remove the unnecessary touch and clean from Makefile
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-11 19:10:19 +01:00
SPRESENSE
63cd701958 Makefile: Unify ROOTDEPPATH into DEPPATH
DEPPATH is commonly used in nuttx repo, so it to be the same with them.
2020-07-29 15:22:20 +02:00
SPRESENSE
fb26ef28c6 system/hex2bin: Fix compilation error
Avoid overwrite the PROGNAME.
2020-07-29 15:22:20 +02:00
SPRESENSE
088df5f156 system: Fix typos
Fix typos in following files:

 - system/setlogmask/Kconfig
 - system/tee/Makefile
 - system/telnet/Makefile
 - system/spi/Kconfig
2020-07-29 15:22:20 +02:00
Masayuki Ishikawa
f6aa7340bc system: taskset: Replace license header with Apache License 2.0
Summary:
- This commit replaces license headers under system/taskset.

Impact:
- No impact

Testing:
- Buid check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-29 01:05:31 -05:00
Maciej Wójcik
21049ece6e Rewritten READMEs to Markdown 2020-07-25 01:01:51 -07:00
Maciej Wójcik
51e6645f71 Rename README and README.txt to README.md 2020-07-25 01:01:51 -07:00
Xiang Xiao
deaa6c5b7b build: Replace $(TOPDIR)/Make.defs with $(APPDIR)/Make.defs
and move NUTTXLIB defintion to the common place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-09 15:17:37 -03:00
Xiang Xiao
7789bbb470 zmodem: Remove CONFIG_HAVE_INLINE from compiler.h
follow up the kernel side change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-06 01:22:42 +01:00
Xiang Xiao
b217de70e5 apps: Remove all stuff related to CONFIG_xxx_CXXINITIALIZE
since it is moved to the central place in nuttx side instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I544d6110f1ca6460f7c82f970870aa9b1e7ab3dd
2020-07-01 10:03:12 -06:00
Masayuki Ishikawa
fed7a53ef5 system: nxrecorder: Refactor nxrecorder.c
NOTE: Remove redundant code regarding audio buffer configuration

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-17 13:04:23 +08:00
Gregory Nutt
4f044a4342 system/sched_note/note_main.c: Add interrupt/syscall call decode. 2020-06-16 20:43:18 +01:00
Masayuki Ishikawa
2282310483 system: nxrecorder: Add O_TRUNC when creating a file
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-16 17:00:24 +08:00
Matias Nitsche
853439f0e7 composite: nxstyle fixes 2020-06-15 21:21:58 +01:00
Matias Nitsche
22d5712a5a composite: do not require CDCACM driver to be set, composite interface is generic 2020-06-15 21:21:58 +01:00
YAMAMOTO Takashi
faba0249c1 Include malloc.h instead of stdlib.h for mallinfo()
Adapt to the change in the main repo.

mallinfo is meant to be API compatible with Linux,
where it's provided by malloc.h.

(I think the API actually originated with System V. I don't
remember how it was there though. Anyway, I guess the
compatibility with Linux is more important than System V
these days.)
2020-06-15 07:21:52 -06:00
Masayuki Ishikawa
1d4dc43e73 system: nxrecorder: Fix compile warnings in nxrecorder.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-10 18:15:08 -07:00
Masayuki Ishikawa
2ba9fd55af system: nxplayer: Refactor nxplayer.c
NOTE: Remove redundant code regarding audio buffer configuration

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-05 15:21:02 +08:00
Xiang Xiao
d28dcfbee3 zmodem: Fix the build break and warning for host binary
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If6b324c20fcb245633f3bdc9000bc48f581c7dc6
2020-06-03 13:07:11 +01:00
YAMAMOTO Takashi
6205eb01f2 remove duplicated g_wordsize 2020-05-25 14:42:58 +08:00
Xiang Xiao
69f013e74e build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 15:56:35 +01:00
Xiang Xiao
ea135b89c6 build: Replace all -I to INCDIR
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-21 17:43:42 +01:00
Xiang Xiao
ead498a788 build: Remove the workaround for the inexistence of .config/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-21 17:43:42 +01:00
Masayuki Ishikawa
8d1f2d52da system: nxplayer: Introduce max host and file name for http url
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-21 18:48:02 +08:00
Xiang Xiao
9be0be5d47 build: host executable should use HOSTEXEEXT not EXEEXT
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 08:58:10 -06:00
Xiang Xiao
6a26547dec build: Move INCDIROPT to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:37:24 -06:00
Ouss4
cc2ac7452c system/netdb/netdb_main.c: Eliminate a warning when
CONFIG_NETDB_HOSTFILE is not set.
2020-05-14 16:40:12 -06:00
Gregory Nutt
b2d8c501f6 Remove use of set_errno() from application code.
The normal assignment errno = errcode should work fine now.
2020-05-07 22:23:19 +01:00
Xiang Xiao
4389885cf6 Move usrsock_rpmsg from system to netutils folder
This is a more suitable location

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-06 08:59:53 -06:00
Xiang Xiao
7a99d62ca1 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaox
iang@xiaomi.com>
2020-05-06 07:31:10 -06:00
Xiang Xiao
8a1f5ee34c debug: Reduce CONFIG_CPP_HAVE_VARARGS usage
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-06 07:31:10 -06:00
Xiang Xiao
547bad9e2a Remove the unnecessary BUILD_FLAT dependence from Kconfig
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-29 11:46:53 -06:00
Xiang Xiao
dcc620e6b8 Kconfig: Change !BUILD_PROTECTED && !BUILD_KERNEL to BUILD_FLAT
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-29 07:23:51 -06:00
Xiang Xiao
ef19ca0243 cle.c: Fix warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-27 15:29:37 +02:00
Xiang Xiao
f55c5b67ee usrsock: Fix warning: the incompatible pointer type
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-27 15:29:37 +02:00
Alin Jerpelea
2749e6467b system: nxplayer & nxrecorder: nxstyle fixes
nxstyle fixes for nxplayer & nxrecorder apps

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-04-21 16:41:51 -06:00
Xiang Xiao
650b58d6b2 nshlib: Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
de8a56d149 nshlib: Split shell functionality from nsh to sh
1.Improve the compatiblity as other OS
2.Avoid call nsh_initialize more than once

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
3f9302561c nshlib: Enhance nsh to execute the shell script
and support the interactive shell too

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
7b4d34e352 system/taskset: Call system to launch application instead of nsh_system
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
e4b101d2ef system/cu: Echo NULL char too
since zero is also a valid character

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-16 20:50:40 +09:00
Gregory Nutt
3e73991857 nxstyle fixes for PR 170 2020-04-11 20:32:53 +01:00
Gregory Nutt
05f2253a33 Remove CONFIG_CAN_PASS_STRUCT
This is the companion to PR #766.  It removes the CONFIG_CAN_PASS_STRUCT option as recommended by Issue #620

NuttX PR #766 depends on PR being in place but not vice versa.  This PR should be merge-able without #766 and then PR #766 should also pass its checks.
2020-04-11 20:32:53 +01:00
YAMAMOTO Takashi
3ba85167fe system/ramtest: Change the default of stack size to DEFAULT_TASK_STACKSIZE
Given what this program does, it's probably ok to allocate a few more
kilo bytes of the stack.
2020-03-27 02:43:11 -05:00
YAMAMOTO Takashi
eb083265f4 system/flash_eraseall: Bump stack size to DEFAULT_TASK_STACKSIZE 2020-03-27 02:43:11 -05:00
YAMAMOTO Takashi
2ecdf4c554 Change the default of a few stack size configs to DEFAULT_TASK_STACKSIZE
These had the larger default for the sim.
It's no longer necessary as DEFAULT_TASK_STACKSIZE
can have different default for each arch.

See also:
    commit b1d44a81b4
2020-03-27 02:43:11 -05:00
YAMAMOTO Takashi
e7156be066 Change the defaults of stack size configs to DEFAULT_TASK_STACKSIZE
This commit changes only ones with the default 2048 and
leaves the others.
E.g. this leaves SYSTEM_RAMTEST_STACKSIZE, whose default is 1024.
I guess those need to be inspected one-by-one.
2020-03-27 02:43:11 -05:00
YAMAMOTO Takashi
c304624fab Replace "STACKSIZE = 2048" with CONFIG_DEFAULT_TASK_SIZE
For now, I left the following instances because it isn't
clear to me why they are using the different values.
Maybe they need one-by-one inspection.

    examples/igmp/Makefile:STACKSIZE = 1024
    examples/powerled/Makefile:STACKSIZE = 1024
    examples/powermonitor/Makefile:STACKSIZE = 768
    examples/relays/Makefile:STACKSIZE = 512
    examples/smps/Makefile:STACKSIZE = 1024
    graphics/screenshot/Makefile:STACKSIZE = 4096
    system/flash_eraseall/Makefile:STACKSIZE = 1024
    testing/cxxtest/Makefile:STACKSIZE = 4096
    testing/smart_test/Makefile:STACKSIZE = 4096
2020-03-27 02:43:11 -05:00
Xiang Xiao
1511403fdf Revert "Don't generate .depend anymore"
This reverts commit cc5ad09caa.
2020-03-22 23:09:40 -05:00
Xiang Xiao
cc5ad09caa
Don't generate .depend anymore 2020-03-22 18:15:21 +00:00
Ouss4
7694f21292 system/cu/cu_main.c: Fix nxstyle complaints. 2020-03-13 16:36:03 -06:00
Oleg Evseev
df5d4cd033 system/cu/cu_main.c: Add option -f to loop forever. 2020-03-13 16:36:03 -06:00
Oleg Evseev
f221d33525 system/cu/cu_main.c: Fix wrongly swapped parity options. 2020-03-13 16:36:03 -06:00
Gregory Nutt
c742373efc apps/system/cle: Fix error when compiling with C89 compiler. 2020-03-13 20:14:14 +01:00
Xiang Xiao
41d88f06e7 Run codespell -w with the latest dictonary again 2020-02-23 07:10:14 -06:00
Xiang Xiao
d660492289 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:41:36 -06:00
chao.an
f28eca9dbc Make.defs: Use complete include path 2020-02-19 12:56:10 -06:00
Xiang Xiao
f14aead53e Shouldn't use local readline in telnet
Shouldn't use local readline in telnet since the host has more powerful intelligent
2020-02-08 07:58:04 -06:00
Xiang Xiao
bf3e6e2367 Improvements for telnet server
Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    Check POLLHUP and POLLERR in telnet poll loop

      to handle the remote end close correctly

    Send "NVT"(network virtual terminal) as the default if getenv("TERM") return NULL

      telnet should trigger the error handling if inet_pton return zero
      since zero mean the string has format error

    Don't return 1 in _environ_telnet to avoid trigger the compression
    and remove the redundant TELNET_TELOPT_COMPRESS2 check

    Change telnet_error_u to telnet_error_e required by the coding standard

    Ensure telnet object get freed before the abnormal exit
2020-02-04 19:09:22 -03:00
Gregory Nutt
724a34bd3b Run all files modified by pr45 through nxstyle. 2020-02-03 07:38:57 -06:00
Xiang Xiao
37135e5dfe telnetd should listen both IPv4 and IPv6 for the dual stack
Change-Id: Ic1c2878f2eda721ccdf667b0a634289c643f5220
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-03 07:17:22 -06:00
Xiang Xiao
1154735ca6 Refine the preprocess conditional guard style 2020-01-31 11:04:10 -06:00
Xiang Xiao
e0dcfa0c55 Remove extra whitespace from files (#43)
* Remove multiple newlines at the end of file
* Remove the white space from the end of line
2020-01-31 08:29:24 -06:00
Satoshi Togawa
012031bc8e fix typo 2020-01-24 22:12:06 +09:00
Xiang Xiao
53efd71d6d Fix format warn (#13)
* fix warning: format '%u' expects argument of type 'unsigned int *', but argument 3 has type 'uint16_t *

Change-Id: I3eccf8e2cd917f19b7a9edab233b327297d74bb7
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int'

Change-Id: Ic59a1e9e49256637fa73459c46b8cded036cf971
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-14 03:21:13 +01:00
Adam Feuer
7fd1b9065b delete all characters from char to EOL
- more like GNU readline or emacs - can delete entire line with
  ctrl-A ctrl-K
2020-01-08 15:40:04 -06:00
Alin Jerpelea
967e7e2912 system: readline: Improve security 2020-01-08 20:43:39 +08:00
Alin Jerpelea
01e2b11785 system: zmodem: Improve zmodem send performance
Introduce new configuration of CONFIG_SYSTEM_ZMODEM_SNDFILEBUF, which
allocates cache buffer for reading file to be sent. This option can
improve the performance of zmodem sending file by multiple bytes read
of file, especially when the single read of file is very slow.
2020-01-08 20:43:39 +08:00
Alin Jerpelea
221a45879d system: zmodem: Fix compile error in zmodem host tool 2020-01-08 20:43:39 +08:00
Alin Jerpelea
437dba336e system: zmodem: Fix debug assert condition 2020-01-08 20:43:39 +08:00
Alin Jerpelea
5c936ce0e4 Various fixes (#6)
Author: Gregory Nutt <gnutt@nuttx.org>

    Run all .c and .h affected by this PR through nxstyle.

Author: Alin Jerpelea <alin.jerpelea@sony.com>

    * system/usbmsc: Fix accessing uninitialized pointer
    * fsutils/inifile: Fix a memory leak in inifile error case
    * fsutils/mksmartfs: Fix uninitialized return code
    * system/zmodem: Fix a compile error in zmodem debug enabled
    * nshlib/nsh_fscmds.c: Add syntax check to cp command

    If the destication of NutShell cp command is the same with the source,
    it may cause the file corruption. Add the syntax check of argument to
    avoid this problem.
2020-01-07 09:01:23 -06:00
Xiang Xiao
857158451b Unify the void cast usage
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro

Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-02 23:21:01 +08:00
Gregory Nutt
3da8091d30 Include nuttx/symtab.h instead of nuttx/binfmt/symtab.h since symtab.h under binfmt folder is for internal use. 2019-12-10 08:39:22 -06:00
Xiang Xiao
7479cd6819 apps/system/nsh/nsh_main.c: Remove HAVE_DUMMY_SYMTAB logic since BINFS can run without it. 2019-12-10 08:37:58 -06:00
Gregory Nutt
9667060914 Remove apps/system/sudoku. 2019-11-25 16:14:47 -06:00
kyChu
23d2785b19 system/spi/Kconfig: Simultaneous with Dave Marples patch, kyChu submitted a nearly equivalent change with PR 206. In have enhanced Dave Marples change with some good things form kyChu's PR. 2019-11-25 07:49:31 -06:00
Dave Marples
12224806dc system/spi/Kconfig: This patch fixes a missing definition in the spitool when SPI is enabled with command/data switching. 2019-11-25 07:41:14 -06:00
Gregory Nutt
3ebf71095e Remove all support for the ancient Pascal compiler and pcode interpreter. 2019-11-21 07:04:34 -06:00
qiaohaijiao
c084cd820c apps/system/nxplayer and nxrecorder: apps/nxplayer&nxrecorder: Add nuttx shell support. Use system() function to support shell command in nxplayer and nxrecorder applications. 2019-11-20 07:41:05 -06:00
Xiang Xiao
0276088d5a apps/system/usrsock_rpmsg/usrsock_rpmsg_server.c: Fix usrsock_rpmsg_server.c:554:7: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]. 2019-11-11 09:06:18 -06:00
chao.an
6bdc814836 apps/system/usrsock_rpmsg/Make.defs: Correct configured application name. 2019-11-09 10:03:24 -06:00
Jianli Dong
caecdd6079 apps/system/usrsock_rpmsg: Add rpmsg based usrsock implementation. 2019-11-08 09:32:45 -06:00
Juha Niskanen
eaeb6cc105 nshlib/Kconfig: Add missing NSH_DISABLE_DMESG, typos. 2019-11-08 07:52:22 -06:00
David Alessio
91276ba94e apps/system/cu/cu_main.c: (1) Fix early exit. getc(stdin) can return 0 the first time around. (2) Set optind to zero. getopt() was being left in a bad state, causing parsing errors on second use. (3) Fix priority of cu_listen(). (4) Add suppor for -h. 2019-11-05 07:07:02 -06:00
Dave Marples
dbd4e67241 apps/system/cle/cle.c: This commit modifies the cle to use the streams file interface more consistently and has removed the observed race conditions. It was previously a mix of streams and fileio. It also simplifies the VT100 cursor position handling. 2019-11-04 11:35:18 -06:00
David S. Alessio
e050dce32d apps/system/spi: Add options to spec devtype, id for chip select. 2019-10-18 07:43:38 -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
Xiang Xiao
fa0aded666 apps/system/cle/cle.c: Fix warning, re-order to follow coding standard. 2019-10-17 11:20:20 -06:00
David Alessio
0d8ed9c0de Merged in david_alessio/apps/bugfix/spitool-exch-parse-txdata (pull request #202)
Bugfix/spitool exch parse txdata

* friendlier I2C "knock-knock" uses only read request

    While many I2C slave devices have multiple indexed registers, some have
    only one register and it's not indexed.  For example, the I2C bus switch
    TCA9548A has only a Control Register, attempting to index to "Reg[0]"
    alters its contents to 0x00 disabling all subordinate buses.  This patch
    fixes that problem by simply trying to read something/anything from the
    slave.  This also helps coax out slaves with register files that start
    from a higher index, i.e. the AT24CS0x, FLASH chips with a UUID that
    appears as a 2nd I2C slave at (address+8), report their serial number at
    Reg[80]-Reg[8F] and will NAK a read of Reg[0].

* modify get/set to prevent write of reg index if not specifed

* correctly parse exch txdata args, if any

* should always call the board's deselect

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-17 14:05:44 +00: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
Gregory Nutt
69022c9f2b apps/system/i2c: Fix up some complaints from nxstyle. 2019-10-15 06:30:57 +08:00
David Alessio
720b854da2 Merged in david_alessio/apps/feature/i2c-multiple-read (pull request #201)
Feature/i2c dump

* friendlier I2C "knock-knock" uses only read request

    While many I2C slave devices have multiple indexed registers, some have
    only one register and it's not indexed.  For example, the I2C bus switch
    TCA9548A has only a Control Register, attempting to index to "Reg[0]"
    alters its contents to 0x00 disabling all subordinate buses.  This patch
    fixes that problem by simply trying to read something/anything from the
    slave.  This also helps coax out slaves with register files that start
    from a higher index, i.e. the AT24CS0x, FLASH chips with a UUID that
    appears as a 2nd I2C slave at (address+8), report their serial number at
    Reg[80]-Reg[8F] and will NAK a read of Reg[0].

* modify get/set to prevent write of reg index if not specifed

* add 'dump' command to issue a single transaction

    to retrieve multiple bytes from an I2C slave and register/offset.

* use NuttX' isprint()

* refactor to reduce coupling, hexdump only needs outstream

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-14 22:13:28 +00: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
2c8b9e786d apps/system/composite: Remove usb serial loopback test code we can achieve the same effect by cat or dd command. 2019-10-07 02:45:02 -06:00
Xiang Xiao
31a7b99f9c apps.: Remove the inappropriate NSH_BUILTIN_APPS coupling
1. Check NSH_NETINIT for self network initialization
2. Check NSH_ARCHINIT for sel arch specific initialization
3. Always show help regardless of NSH_BUILTIN_APPS
4. Loop forever regardless of NSH_BUILTIN_APPS, user could:
  a.change the default behavior by the command line argument
  b.or ctrl+c to break out the loop
2019-10-07 02:37:56 -06:00
Xiang Xiao
e806097c70 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. 2019-10-06 06:14:56 -06:00
Xiang Xiao
e829f047bc apps/; Change space to tab and help to ---help--- in Kconfig files. 2019-10-05 21:37:19 -06:00
Xiang Xiao
e9cd27e8c3 system/lzf/lzf_main.c: Check the protection by CONFIG_SYSTEM_LZF != CONFIG_m (not elf binary) instead of CONFIG_KERNEL_BUILD. 2019-10-04 08:58:27 -06: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
Nathan Hartman
664e8a1410 Fix minor typos in docs and comments. 2019-09-29 12:53:39 -06:00
Gregory Nutt
e1d262e5d9 system/symtab: Remove system/symtab since the same functionality exist in nuttx now. 2019-09-28 11:05:31 -06:00
Nathan Hartman
3a75edca20 Fix minor typo/copy-paste: 'will be use when'->'will be used when' 2019-08-23 11:59:28 -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
David Alessio
839efa6669 Merged in david_alessio/apps/bugfix/i2ctool-dev-clobbers-slave-config (pull request #198)
Bugfix/i2ctool dev clobbers slave config

* friendlier I2C "knock-knock" uses only read request

    While many I2C slave devices have multiple indexed registers, some have
    only one register and it's not indexed.  For example, the I2C bus switch
    TCA9548A has only a Control Register, attempting to index to "Reg[0]"
    alters its contents to 0x00 disabling all subordinate buses.  This patch
    fixes that problem by simply trying to read something/anything from the
    slave.  This also helps coax out slaves with register files that start
    from a higher index, i.e. the AT24CS0x, FLASH chips with a UUID that
    appears as a 2nd I2C slave at (address+8), report their serial number at
    Reg[80]-Reg[8F] and will NAK a read of Reg[0].

* modify get/set to prevent write of reg index if not specifed

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-20 20:29:21 +00: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
2a8dccb75d Change name configs/ to boards/ in comments, Documentation, Tools, etc. 2019-08-05 07:33:16 -06:00
Dave Marples
bf9a5180cd apps/system/cle/cle.c: ASCII DEL should be treated by Delete-Left. 2019-08-01 15:26:49 -06:00
Nathan Hartman
d6a3beadfb Remove 'executable' bit on several files 2019-08-01 14:19:02 -06:00
Gregory Nutt
ee8af2a59e Fix warnings found in build testing. 2019-07-01 15:22:55 -06:00
Masayuki Ishikawa
d2f3ad91e2 Merged in masayuki2009/nuttx.apps/wireless_gs2200m (pull request #177)
apps/wireless/gs2200m: Moved from apps/system/gs2200m

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-27 00:54:19 +00:00
Masayuki Ishikawa
2c8e349552 Merged in masayuki2009/nuttx.apps/add_system_gs2200m (pull request #176)
apps/system/gs2200m: Add usrsock daemon for Tilt GS2200M Wi-Fi module

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-18 13:45:31 +00: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
Gregory Nutt
73ab5e2750 Remove some cases in Kconfig files of 'comment' with 'depends on'. That is probably a good practice. I removed these because (1) is not done elsewhere so it is just an inconsistency, and (2) the HTML generation tool at nuttx/tools/kconfig2html.c would need to be extended to parse that case. I don't have time to do that now. 2019-05-19 09:49:50 -06:00
Dave Marples
80de28c865 apps/system/spi: I needed a small test tool for spi in the style of the i2c tool, but I didn't see one so I've hacked one out of the i2c tool source. 2019-05-10 18:14:44 -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
Gregory Nutt
04a05b3e7b apps/system/nxplayer: Fix compile problems when audio debug is enabled. 2019-04-23 11:07:20 -06:00
Matous Pokorny
f8963b9245 Fix some typos in comments. 2019-04-15 07:58:26 -06:00
Gregory Nutt
dee7f14b49 Squashed commit of the following:
apps/system/nxplayer:  Fix some logical errors from recent comments.  They broke the build of the nxplayer as a library vs. a task.  apps/graphics/nxglyphs:  Fix yet more namespace problems.

    graphics/nxwm/src/nxwm_main.cxx:  Move from graphics/nxwidgets/UnitTests/nxwm/nxwm_main.cxx.

    apps/graphicx/nx*:  Fixes numerous build issues mostly associated with include paths and namespaces.

    apps/nxglyphs:  Decouple (mostly) from nxwidgets and nxwm so that they can be used elsewhere.  Creates include/graphics/nxglyphs.h

    apps/graphics/nxglyphs:  Put all NxWidgets and NxWM glyphs into a common directory where they can eventually be shared.  Not very sharable at the moment due to header file entanglements.  Need a separate nxglyps.hxx header file.

    Separate nxwidets and nxwm into separate directories.  Remove old, common NxWidgets directory.
2019-04-04 18:53:29 -06:00
Alan Carvalho de Assis
2eaf2e0ff8 aps/system/cu/Kconfig: CU term depends on TERMIOS and should select it. 2019-03-05 12:38:39 -06:00
Masayuki Ishikawa
6df934ae92 Merged in masayuki2009/nuttx.apps/fix_taskset (pull request #168)
apps/system/taskset: Fix command arguments are not passed

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-02-25 19:38:54 +00:00
Anthony Merlino
9fbc93ec9f Merged in antmerlino/apps/vi-build-fix (pull request #169)
system/vi: Condition KEY_CMDMODE_REPEAT with CONFIG_SYSTEM_VI_INCLUDE_COMMAND_REPEAT to avoid build error when option is not selected.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-02-23 19:08:46 +00:00
Michał Łyszczek
8ddb76323f pps/system/psmq/Kconfig: Fix recursive dependency. SYSTEM_PSMQ both depended on and selected SYSTEM_EMBEDLOG 2019-02-19 14:07:02 -06:00
Gregory Nutt
77319c3fb1 apps/system/psmq/README.txt: Add a README.txt file. This is just a copy of the description accompanying that patch that added system/psmq. 2019-02-18 17:51:50 -06:00
Michał Łyszczek
716caf2f61 apps/system/psmq: New package. psmq is publish subscribe message queue. It's a set of programs and libraries to implement publish/subscribe way of inter-process communication on top of POSIX message queue. 2019-02-18 17:47:34 -06:00
Gregory Nutt
8f16bb8ebc system/nxplayer and nxrecorder: Fix some coding standard violatins that are just to in-yer-face to ignore: No CamelCase variable names. This was not an extensive check for use of CamelCase. Just some I stumbled across. 2019-02-15 19:25:01 -06:00
Michał Łyszczek
53d8cd78c0 nuttx/sched/mqueue: Change 'int prio' to 'unsigned int prio'. According to open group specification, priority field in mq_* functions should have unsigned type: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/mqueue.h.html 2019-02-15 19:22:48 -06:00
Michał Łyszczek
af9b5762c2 mainly bugfix release:
c26c62e remove some code when binary logs are disabled
  4c8e0df src/el-pmemory.c: fix usage of uninitialized variable
  9b641a4 src/el-pmemory.c: fix wrong options object used
  eb1fcb4 options: fix g_options altered after el_ocleanup
  f64ec5e add: printing memory without ascii table
  c16e5cd make code more c89 compatible
  d0f1a54 fix: remove comma at the end of enum list
  9defd3f fix bad comment

with very minor features added:
  f3c138b add: option to print to stdout
  d7857c4 make embedlog print to stderr by default
2019-02-15 07:15:24 -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
anchao
e7cd81a45e apps/system/system/system.c: Correct a path name. 2019-01-27 07:37:06 -06:00
ZhongAn
97acb41b90 system/nxplayer/nxplayer.c: Fix build error when only enable CONFIG_AUDIO_EXCLUDE_VOLUME is enabled. 2019-01-27 07:31:40 -06:00
Xiang Xiao
dc54f28ff3 apps/system/zmodem: Switch to the raw mode before transfer and restore to the original setting after finishing the transfer. 2019-01-27 07:09:31 -06:00
Gregory Nutt
ed963588bd apps/system/cfgdata: Make builtin task stack size and priority configurable. Set default to 2048 (from 1024) per recommendation of Ken Pettit. 2019-01-22 08:57:03 -06:00
Ken Pettit
1a82551036 apps/system/vi/vi.c: Fix an infinite loop bug that can show up in some coases (plus a couple of other items). 2019-01-22 08:51:32 -06:00
Ken Pettit
edbf31a341 system/termcurses/tcurses_vt100.c: Fix spelling error in last commit. 2019-01-17 09:13:00 -06:00
Ken Pettit
42f3c06389 system/termcurses/tcurses_vt100.c: Eliminate a warning. 2019-01-17 08:58:11 -06:00
Gregory Nutt
a79b89202e system/termcurses/tcurses_vt100.c: Costmetic vertical alignment. 2019-01-17 08:39:29 -06:00
Ken Pettit ‎
cc8beb8578 Bug fixes and changes to existing functionality
===============================================

1.  Deletion of last line in file using 'dd' caused infinite loop searching for
    'nextline'.  Fixed.

2.  Insertion of line above 1st line using 'O' caused line to be inserted on
    2nd line.  Fixed.

3.  Paste buffer from 'dd' was being free'd after the 'p'aste operation,
    preventing multiple paste opportunity.  Fixed.

4.  The cursor was not being bound to the line end and was allowed to 'hover'
    over the '\n' EOL character.  This caused wierd (relative to standard vi)
    insertion locations and cursor movement with 'a'ppend and 'i'nsert.  Fixed.

5.  The 'vi_shrinkpos' position didn't take the end of file pointer into
    account when calculating 'curpos', 'prevpos' variables causing wierdness
    when deleting things near the end of the file.  Fixed.

6.  The 'yy'ank command was improperly deleting the text from the document
    instead of simply yanking to the paste buffer.  Fixed.

7.  The 'dd'elete line funciton was not copying the deleted line to the paste
    buffer as part of the delete operation.  Fixed.

8.  The bottom line of the screen was sometimes being used for document text
    and other times for command / find entry.  Fixed by reserving the bottom
    the bottom line for status / command only.

9.  When scrolling up / down through a file, the cursor position was not
    preserved and moved further and further to the left column based on the
    line lengths of the lines visited.  Fixed.

10. The display was being COMPLETELY redrawn with each keystroke, causing the
    responsiveness to be imbearable.  Fixed.  Added logic to dynamicall
    indicated which portions of the screen need to be updated (full display,
    current line to end of screen, current line only, none).

11. The individual display line updates were being performed a character at
    a time by calling the vi_putch() function, causing slow performance,
    especially in telnet or USBCDC sessions where there is a lot of overhead
    per packet.  Fixed by calling vi_write() instead with a block of
    characters with breaks as needed for TAB exansion.

12. The forward delete 'x' operation allowed deletion through '\n' characters
    causing lines to be joined.  This is different from standard vi where
    'x' at the end of a line performs a delete backward operation.  Fixed.

13. When in 'ex' or find sub-modes (':' or '/' bottom line modes), hitting
    backspace with empty text did not return the operation to command mode
    like it does in standard vi.  Fixed.

14. Performing a 'find' opertation would only search from the current cursor
    position to the end of the file and did not wrap like in standard vi.
    Fixed.

15. Loading a file that was larger than the initial text allocation would
    force a call to 'vi_extendtext', marking the file as modified when in
    fact it hadn't even been loaded yet.  Fixed.

16. Combined vi_insert_mode and vi_replace_mode into a single function to
    save code space since they are nearly identical routines.

17. In command mode, backspace was deleting characters which is different
    from standard vi.  Backspace in command mode normally simply moves the
    cursor left / to the previous line.  Fixed.

18. Added code to handle boundry conditions when the file is new and
    commands are applied to an empty file.

19. Fixed vi_shrinktext so it doesn't allocate a zero-length buffer when
    the last character in the file is deleted.

20. The 'x' command was not copying to the paste buffer.  Fixed.

21. Fixed parsecolon routine to properly deal with ":wq" command sequence.

New feature additions
=====================

1.  Vi startup feature to prepend the current working directory to the
    supplied filename if it does not start with '/' absolute path specifier.
    This allows editing files in the current directory without needing to
    fully qualify the filename.

2.  Standard '~' empty screen line characters for proper identification
    of empty '\n' only lines at the end of the file.

3.  Moving into insert or append mode now prints '--INSERT--' in the status
    line and clears it upon exit.

4.  Integration with termcurses to detect special keystrokes and to
    handle terminal type differences.  Haven't yet converted all vt100 print
    codes to termcurses equivalents.

5.  Support for up, down, left, right arrows, page-up, page-down keys
    in command mode.

6.  Added 'b' command to move cursor 'b'ack to previous word.  Honors the
    command repeat value for multiple word moves.

7.  Added 'w' command to move cursor to next 'w'ord.  Honors the command
    repeat value for multiple word moves.

8.  Added 'f' and 't' commands to find characters on the current line.
    Honors the command repeat value.

9.  Added the find 'n'ext command to repeat the previous find operation.

10. Added the 'H', 'M', and 'L' commands to move the cursor to top,
    middle and bottom of the display.

11. Extended yank/paste to manage a paste buffer with character mode in
    addition to line mode.  Character mode allows cut / paste of
    individual characters or groups of characters vs. full lines.

12. Added support in the 'd'elete and 'y'ank commands for character mode
    deletions such as 'dw', 'dfa', '2yw', etc.

13. Added support in paste routine for multiple paste using command value
    argument.

14. Added support for the 'D' and 'C' delete and change to end of line
    commands.

15. Added support for 's'ubstitute key ('x' followed by insert mode).

16. Modified yank / paste allocation scheme to avoid repeated alloc
    and free of paste buffer.  Uses a minimum allocation size scheme and
    only does free / realloc when paste does not fit.  If the paste is
    smaller than the current allocation and the current allocation is
    larger than the threshold, then the buffer is freed and a smaller
    buffer allocated.  Otherwise the existing buffer is used.

17. Support for 'P'aste before current cursor position.

18. Support for '?' reverse search mode.

19. Support for 'J'oin next line with current line command.

20. Printing of current row,col in status line of display.

21. Command repeat '.' support for commands that modifiy text.

22. Support in replace  / insert mode for arrow keys, PGUP / PGDN, HOME,
    and END.  Using these will cause the command repeat buffer to
    reset such that only the last text addition after a cursor movement
    is saved.

23. Added 'X' delete previous command.

24. Added "gg" go to top of document command sequence.

25. Added "ZZ" save and quit command (equivalent to :wq).

26. Implemented '^' goto first non-whitespace on current line, along
    with '+' and '-' goto first non-whitespace on next / previous line.

27. Added CR / LF goto first non-whitespace on next line in command mode.
2019-01-16 19:25:04 -06:00
Ken Pettit ‎
b285dd9b68 Perform a bounds check to fix a random Termcurses crash that I haven't been able to track down. The result of of the subtraction for priv->keycount should never be negative, but I think sometimes it is, so better to catch it and avoid a crash until I can track it down. 2019-01-16 18:22:16 -06:00
Gregory Nutt
93de0c232b apps/system/readline_common.c: Correct spelling, matches vs maches. 2019-01-16 10:15:18 -06:00
Ken Pettit
cb4974cee8 apps/system/termcurses/tcurses_vt100.c: Fix an issue where the first curses 'getch()' call sometimes (usually) hangs waiting for a keypress. This bug was introduced when I fixed the keyboard 'paste' overflow error. 2019-01-11 07:41:04 -06:00
Ken Pettit
e1237bfefd apps/graphics/pdcurs34/nuttx and system/termcurses: This commit fixes two issues:
1. A memory corruption issue that occurs from a paste operation that would overflow the fixed buffer size for keyboard processing.

2. A stall in getch() processing when there are cached keycodes in the termcurses emulation (tcurses_vt100.c).
2019-01-08 08:28:27 -06:00
Masayuki Ishikawa
3cdb6ec4ba &Merged in masayuki2009/nuttx.apps/nxplayer_mainthread_stacksize (pull request #164)
apps/system/nxplayer: Introduce CONFIG_NXPLAYER_MAINTHREAD_STACKSIZE

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-07 01:51:36 +00:00
Gregory Nutt
298c76e611 apps/system/termcurses/tcurses_vt100.c: Fix an error introduced during review of recent patch. 2019-01-05 13:52:51 -06:00