Commit Graph

6169 Commits

Author SHA1 Message Date
Fotis Panagiotopoulos
1975f7c485 nxstyle fixes. 2022-09-30 14:23:04 +08:00
Fotis Panagiotopoulos
2c0c02fe78 Fixed non-UTF8 characters. 2022-09-30 14:23:04 +08:00
Tiago Medicci Serrano
66f957792f examples/i2schar: Fix compile error and warning
Fix compile error due to unnecessary endif.
Fix warning of long line.
2022-09-30 10:24:17 +08:00
yinshengkai
1b99543e8d system/gcov: add show usage
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-27 19:39:31 +08:00
yinshengkai
d9ec9ca868 system/trace: expand dump string
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-27 19:39:22 +08:00
SunJ
162dc0996c netutils/dhcpc: Add dhcp client id option
Signed-off-by: SunJ <jsun@bouffalolab.com>
2022-09-27 12:20:34 +08:00
chao an
09dfbdf4c7 netutls/dhcpc: treat EINTR as normal errno
A return code of EINTR is perfectly normal, and isn't an error as such.
It's an indication that your program may need to do something because
a signal occurred, but if not, should re-call recv().

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-27 12:20:25 +08:00
chao an
a1ea7f9df7 netinit: associate wlan if DRIVERS_IEEE80211 enabled
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-27 12:20:25 +08:00
chao an
cbcfe6be28 netutils/dhcpc: Set close-on-exec by default to avoid udp_conn leak
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-27 12:20:25 +08:00
Xiang Xiao
0dc5e9f469 Replace #include <queue.h> with #include <nuttx/queue.h>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-26 08:04:51 +02:00
Junbo Zheng
79e770b0c6 apps/nshlib: add the missing FAR macro for all source files
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-22 14:22:13 +08:00
Junbo Zheng
45ef7f948f apps/nshlib: fix CI error
Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/nshlib/nsh_proccmds.c:574:40: error: Operator/assignment must be preceded with whitespace
Error: Process completed with exit code 1.

Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-21 16:37:34 +02:00
Junbo Zheng
06f39d10f1 apps/nshlib: add uptime command support
run uptime command on sim:
nsh>
nsh>
nsh> uptime
19:35:01 up  1:40, load average: 0.00, 0.00, 0.00
nsh>
nsh>
nsh> uptime -s
2022-09-16 17:54:26
nsh>
nsh>
nsh> uptime -p
up 1 hour, 40 minutes
nsh>
nsh>
nsh> uptime -h
Usage:
uptime [options]
Options:
-p, show uptime in pretty format
-h, display this help and exit
-s, system up since
nsh>
nsh>
nsh> uptime -abc
uptime: invalid option -- -abc
Usage:
uptime [options]
Options:
-p, show uptime in pretty format
-h, display this help and exit
-s, system up since
nsh>
nsh>
nsh> date
Fri, Sep 16 19:35:18 2022
nsh>
nsh>

Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-21 16:37:34 +02:00
anjiahao
ac4b42fee7 testing:support openbsd crypto test for nuttx
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-09-16 23:20:58 +08:00
anjiahao
ccd7d12bcb testing:crypto testing form openbsd
aesctr.c:
49a6e16f2c2c8e509184b1f777366d1a6f337e1c
aes_xts.c:
49a6e16f2c2c8e509184b1f777366d1a6f337e1c
des3.c:
49a6e16f2c2c8e509184b1f777366d1a6f337e1c
hmac.c
f51db96baec97348726b28106516038de1518dc5
https://github.com/openbsd/src
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-09-16 23:20:58 +08:00
田昕
799fe4e684 testing/mtd_config_fs:more test cases for garbage collection.
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-09-16 18:03:11 +08:00
Junbo Zheng
732450d42a apps/nshlib: correct commands with alphabet order in kconfig
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-16 15:59:30 +08:00
田昕
3d53b7e0e0 testing/nvconfig:fix compiling err after removing MTD_CONFIG_ERASEDVALUE
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-09-14 20:16:17 +08:00
Huang Qi
5d972ba6d5 Application.mk: Fix Zig build break
Correct wrong make variable name for Zig main source,
and update compile command for latest compiler.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-09-10 11:09:22 +08:00
Huang Qi
0d5804c527 examples/hello_zig: Fix unused return value
Zig don't allow unused return value, so let's discard it explicitly.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-09-10 11:09:22 +08:00
yinshengkai
75673fed70 quickjs: add qjs tool configuration item
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-09 17:25:12 +02:00
Nathan Hartman
c2fdd8e99d tools/README.md: Fix typo and reflow paragraph 2022-09-09 01:08:33 +08:00
田昕
21e1ef11da netutils/dhcpc:receiving unexpected packet not leading to dhcp retry.
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-09-08 14:48:56 +08:00
Masayuki Ishikawa
3837091582 wireless: gs2200m: Add SIOCGIFFLAGS support to gs2200m_main.c
Summary:
- I noticed that the latest ifconfig command shows nothing
- Finally, I found that gs2200m_main.c needs to handle SIOCGIFFLAGS
- This commit fixes this issue

