Commit Graph

41108 Commits

Author SHA1 Message Date
Xiang Xiao
d62ae03bf8 arch: Move setjmp/longjmp to libc/machine
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-04 16:30:37 -07:00
Nathan Hartman
92c61058c1 arch/stm32h7: Fix syntax error
arch/arm/src/stm32h7/stm32_dma.c:

     * stm32_bdma_residual(): Fix missing semicolon.
2021-04-04 22:32:09 +01:00
Gregory Nutt
a0f9da20a2 getopt(): Update comments about missing functionality
Per the Linux man page, "By default, getopt() permutes the contents of argv as it scans, so that eventually all the nonoptions are at the end."  This behavior, however, is not implemented in the NuttX getopt() logic.
2021-04-04 22:31:47 +01:00
Xiang Xiao
e7dffdf06f arch/arm: Replace the hardcode syscall number with macro
and change SYS_context_[save|restore] to SYS_[save|restore]_context

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-04 16:18:10 -03:00
Gregory Nutt
7de43596da getopt_long(): Add support for required argument format
The Linux man page requires that the getopt_long() and getopt_long_only() functions accept arguments to options in a form like:

    --option=argument

This PR adds that missing functionality.

This change effects only getopt_long() and getopt_long_only()

Tested on a simulator NSH configuration with a modified version of the getopt() test in apps/testing/ostest.
2021-04-04 14:13:42 -05:00
Xiang Xiao
e7bce54fa9 build: Fix build break for renesas/rx65n
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-04 15:51:48 -03:00
Xiang Xiao
661d597d19 stm32/nucleo-g431rb-esc1: Normalize nsh config
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-04 13:56:39 -03:00
Gregory Nutt
1b4af6e90d getopt_commont(): Add some comments
Add a trivial comment about handling in certain corner cases where I am not certain what the correct behavior should be.
2021-04-04 10:55:00 -05:00
Alan C. Assis
6481eb6523 esp32-devkitc: Add BMP180 sensor support 2021-04-04 10:54:02 -05:00
Xiang Xiao
6fb0fd6825 stm32/nucleo-g431rb: Normalize nsh config
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-04 11:54:21 -03:00
Xiang Xiao
2268c19171 arch/arm: Fix the style issue in assemble files
remove the unused header file and mimic the difference between sub arch

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-04 14:39:16 +01:00
Gregory Nutt
7e1ae24c3c getopt_common(): Correct handling of unsupported long options.
If an unrecognized long option is encountered, we must skip over that argv[] entry or getopt_long() will seriously misbehave.

Affects getopt_long() and getopt_long_only()

Problem found and fix verified with an updated version of the OS test.
2021-04-04 07:15:10 -05:00
Xiang Xiao
42489759fe build: Replace sim with sim01 and sim02
follow up nuttx-testing repo change:
commit 08d766faef84e43112b70a08f6f0c54654482024
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Sun Apr 4 04:21:57 2021 +0800

    Split sim.dat to sim00.dat and sim01.dat

    to speed up the macOS build

    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-04 05:16:44 -05:00
