Commit Graph

5663 Commits

Author SHA1 Message Date
raiden00pl
13fcbcb3d1 canutils/cansend: make stacksize configurable 2022-01-23 01:34:23 +08:00
raiden00pl
267d198212 canutils/candump: make stacksize configurable 2022-01-23 01:34:23 +08:00
Norman Rasmussen
cc5b99a725 system/uniqueid: Add a tool to get the board uniqueid 2022-01-22 22:48:23 +08:00
Xiang Xiao
db235f98d8 Rename CONFIG_SMP_NCPUS to CONFIG_NR_CPUS
follow up NuttX side change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-22 00:08:32 +01:00
Alexander Lunev
5a697c18ba netutils/netcat: fixed ISO C89/C90 related warnings:
warning: ISO C90 forbids variable length array ‘buf’ [-Wvla]
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
2022-01-21 12:30:40 +08:00
yinshengkai
8f1948038e system/input: add system input cmd tool
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-01-20 19:47:05 +01:00
Alexander Lunev
b8c060260c netutils/ftpc: implemented FTPC_OVER_SENDFILE option.
This option enables using sendfile() in ftpc binary transfer mode of PUT operation.
If the option is enabled but ASCII transfer mode is activated,
ftpc falls back to the combination of read() and write().
Using sendfile() provides a higher performance compared to
the combination of read() and write().

Also this option is useful for testing / debugging tcp_sendfile()
functionality of NuttX TCP/IP stack.
2022-01-20 14:16:01 +08:00
Alexander Lunev
371beb2a0f netutils/netcat: sendfile related code refactoring + small fixes 2022-01-18 10:38:55 +08:00
Xiang Xiao
c7e96dbe32 Fix the nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-17 07:57:22 +01:00
Petro Karashchenko
9480c0ec12 include: fix double include pre-processor guards
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-16 17:36:21 +08:00
Norman Rasmussen
374cb9230a Fix boarctl typos 2022-01-16 08:07:47 +01:00
zouboan
1e2b0fc790 new commit 2022-01-12 17:36:01 +01:00
chao.an
cb988a8394 testing/ostest: set the default value to TESTING_OSTEST_FPUSIZE
.config:2053:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-09 18:07:52 +08:00
Alexander Lunev
61fe9c4fa2 crypto/libtomcrypt: added CONFIG_LIBTOMCRYPT_HASHSUM option to build hashsum app 2022-01-07 11:13:46 +08:00
Fotis Panagiotopoulos
bc5d8034f1 Typo fixes. 2022-01-06 10:30:41 +08:00
Zeng Zhaoxiu
614b73d321 ostest: sighand.c: add sem_wait in signal handler
task is blocked by semphore1, signal handler is blocked by semphore2,
after post semphore2, the task must get -EINTR.

Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
2022-01-05 21:34:30 +09:00
Jiuzhu Dong
4a14126d76 ostest: fix assert when enable CONFIG_PRIORITY_INHERITANCE
[ 96.555456] [265] ap: up_assert: Assertion failed at file:semaphore/sem_holder.c line: 112 task: pt-0x5b09fd0b
[ 96.555657] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.555828] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.556023] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.556222] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.556437] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.556639] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.556842] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.557036] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-01-05 20:20:45 +08:00
songlinzhang
04dd2d70fd netutils/dhcpc: Fix dhcpc lease bug
Signed-off-by: songlinzhang <songlinzhang@xiaomi.com>
2022-01-05 18:27:59 +08:00
chao.an
a1857b9258 wireless/gs2200m: replace the preamble scratch to union
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-05 19:08:43 +09:00
Jiuzhu Dong
64ffdb46bb ntpc: optimize stack used
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-01-05 18:36:12 +09:00
Alexander Lunev
b9a6dc2a85 netutils/netcat: implemented NETUTILS_NETCAT_SENDFILE option.
This option enables using sendfile() in netcat client mode
if a normal file (not stdin) is sent. If the option is enabled
but stdin is sent rather than a normal file, netcat falls back
to the combination of read() and write().
Using sendfile() provides a higher performance compared to
the combination of read() and write().

