Commit Graph

4682 Commits

Author SHA1 Message Date
Alin Jerpelea
18f4870a0a
Merge pull request #25 from masayuki2009/improve_gs2200m_throughput
apps: gs2200m: Remove unnecessary usleep() to improve throughput
2020-01-21 08:51:18 +01:00
Masayuki Ishikawa
ebf666100a apps: gs2200m: Remove unnecessary usleep() to improve throughput
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-01-21 16:03:41 +09:00
liuhaitao
97fd133025 Add install dependency on chardev BIN to fix parallel build break
chardev bin may not availabe before make install in parallel build,
so add install dependency on chardev BIN here.

Change-Id: If28451ceeeed0a6463544d8c342871cecda5a057
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-01-20 08:16:34 -06:00
liuhaitao
02dbab7679 Makefile: Fix warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
Change-Id: I73d156f55bc82778c64defe5a8dd84bb478c9008
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-01-19 07:24:21 -06:00
patacongo
8e21be5223 apps/Application.mk: Fix path calculation. (#22)
The GNU make CURDIR will always be a POSIX-like path with forward slashes as path segment separators.  If we know that this is a native build, then we need to fix up the path so the DELIM will match the actual delimiter.
2020-01-17 23:44:46 +01:00
Gregory Nutt
367b4d7e5b apps/Makefile: Fix APPDIR path for native build.
A recent change gets the APPSDIR root directory path from:

        APPSDIR = $(CURDIR)

    Where CURDIR is a special variable maintained by GNU make.  In the native build, GNU make is provided by GNUWin32.  The value of CURDIR provided by the GNUWin32 CURDIR is not POSIX, but not quite windows compatible either.  It does return paths that start with C: or D:, but uses forward slashes for path segment delimiters, not backsalshes as required by Windows tools.

    This fix here is to use $(CURDIR) to get the APPSDIR path for file inclusions, that part is fine.  But then, if we find out we are doing a native build, the update the APPSDIR using shell %CD% environment variable which is the authoritative source of the current working directory under Windows.
2020-01-17 16:22:54 -03:00
Ouss4
de836fed72 examples/lis3dsh_reader/lis3dsh_reader_main.c: Make an infinite loop
look similair to the rest.
2020-01-16 13:39:56 -06:00
raiden00pl
77985058f3 examples/: Add simple HTS221, LSM303 and LSM6DSL examples #19 2020-01-16 20:24:32 +00:00
Xiang Xiao
6d22dd0013 Author: Gregory Nutt <gnutt@nuttx.org>
Run all .c and .h files in last PR through nxstyle and fix all complaints.

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    Wapi improvement (#16)

    * wireless: add passphrase control
    * wireless: add disconnect control
2020-01-16 12:21:45 -06:00
Xiang Xiao
db61c92100 Fix dhcpd #17
apps/netutils/dhcpd/dhcpd.c:  Fix unused const variable

dhcpd.c:273:29: warning: 'g_anyipaddr' defined but not used [-Wunused-const-variable=]
 static const uint8_t        g_anyipaddr[4] = {0, 0, 0, 0};

apps/netutils/dhcpd:  Make dhcpd interface configurable

apps/netutils/dhcpd:  Lease address directly if hit in address range

apps/netutils/netinit: Initialize dhcpc_state

update the addresses only on request success
2020-01-16 12:06:25 -06:00
Mateusz Szafoni
782a3d25a0 examples/sx127x_demo/sx127x_demo.c: RX/TX only if RX/TX enabled (#18) 2020-01-16 19:02:25 +01:00
Gregory Nutt
b2cd439b10 Remove unselectable CONFIG_NET_TCP_READHEAD dependencies.
NuttX commit 346336bb9e5c9199b82e34d08bf23dd1bc389460 make CONFIG_NET_TCP_READADHEAD unselectable and removed all references to CONFIG_NET_TCP_READHEAD from the the NuttX repositories.  However, there was no corresponding removal of CONFIG_NET_TCP_READHEAD from the apps/ repository.  As a result, there was logic that depended on the selection of CONFIG_NET_TCP_READHEAD that could never be enabled.

This was found during build testing using the configuration olimex-lpc1766stk/thttpd-binfs.  THTTPD was not being build fully because it had dependencies on CONFIG_NET_TCP_READHEAD.  There resulted int numerous new warnings and, finally, the error:

(.../apps.examples.thttpd.o): in function `thttp_main':
thttpd_main.c:(.text+0x104): undefined reference to `thttpd_main'
2020-01-15 11:16:17 -03:00
patacongo
8df67745b6 .asf.yaml: Enable Issues in the apps/ repository. (#14)
Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
2020-01-14 22:52:19 +01: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
Alan Carvalho de Assis
921131895e Include the file name to open and the fail error number
Also fix issues reported by nxstyle
2020-01-12 09:49:12 -06:00
Gregory Nutt
561fc02ae5 netutils/ftpd/ftpd.c: Fix an error introduced in PR10. In error clean-up, it was trying to free memory on an error where we failed allocated memory. Not good. 2020-01-12 11:55:16 +00:00
Gregory Nutt
e67850971d apps/netutils/ftpd/ftpd.c: Fixes several problems:
1. This fixes the issue reported in Bitbucket apps/ Issue 15.  That is, if fopen() fails, the NULL stream handle would be used in subsequent logic.  The handling of the failure was incomplete.
2. Some of the error handling was fixed.  In the event of an error, it was return return an error value ONLY if we failure to report the error and even then the wrong error would be reported.  This change now preserves and returns the correct error number that is the root cause of the failure.
3. Ran the file through tools/nxstyle and cleaned up many formatting problems.
2020-01-11 22:22:46 -03:00
Xiang Xiao
573f07f3e4 fix passwd.h:103:30: warning: passwd_verify with no effect [-Wunused-value]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-09 07:44:21 -06: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
patacongo
74ba8ff202
Merge pull request #5 from xiaoxiang781216/fix-void-cast
Unify the void cast usage
2020-01-02 10:48:17 -06:00
patacongo
f00b4e6f9f
Merge pull request #4 from xiaoxiang781216/fix-suffix
Application.mk remove _main suffix from REGLIST
2020-01-02 10:47:58 -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
Xiang Xiao
6a65664ce4 Application.mk remove _main suffix from REGLIST
since the file generated by REGISTER macro don't have such suffix

Change-Id: I6814f5bd257563f897c63d9698f8892d9649dcef
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-02 21:44:57 +08:00
patacongo
73e1696e8b
Merge pull request #3 from xiaoxiang781216/builtin
Add .updated target to handle the no builtin app case correctly
2020-01-01 07:28:32 -06:00
Xiang Xiao
7a645baa4d Add .updated target to handle the no builtin app case correctly
Change-Id: Ia61ff63b4b1e4cb6ec52ac216626bbb76fdf3a33
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-01 12:22:00 +08:00
Xiang Xiao
8c8c481381 fix builtin_list.c:58:10: fatal error: builtin_proto.h: No such file or directory (#2)
Make builtin_list.c instead of builtin_list.o depend on builtin_proto.h and builtin_proto.c
2019-12-31 11:02:09 -06:00
Gregory Nutt
64bc8f5b7f Run all .c and .h files modified in last PR through nxstyle. 2019-12-31 10:57:34 -06:00
Xiang Xiao
49c997501a Wapi simplify (#1)
apps/wireless/wapi:  Simplify usage of command line.  Remove duplicate extensions
2019-12-31 10:39:53 -06:00
Gregory Nutt
0536c5b523 apps/nshlib/nsh_parse.c: Correct an error found in build testing. Commit 2a462c78aa was insufficient. It was a mistake to revert Xiang's change of commit 9defae8af6. But we are on a different vector now. 2019-12-24 12:18:30 -06:00
Gregory Nutt
2a462c78aa nshlib/nsh_parse.c: Replacement implementation for 9defae8af6. This addes conditional compilation on the definition of g_nullstring[] to avoid the warning. Suggested by SUZUKI Y <NBG03015@nifty.ne.jp> 2019-12-19 07:59:30 -06:00
Gregory Nutt
6bfd6166dd Revert "apps/nshlib/nsh_parse.c: Fix warning: 'g_nullstring defined but not used'. Use directly since the usage is triggered by a complex Kconfig combination."
Per SUZUKI Y <NBG03015@nifty.ne.jp>, changing:

-      return (FAR char *)g_nullstring;
+      return "";

causes a bad return value because "" lies on the stack.

This reverts commit 9defae8af6.
2019-12-19 07:52:00 -06:00
Gregory Nutt
9b77f80740 apps/netutils/dhcpd/dhcpd.c: Correct backward conditional logic in dhcpd_leaseexpired(). Noted by surya prakash <suryaec1684@gmail.com>. 2019-12-19 07:35:52 -06:00
Xiang Xiao
9defae8af6 apps/nshlib/nsh_parse.c: Fix warning: 'g_nullstring defined but not used'. Use directly since the usage is triggered by a complex Kconfig combination. 2019-12-18 09:43:31 -06:00
Xiang Xiao
3a2bd2c05f apps/netutils/ntpclient/ntpclient.c: Merge local structure variables xmit and recv into pkt to save the stack. 2019-12-18 09:39:57 -06:00
chao.an
e48a74f358 apps/Application.mk: Convert object names to guarantee uniqueness. 2019-12-13 08:27:45 -06:00
Xiang Xiao
5ec8fc9427 apps/nshlib/nsh_fileapps.c: nsh_fileapp() should return 1 if the application task was spawned successfully but returned failure exit status. For example, nsh shouldn't output "/bin/ping: command not found":
nsh> /bin/ping
ERROR: Missing required <ip-address> argument
...
nsh: /bin/ping: command not found
2019-12-10 10:05:51 -06:00
Gregory Nutt
77a3b08302 apps/nshlib/nsh_parse.c: Ensure /bin/ping and ping work at the same time. Don't skip nsh_builtin even CONFIG_NSH_FILE_APPS or CONFIG_FS_BINFS equal y. 2019-12-10 08:40:29 -06: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
e305592ce6 apps/examples/tcpblaster: Fix several problems with the host is the client and the target in the server. Basic problem was that the host did not know the IP address of the target server due to several bugs and build issues that only seemed to affect this configuration. 2019-12-08 17:11:07 -06:00
Alan Carvalho de Assis
7b4a3ac5ac graphics/littlevgl/Makefile: Temporary fix LVGL compilation until we update to version 6.1.1. 2019-12-07 12:23:01 -06:00
Xiang Xiao
0218a2fcc7 Fix compiler warnings:
tftpc_get.c: In function 'tftp_write': tftpc_get.c:307:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   int fd = (int)ctx;
            ^
tftpc_get.c: In function 'tftpget': tftpc_get.c:368:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   result = tftpget_cb(remote, addr, binary, tftp_write, (void*)fd);
                                                         ^
2019-12-05 07:14:29 -06:00
Xiang Xiao
3bf17d602e apps/netutils/ftpc: ix the compiler warnings:
ftpc_transfer.c:652:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   FAR struct ftpc_session_s *session = (FAR struct ftpc_session_s *)arg1;
                                        ^
ftpc_getreply.c: In function 'fptc_getreply': ftpc_getreply.c:218:58:
warning: passing argument 3 of 'wd_start' from incompatible pointer type [-Wincompatible-pointer-types]
       ret = wd_start(session->wdog, session->replytimeo, ftpc_timeout, 1, session);
                                                          ^~~~~~~~~~~~
 In file included from
/workspace/mirtos/out/sim/miai/mirtos/nuttx/include/nuttx/sched.h:56:0,
                 from /workspace/mirtos/out/sim/miai/mirtos/nuttx/include/sched.h:49,
                 from /workspace/mirtos/out/sim/miai/mirtos/nuttx/include/stdio.h:48,
                 from ftpc_internal.h:48,
                 from ftpc_getreply.c:46: /workspace/mirtos/out/sim/miai/mirtos/nuttx/include/nuttx/wdog.h:247:5: note: expected 'wdentry_t {aka void
(*)(int, long long unsigned int)}' but argument is of type 'void (*)(int, uint32_t) {aka void (*)(int, unsigned int)}'
 int wd_start(WDOG_ID wdog, int32_t delay, wdentry_t wdentry, int argc, ...);
     ^~~~~~~~
2019-12-05 07:11:47 -06:00
liuhuahang
ee53a90fa5 apps/netutils/ntpclient/Kconfig: NTP client should depend on NET_SOCKOPTS. 2019-12-05 07:09:27 -06:00
Gregory Nutt
57f99a6fb7 Make.defs: When building MODULES under Cygwin, the path to libapps.a that is passed to the Windows linker must first be converted with cygpath. 2019-12-04 11:01:43 -06:00