Alan C. Assis
4064e33bd4 stm32l4: Fix small typo on stm32l4_adc.h
Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>
2021-04-03 23:33:51 -05:00
Xiang Xiao
33d5f923b6 tools/testbuild.sh: Quote the parameter expansion pattern by "
to enable the exact match(disable glob match)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-03 20:38:45 -03:00
Xiang Xiao
5f3a98b5a8 libc/assert: Reference the expression in all case
to avoid the warning "defined but not used"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I55b7c092d0f2e5882fc1784987657c10cdf2d90b
2021-04-03 21:00:41 +01:00
Xiang Xiao
3813634dc9 Refine UNUSED macro to avoid any side effect
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I35d858fc6fb2e0e24b993ab7dd2203c9dd35232a
2021-04-03 21:00:41 +01:00
Xiang Xiao
866fe646aa vfs/lfs: Simplify the lookahead_size equation
the final result is same(keep 8 bytes alignment)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I664879960c898a7f1518236b24a2b3ee8a9998d0
2021-04-03 21:00:41 +01:00
Xiang Xiao
9f44417de4 fs/lfs: Update version to 2.4.0
And redirect assert and log to NuttX's version
which is possible after:
commit c0cc0a417e727764ccce6f1284e3570898d750e6
Author: Christopher Haster <chaster@utexas.edu>
Date:   Mon Jan 18 14:01:53 2021 -0600

    Enabled overriding of LFS_ASSERT/TRACE/DEBUG/etc

    This is useful for testing the new erroring assert behavior in CI.
    Asserts do not error by default, so this macro needs to be overriden.

    It is possible to test this behavior using the existing option of
    overriding lfs_util.h with a custom file, by using a small sed
    one-line script. But this is much simpler.

    This does raise the question if more of the configuration options in
    lfs_util.h should be opened up for function-like macro overrides.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie70814e1a2777e19a7310358d3a94ff965287d7b
2021-04-03 21:00:41 +01:00
Gregory Nutt
6c507730bd Fix Use of Variable before NULL check
Found a place in getopt_common() where the option string is used before it is checked if it is NULL.  This can happen because the short option string is optional for getopt_long() and getopt_long_only()

If optstring is NULL, that would be an ERROR for getopt(), but not for the getopt_long() versions.

Should effect only the getopt() APIs

Tested on the simulator using apps/testing/ostest.
2021-04-03 18:23:35 +01:00
Alin Jerpelea
f878390c6d tools: nxstyle: add exception for X11 keysymdef
Add exception for XK_* Mixed Case defined by X11 keysymdef.h

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 11:56:35 -05:00
Alin Jerpelea
787aca4f4e graphics: vnc: fix nxstyle errors
fix errors reported by nxstyle

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 11:56:35 -05:00
Alan C. Assis
ec1b89e264 esp32-wrover-kit: Don't use User GPIO Subsystem to control LED
The GPIO_LEDx are already used by esp32_userleds.c, they shouldn't
be used by esp32_gpio.c. This patch also includes the GPIO Input
example (GPIN) that was missing.
2021-04-03 09:37:38 -05:00
Alin Jerpelea
c7c3683845 tools: nxstyle: add Mixed case exceptions for nfs
add exceptions for nfs to avoid future false warnings

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:37:06 -05:00
Alin Jerpelea
7dc5db49fc fs: nxstyle fixes
Fix for several errors reported by the nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:37:06 -05:00
Alin Jerpelea
015a205ec6 arch: arm: David Sidrane: update licenses to Apache
David Sidrane has submitted the ICLA and we can migrate the licenses
 to Apache.

Mateusz Szafoni has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:36:43 -05:00
Alin Jerpelea
675bd7d97e arch: arm: stm32: Uros Platise : update licenses to Apache
Uros Platise has submitted the ICLA and we can migrate the licenses
 to Apache.

David Sdidrane has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:36:43 -05:00
Alin Jerpelea
6d52c442d2 include: Michael Jung : update licenses to Apache
Michael Jung has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:36:43 -05:00
Alin Jerpelea
853d019904 tools: Richard Cochran : update licenses to Apache
Richard Cochran has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:36:43 -05:00
Alin Jerpelea
c947a2fe8b include: sensors: Matous Pokorny : update licenses to Apache
Matouš Pokorný has submitted the ICLA and we can migrate the licenses
 to Apache.

Datavision has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:36:43 -05:00
Alin Jerpelea
f75c6cc7e4 arch: arm: Nicholas Chin: update licenses to Apache
Nicholas Chin has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:36:43 -05:00
Alin Jerpelea
51be18433d arch: arm: stm32: Paul A. Patience: update licenses to Apache
Paul A. Patience has submitted the ICLA and we can migrate the licenses
 to Apache.