Also this option is useful for testing / debugging tcp_sendfile()
functionality of NuttX TCP/IP stack.
2022-01-05 13:29:04 +08:00
chao.an
df53de1d68 net/usrsock: replace usrsock xid type to uint64_t
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-05 13:25:21 +08:00
zhanghu6
0c79d57f12 note main: system/sched_note add output of string and binary
ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP
case NOTE_DUMP_STRING:
case NOTE_DUMP_BINARY:
endif
2022-01-04 20:53:08 +08:00
Abdelatif Guettouche
33475cbff6 hts221_reader_main.c: Fix the start IOCTL.
SNIOC_START is not handled by the hts221 driver.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-01-02 10:45:02 +08:00
Norman Rasmussen
6285990a5c Remove trailing whitespace from commands as parameters 2022-01-01 22:18:07 +08:00
Norman Rasmussen
92287e2b14 Fix some edge case bugs in nsh_parse
- Handle nsh_filecat returning NULL on failure
- Background and redirect must be restored after an empty line
- Output redirection should be removed from argv like background
2022-01-01 22:18:07 +08:00
Norman Rasmussen
6993c66389 Check for too many arguments to hostname
Also use the symbolic value for the success exit code.
2022-01-01 14:54:15 +01:00
Norman Rasmussen
41ce7d40f6 Fix incorrect argument count error message
The `too many arguments` and `missing required argument(s)` messages
should be switched in order for the correct message to be shown to the
user.
2021-12-31 20:54:05 +08:00
Ville Juven
d1bcd2977c Fix link error due to missing libapps.a in KERNEL build
The import target for kernel build now fails, due to setting libapps.a
as the default value for the BIN variable.

The fail happens when the ELFLD function passes the LDLIBS parameter
(which contains BIN / libapps.a) for the linker. There is no rule to
create libapps.a in the case of the kernel build, so the linker gives
an error due to it being missing.

This commit patches this behavior so that BIN is not appended to
LDLIBS. Another option would be to implement a dummy rule to create
libapps.a, but looking at the git history this is no longer wanted
behavior, thus the error is patched like this.
2021-12-29 06:54:36 -06:00
Norman Rasmussen
2e773bcdc6 Use macros from fixedmath.h for manipulating duty cycle
This avoids magic shift logic in code, and has no change to behavior.
2021-12-29 06:25:27 -06:00
Norman Rasmussen
28c133a503 Adjust channel and duty bounds to allow testing sentinel values
commit 7354ab187ed701ae041b45a0a6603878ab9b165d and commit
1e2f06718103e7028809012a69b7ac932e9ae537 added code to skip all
remaining channels when the channel number is -1. This adds support for
testing that using the example app. The BL602 driver's first channel is
channel 0, so this also allows the example app to select the first
channel.
2021-12-29 06:25:27 -06:00
Norman Rasmussen
75c1e43334 increase number of supported PWM channels from 4 to 6
commit d8199fe460 changed Kconfig, but it
looks like pwm_main.c should have been changed too. This adds support
for the 5th and 6th channels to the code, and adds an error if more than
6 channels are configured.
2021-12-29 06:25:27 -06:00
Norman Rasmussen
ec93611307 examples/mqttc: Fix handling of getaddrinfo errors
commit 36d4bfa774 set a hostname to work
around getaddrinfo failing. getaddrinfo returns a non-zero value on
error, and there should be an early return after the error message is
printed.
2021-12-29 02:45:47 -06:00
Norman Rasmussen
2a4db81217 system/hostname: Add a tool to get/set hostname 2021-12-29 01:59:47 -06:00
Eero Nurkkala
7b48a119ac canutils: odb_decodepid: fix nxstyle issues
Fix the following nxstyle issue on the file:
error: Operator/assignment must be followed with whitespace

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2021-12-28 02:48:34 -06:00
Eero Nurkkala
2f44643704 canutils: odb_decodepid: fix two debug prints
Fix the following printfs, as reported by cppcheck:

canutils/libobd2/obd_decodepid.c:85:9: error: printf format string requires 1 parameter but only 0 are given. [wrongPrintfScanfArgNum]
        printf("Supported PIDs: %08X\n");
        ^
canutils/libobd2/obd_decodepid.c:114:9: error: printf format string requires 2 parameters but only 1 is given. [wrongPrintfScanfArgNum]
        printf("Throttle position = %d\% \n", (100 * dev->data[3])/255);
        ^

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2021-12-28 02:48:34 -06:00
Petro Karashchenko
5ac15130db apps: remove space befone newline in logs
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-27 20:52:08 -06:00
Eero Nurkkala
ced74a064d fsutils/ipcfg: fix debugassert
cppcheck reports the following error:

fsutils/ipcfg/ipcfg_binary.c:332:15: error: Uninitialized variable: fd [uninitvar]
  DEBUGASSERT(fd >= 0 && ipv6cfg != NULL);

Update the DEBUGASSERT() to match that of ipcfg_read_binary_ipv4(). fd is
uninitilized and doesn't need to be checked here.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2021-12-27 20:42:48 -06:00
chao.an
7c7841b53f graphics/nxwidgets: Change CONFIG_USER_ENTRYPOINT to CONFIG_INIT_ENTRYPOINT
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-25 07:28:29 -06:00
Diego Herranz
0e8e08e2a0 Add example app for isl29023 driver
Created from the hdc1008_demo example.
2021-12-25 19:53:05 +08:00
Alan C. Assis
64a09770c8 apps/sht3x: Add simple application to test SHT3x sensor 2021-12-24 12:02:45 -06:00
Alan Rosenthal
a1dbb472bc Update gitignore to match new behavior in https://github.com/apache/incubator-nuttx/pull/5069 2021-12-23 21:52:57 -06:00
Gustavo Henrique Nihei
eb124a4357 ci: Bump github/super-linter version to V4
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-21 20:51:14 +01:00
Xiang Xiao
66dbaa4539 Replace self defined macros with NET_SOCK_[FAMILY|TYPE|PROTOCOL]
NET_SOCK_* is defined by nuttx/net/netconfig.h and then can be shared

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-20 16:04:29 -03:00
chao.an
fcd69d1cdf system/lzf: correct the open mode
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-20 09:12:52 -06:00
chao.an
419e6b012a system/lzf: add support for host build
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-20 09:12:52 -06:00
chao.an
5a61f9e0b0 system/lzf: fix nxstyle warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-20 02:17:07 -06:00
chao.an
0f632f1d66 system/lzf: replace the semaphore to pthread to ensuring compatibility
Private SEM_INITIALIZER is incompatible with other OS

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-20 02:17:07 -06:00
Xiang Xiao
ea9db635d6 industry/foc: Fix the wrong header file inclusion
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-20 09:13:21 +01:00
zhanghu6
2bd3a1701c sched note: printf API example
test API:
void sched_note_string(FAR const char *buf);
void sched_note_dump(uint32_t module, uint8_t event,
                     FAR const void *buf, size_t len);
void sched_note_printf(FAR const char *fmt, ...) printflike(1, 2);
void sched_note_bprintf(uint32_t module, uint8_t event,
                        FAR const char *fmt, ...) printflike(3, 4);
https://github.com/apache/incubator-nuttx/pull/4963

suggestion:
1. add "&" after the command when running this example.
2. must enable SCHED_INSTRUMENTATION_DUMP, and that enable CONFIG_SYSTEM_TRACE can help you view log.
2021-12-19 20:29:52 -06:00