Commit Graph

4400 Commits

Author SHA1 Message Date
patacongo
8c9663b6c1
apps/examples/userfs/userfs_main.c: Fix warning (#41)
Fixes warning:

    CC:  userfs_main.c
    userfs_main.c:182:3: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
       ufstest_truncate,
       ^
    userfs_main.c:182:3: note: (near initialization for ‘g_ufstest_ops.truncate’)

Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
2020-01-30 18:58:03 +01:00
patacongo
7a8790f1b4
apps/testing/mm: Make stacksize configurable (#40)
Make stacksize as well as program name and priority configurable.  The defaults are the same as the previous hardcoded values.

The default stacksize of 2048 bytes is more than enough for most target applications.  However, when running on the simulator, much large stack sizes are needed.
2020-01-30 17:43:04 +01:00
patacongo
ba6377078b
apps/testing/mm: Move from apps/examples/mm (#39) 2020-01-30 17:07:00 +01:00
Gregory Nutt
4e509c8659 Revert "examples: hello: Show CPU index when running in SMP mode"
Cannot call up_cpu_index() or any other nonstandard OS application interface.  This not only breaks the portable POSIX OS interface but also would break any PROTECTED or KERNEL mode SMP implementation.

If you want to do something like this in user space, the appropriate thing to do would be to extend prctl().  That is non-posix, but is at least Linux-like and will work in all build modes.

This reverts commit 715517b1a0.
2020-01-30 05:41:13 -06:00
Masayuki Ishikawa
715517b1a0 examples: hello: Show CPU index when running in SMP mode
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-01-30 09:23:12 +01:00
Alin Jerpelea
59b763add4 netutils/netlib: Fix buffer overflow 2020-01-29 00:29:30 -08:00
YAMAMOTO Takashi
b6890df58d Fix a build on macOS
On some platforms like macOS, we can't create an empty archive.
2020-01-29 09:03:01 +01:00
Masayuki Ishikawa
e4af73ec56 wireless: gs2200m: Fix sendto_request() in gs2200m_main.c
Signed-off-by: Masayuki Ishikawa <<Masayuki.Ishikawa@jp.sony.com>
2020-01-28 10:35:50 +01:00
Ouss4
eb1af03259 examples/sendmail: Few fixes to make the example run on a local SMTP
server.
2020-01-25 16:39:21 -06:00
Gregory Nutt
72a934c6c2 Add configuration settings for apps/examples/sendmail.
The sendmail example hasn't been used in years.  I am not sure it was ever debugged.  It is so old that it still expects hand editted .config files.  As a result, all of the configuration settings were missing from the Kconfig file.

This commit adds the missing apps/examples/sendmail configuration settings so that the example at least builds.  I cannot test it because I have no smtp server that I am willing to spam.

This configuration also adds missing configuration dependencies and runs the C files in apps/examples/sendmail and apps/netutils/smtp through nxstyle.

This commit resolves an issue reported by surya prakash rased in the Google group:  https://groups.google.com/forum/#!topic/nuttx/idr-M164Y24
2020-01-24 19:07:54 -03:00
Alin Jerpelea
0395cf9c88
Merge pull request #31 from taikoyaP/testbuild
fix message typo on system/zmodem/zm_state.c
2020-01-24 14:33:33 +01:00
Satoshi Togawa
012031bc8e fix typo 2020-01-24 22:12:06 +09:00
Xiang Xiao
fd3775e068 Remove CONFIG_TIME_EXTENDED conditioning
Remove CONFIG_TIME_EXTENDED related stuff since kernel remove this option
2020-01-23 08:36:03 -06:00
Alin Jerpelea
285f7b4072
Merge pull request #30 from xiaoxiang781216/fix-NXGLYPHS_BACKGROUNDCOLOR-invalid
Set NXGLYPHS_BACKGROUNDCOLOR default value
2020-01-23 09:23:55 +01:00
Xiang Xiao
6cd8ba3cf8 Set NXGLYPHS_BACKGROUNDCOLOR default value
to avoid warning: symbol value '' invalid for NXGLYPHS_BACKGROUNDCOLOR

Change-Id: I56e83a88b41d26a6833131a8dc89afe0dcf25d96
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-23 15:30:19 +08:00
chao.an
7612221df6 apps/wireless/wapi/scan: Add frequency/rssi printf
Scan print layout:

nsh> wapi scan wlan0
bssid / frequency / signal level / ssid
**:**:**:**:**:**       2437    -38     <ssid>
**:**:**:**:**:**       2427    -36     <ssid>
...
2020-01-22 07:53:02 -06:00
liuguo09
270b97190b Makefile: Fix more warning: jobserver unavailable: using -j1. Add '+' to parent make rule. (#27)
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-01-21 17:44:45 +01:00
liuguo09
50a86f9bc7 examples/posix_spawn: update dependency to fix parallel build break (#26)
In stm32f4discovery:posix_spawn and lc823450-xgevk:posix_spawn parallel build,
it failed since apps/examples/posix_spawn/filesystem/romfs/hello is not available
which is needed by examples/posix_spawn/filesystem/symtab.c.

Change-Id: I588317396f8e3ca4d69d4ec8db8ccad219207048
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-01-21 15:45:32 +01:00
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