Impact:
- gs2200m only

Testing:
- Tested with spresense:wifi
- NOTE: gs2200m driver needs to be updated as well

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-09-07 11:21:29 +08:00
ligd
048b79955e ostest: fix sighand_test report error
sighand_test: ERROR waiter task did not exit

reason:
sleep will be interrupt by signal

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-09-07 01:18:15 +08:00
chao an
e6e4661131 nshlib/netcmd: add sanity check for netdev
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-06 23:01:18 +08:00
田昕
37b77a78fa netutils/dhcpc:Make DHCP xid random
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-09-06 19:33:38 +08:00
chao an
e031a82882 netutils/dhcp: fix build warning/break of dhcp6c
dhcp6c.c:222:3: error: unknown type name ‘pthread_t’
  222 |   pthread_t thread;
      |   ^~~~~~~~~
dhcp6c.c: In function ‘dhcp6c_get_result’:
dhcp6c.c:415:7: warning: implicit declaration of function ‘netlib_prefix2ipv6netmask’ [-Wimplicit-function-declaration]
  415 |       netlib_prefix2ipv6netmask(presult->pl, &presult->netmask);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~
dhcp6c.c: In function ‘dhcp6c_parse_ia’:
dhcp6c.c:1046:30: warning: unused variable ‘pdhcp6c’ [-Wunused-variable]
 1046 |   FAR struct dhcp6c_state_s *pdhcp6c = (FAR struct dhcp6c_state_s *)handle;
      |                              ^~~~~~~
