Commit Graph

6296 Commits

Author SHA1 Message Date
Pedro Bertoleti
c908661414 Client & Server examples to use TCP/IP socket as an IPC Channel for LoRaWAN 2022-10-17 18:54:55 -03:00
Xiang Xiao
6944c5a0a1 nshlib: Fix warning reported by clang
nsh_telnetlogin.c:62:15: error: implicit conversion from 'int' to 'char' changes value from 255 to -1 [-Werror,-Wconstant-conversion]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:14:20 +02:00
Xiang Xiao
75455d3788 nshlib: Reuse nsh_session logic in nsh_telnetmain
to avoid the code duplication

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 09:41:43 -03:00
Xiang Xiao
8e460e7e19 nshlib: Move symbol table initialization from nsh_main to nsh_initialize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 15:39:10 -04:00
Xiang Xiao
0d210c3227 nshlib: Move commoin initialization from console_main to nsh_initialize
to avoid the code duplication

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 15:39:10 -04:00
Xiang Xiao
964747dd36 nshlib: Call nsh_telnetstart in nsh_initialize to avoid the dupliation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 15:39:10 -04:00
Xiang Xiao
cf70d8f95b nshlib: Call nsh_sysinitscript in usb or alt console like normal one
forget in the pull request:
https://github.com/apache/incubator-nuttx-apps/pull/1142

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 15:39:10 -04:00
Xiang Xiao
893387b2c5 Fix the minor style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 19:07:16 +02:00
Xiang Xiao
4941182cc6 Make.defs: Change "ifeq ($(XXX),y)" to "ifneq ($(XXX),)
to support the tristate option correctly and unify the usage

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 14:59:08 +02:00
Masayuki Ishikawa
97440889ac testing: ostest: Add ASSERT in case of errors
Summary:
- This commit adds ASSERT in case of errors to stop the
  execution of ostest
- Also, add some 'ERROR' messages

Impact:
- None

Testing:
- Run ostest with several configs

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-10-16 13:24:50 +08:00
crafcat7
2ad6dc37d8 system/cachespeed:Average time to add 2022-10-15 03:15:30 +08:00
zhanghongyu
78541e9876 usrsocktest: Fix default config mismatch in recv_block & no_block_connect
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-14 11:39:41 +09:00
zhanghongyu
6e8ea78d70 usrsock_server: combine response and events when socket setup case
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-14 11:39:41 +09:00
zhanghongyu
8a2f29c9b5 usrsock_server: fix unblock socket connect error
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-14 11:39:41 +09:00
Fotis Panagiotopoulos
bcbf3ae89d Fixes in DHCPc. 2022-10-13 22:59:54 +02:00
nietingting
6e3b402cf4 examples: clean warning of pipe
transfer_test.c:66:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   int fd = (int)pvarg;
            ^
transfer_test.c: In function 'transfer_writer':
transfer_test.c:122:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   int fd = (int)pvarg;
            ^
transfer_test.c: In function 'transfer_test':
transfer_test.c:169:58: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   ret = pthread_create(&readerid, NULL, transfer_reader, (pthread_addr_t)fdin);
                                                          ^
transfer_test.c:179:58: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   ret = pthread_create(&writerid, NULL, transfer_writer, (pthread_addr_t)fdout);
                                                          ^
transfer_test.c:202:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       ret = (int)value;
             ^
transfer_test.c:216:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       tmp = (int)value;
             ^

Signed-off-by: nietingting <nietingting@xiaomi.com>
2022-10-11 19:49:45 +08:00
zhangyuan21
7fcba8a119 ostest: add semaphore wait case for task restart 2022-10-11 15:29:45 +08:00
Alan Carvalho de Assis
abbe022894 wapi: Verify if password size if valid 2022-10-11 14:35:43 +08:00
Fotis Panagiotopoulos
ab7cb90f88 ftpd: Fixed compiler warnings. 2022-10-06 23:54:31 +08:00
Xiang Xiao
9291d07a87 Fix the coding style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-06 12:20:32 +02:00
Xiang Xiao
a86790c367 poll: Don't need monitor POLLERR or POLLHUP explicitly
since spec require the implementation always report POLLERR/POLLHUP:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-05 05:58:02 +02:00
Ville Juven
8c1c0efabc make export: Fix make export for CONFIG_BUILD_KERNEL=y
The condition:
[ -f "$${f}" ] && cp -f "$${f}" "${EXPORTDIR}"$(DELIM)registry ;

Fails if the first part of the condition returns empty / false, stopping
make for no reason due to the error.
2022-10-05 03:13:39 +08:00
Alan Carvalho de Assis
ed78d25934 webserver: Help users to easily identify missing configurations
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-04 20:22:33 +02:00
crafcat
98a9d2c749 system/ramspeed: Add system interrupt switch.
system/ramspeed: Add system interrupt switch.
2022-10-03 21:07:17 +02:00
crafcat
744ecf2b01 system/ramspeed: Add system interrupt switch. 2022-10-03 21:07:17 +02:00
crafcat
0e0ac0656b system/cachespeed:Tools for testing cache-related speed.
Signed-off-by: crafcat <110923103+crafcat7@users.noreply.github.com>
2022-10-01 11:41:40 +08:00
Petro Karashchenko
8e8d461590 ostest/prioinherit: fix priority inheritance test when compiled without optimisation
When application is compiled without optimisation the stack usage
is higher. 1K stack of adversary task is getting overflowed and that
leads to crash. Set stack size to CONFIG_DEFAULT_TASK_STACKSIZE for
adversary task

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-01 11:41:26 +08:00
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