David Sidrane has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:36:43 -05:00
Alin Jerpelea
b89f67459d arch: arm: stm32: Max Holtzberg: update licenses to Apache
Max Holtzberg has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:36:43 -05:00
Alin Jerpelea
6ceb0d8d9b arch: arm: imxrt: Actia Nordic AB: update licenses to Apache
Actia Nordic AB has submitted the SGA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:36:43 -05:00
Alin Jerpelea
5f5fae6b57 drivers: DS Automotion GmbH: update licenses to Apache
DS Automotion GmbH has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:36:43 -05:00
Sungwoo Kim
4bb624b8a1 boards/**/defconfig: Remove explict disables for mb, mh, and mw
Since https://github.com/apache/incubator-nuttx-apps/pull/647 disables
them by default.
See:
- https://github.com/apache/incubator-nuttx/issues/3011
-
https://github.com/apache/incubator-nuttx-apps/pull/647#issuecomment-812818855

Co-authored-by: Gisu Yeo <wcharcode@gmail.com>
Co-authored-by: Taegyu Kim <tgkim@purdue.edu>
2021-04-03 09:36:08 -05:00
Masayuki Ishikawa
a51a60d485 sched: task: Fix to initialize the task-specific data
Summary:
- I noticed that getopt() test in ostest wailed with
  esp32-devkitc:smp and spresense:smp
- Finally, I found that the task-specific data is not
  initialized.
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with ostest esp32-devkitc:smp and spresense:smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-04-03 08:32:46 -06:00
Matias N
9e311518c9 CI: adapt to testlist changes 2021-04-03 08:46:06 -05:00
Alan Carvalho de Assis
b4129f8989 esp32c3-devkit: Add random example board config 2021-04-03 07:20:03 -05:00
Alan Carvalho de Assis
bac84de45f esp32c3: Add support to RNG driver
Co-authored-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
Co-authored-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-04-03 07:20:03 -05:00
Alin Jerpelea
26fef3f6a1 NuttX: Fix nxtyle errors
Fix errors reported by nxstyle

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 04:20:31 -07:00
Alin Jerpelea
08e5378b11 NuttX: Gregory Nutt: update licenses to Apache
Several licenses were missed in the initial work

David Sidrane has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 04:20:31 -07:00
Huang Qi
45dc778865 sys/socket.h: Add "Socket"-level control message types
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: I05f8dd29501f6b06cdd278e0e416f210a98aa6b0
2021-04-03 01:02:07 -05:00
hotislandn
b4b175cb7f arch:rv64:add memory clobber to inline asm for syscall.
Signed-off-by: hotislandn <hotislandn@hotmail.com>
2021-04-03 00:54:23 -05:00
Alan C. Assis
18f88c35fc esp32: Fix small typo that will trigger an error when IPv6 is enabled 2021-04-03 00:53:02 -05:00
Gregory Nutt
af3c76bb53 Correct some getopt() logic
1. Null pointer dereference:

-  for (ndx = 0; longopts[ndx].name[0] != '\0'; ndx++)
+  for (ndx = 0; longopts[ndx].name != NULL; ndx++)

2. Handle single character long options.  An option like -x could be either a short option or a long option (under getopt_long_only()).  This case was not being handled correctly.

3. Add missing support for optional arguments to short options (indicated with two "::"

This effects all members of the getopt() family of APIs.

Tested on the simulator using extensions to apps/testing/ostest.
2021-04-02 21:31:02 +01:00
Alin Jerpelea
b7c451c5a4 libs: Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-02 11:12:25 -05:00
Alin Jerpelea
d3313eeae9 libs: libc: lib_vikmemcpy.c: Mixed case identifier fix
fix Mixed case identifier reported by nxstyle

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-02 11:12:25 -05:00
Alin Jerpelea
ed8e5e971b libs: fix nxstyle errors
fix erros reported by nxstyle

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-02 11:12:25 -05:00
Alin Jerpelea
8975a65197 net: fix nxstyle errors
fix errors reported by nxstyle

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-02 11:12:25 -05:00