dhcp6c.c: In function ‘dhcp6c_precise_open’:
dhcp6c.c:1702:3: warning: missing braces around initializer [-Wmissing-braces]
 1702 |   {
      |   ^
......
 1706 |     {0},
      |      -
      |      {{0}}
dhcp6c.c:1796:43: error: ‘UDP_BINDTODEVICE’ undeclared (first use in this function); did you mean ‘SO_BINDTODEVICE’?
 1796 |   setsockopt(pdhcp6c->sockfd, SOL_SOCKET, UDP_BINDTODEVICE, ifname,
      |                                           ^~~~~~~~~~~~~~~~
      |                                           SO_BINDTODEVICE
dhcp6c.c:1796:43: note: each undeclared identifier is reported only once for each function it appears in
dhcp6c.c: In function ‘dhcp6c_request_async’:
dhcp6c.c:1886:9: warning: implicit declaration of function ‘pthread_create’; did you mean ‘timer_create’? [-Wimplicit-function-declaration]
 1886 |   ret = pthread_create(&pdhcp6c->thread, NULL, dhcp6c_run, pdhcp6c);
      |         ^~~~~~~~~~~~~~
      |         timer_create

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-06 19:31:16 +08:00
Fotis Panagiotopoulos
387eba2efd ftpd: server port made configurable. 2022-09-04 11:03:28 -04:00
Fotis Panagiotopoulos
e3a9be0d05 Minor changes in ftpd. 2022-09-03 21:49:15 +08:00
chao an
3d0a49f33e examples/usrsocktest: read from the closed remote should return EOF
fix usrsock remote_disconnect fail:

nsh> usrsocktest
...
Testing group "remote_disconnect" =>
        [TEST ASSERT FAILED!]
                In function "receive":
                line 497: Assertion `(ssize_t)((ret)) == (ssize_t)((0))' failed.
                        got value: -1
                        should be: 0
        Group "remote_disconnect": [FAILED]
...

Reference:

RECV(2)

NAME
       recv, recvfrom, recvmsg - receive a message from a socket
...
RETURN VALUE
...
       When a stream socket peer has performed an orderly shutdown,
       the return value will be 0 (the traditional "end-of-file" return).

       Datagram sockets in various domains (e.g., the UNIX and Internet domains)
       permit zero-length datagrams.  When such a datagram is received, the return value is 0.

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
6bc5196ff0 examples/usrsocktest: add some delay to wait the daemon task ready
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
45a21aea8e examples/usrsocktest: add USRSOCK_REQUEST_IOCTL support
The test model of usrsock ioctl() has changed after file socket layer implemented from vfs,
usrsock must implement the ioctl() hook to pass this test

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
046e83bec9 examples/usrsocktest: fix build break
usrsocktest_wake_with_signal.c: In function ‘do_wake_test’:
usrsocktest_wake_with_signal.c:553:16: error: ‘USEC_PER_MSEC’ undeclared (first use in this function)
  553 |   usleep(100 * USEC_PER_MSEC); /* Let worker thread proceed to blocking
      |                ^~~~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
5b47bc24ae examples/usrsocktest: correct the check region of remote address
let us skip the sin_zero

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
a8d2924c55 examples/usrsocktest: correct return value check of dup2()
DUP(2) Linux Programmer's Manual

NAME
       dup, dup2, dup3 - duplicate a file descriptor
...
RETURN VALUE
       On success, these system calls return the new file descriptor.
       On error, -1 is returned, and errno is set appropriately.

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
田昕
c427f408cb testing:add MTD Fail-safe config-data tests
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-08-31 20:33:20 +08:00
Fotis Panagiotopoulos
1c7839c28c Fixed compiler warnings. 2022-08-30 12:10:49 +08:00
Alex
daf9e80936 Update build.yml
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
2022-08-29 21:36:17 +08:00
Xiang Xiao
0d85084741 wireless/gs2200m: Rename usrsock_request to usrsock_handle_request
fix the conflict after usrsock reconstruct:
https://github.com/apache/incubator-nuttx/pull/6949

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-29 22:17:29 +09:00
Huang Qi
1e4165220e gpusutils/minmea: Fix build break by wrong unpack path
minmea is not cover by CI and in current implementations,
the source files from downloaded tarball were put into root path in gpsutils/minmea instead of in $(MINMEA_DIR)/$(MINMEA_UNPACKNAME),
and then:
```
mv: cannot stat 'minmea-db46128e73cee26d6a6eb0482dcba544ee1ea9f5': No such file or directory
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-08-29 14:26:18 +08:00
YAMAMOTO Takashi
65b58724ca interpreters/wamr/Kconfig: Add INTERPRETERS_WAMR_DEBUG_INTERP option
Tested with sim/Linux/amd64 and esp32 devkit-c.
2022-08-29 14:20:19 +08:00
Huang Qi
2e2630e838 Don't download tarballs if a local git repo found
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-08-28 17:20:47 +08:00
raiden00pl
35c31e35c1 examples/foc: add options to run only the sensor alignment routine or the motor identification routine 2022-08-28 13:24:51 +08:00
raiden00pl
7dbd02947e examples/foc: support for motor identification 2022-08-28 01:20:53 +08:00
raiden00pl
f987c6c02e examples/foc: make sure that the queue is empty before start the control thread 2022-08-27 23:50:58 +08:00
raiden00pl
429f5a166f examples/foc: terminate the control thread if no work to do 2022-08-27 23:50:58 +08:00
raiden00pl
420da4589e examples/foc: print default values in the help message 2022-08-27 23:50:58 +08:00
liyi
7035546422 fix use of addroute/delroute
Signed-off-by: liyi <liyi25@xiaomi.com>
2022-08-27 23:50:46 +08:00
Masayuki Ishikawa
1bf462e1c1 testing: getprime: Fix the thread number info
Summary:
- I noticed that getprime sometimes shows a wrong thread number
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with sabre-6quad:netnsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-25 19:42:25 +08:00