Commit Graph

6488 Commits

Author SHA1 Message Date
Lucas Saavedra Vaz
c94b091bd3 benchmarks/coremark: Fix recompilation bug 2023-02-24 14:06:10 +08:00
chao.an
ba030e5843 wireless/wapi: correct check of return value
VELAPLATFO-2999

----------------------
 * Name: ioctl
...
 * Returned Value:
 *   >=0 on success (positive non-zero values are cmd-specific)
 *   -1 on failure with errno set properly:

Signed-off-by: chao.an <anchao@xiaomi.com>
2023-02-23 12:56:11 -03:00
yinshengkai
19ba886ec2 trace: remove SCHED_INSTRUMENTATION_HIRES
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-23 22:33:14 +08:00
chao an
7cc325ae83 crypto/mbedtls: disable optimize on sim platform
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-23 18:05:26 +08:00
Huang Qi
7f67ee8c88 bas_fs.c: Fix nxstyle: Multiple data definitions
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-23 17:21:19 +08:00
Huang Qi
db22e07d07 stdio: Remove CONFIG_EOL_IS_XXX
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-23 17:21:19 +08:00
Xiang Xiao
69cad3c287 build: Remove the annoy warning from distclean
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-22 23:15:02 +08:00
lilei19
41f60bd669 change strcpy to strlcpy
Change-Id: I8b9429a3c225a82842fce136bdb14b8b135066d3
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-22 23:09:55 +08:00
pengyiqiang
e86745b9a2 lvgldemo: use nitems instead of sizeof
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-02-22 23:09:42 +08:00
Karel Kočí
6b44c59bee graphics/lvgl: fix build due to no-format-security
Without this change the build produces error:
  error: ‘-Wformat-security’ ignored without ‘-Wformat’
2023-02-22 23:07:20 +08:00
pengyiqiang
6f192bd1e0 lvgl/port: add libuv porting
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-02-22 15:33:53 +02:00
crafcat7
b8533e0f70 drivertest/gpio:Add FAR to the pointer 2023-02-22 16:17:04 +08:00
crafcat7
fd0ac1b8fb drivertest/block:Add FAR to the pointer 2023-02-22 16:16:51 +08:00
Huang Qi
95f32fd018 nsh: Decouple with CONFIG_FILE_STREAM
Replace all fwrite/fread/fgets/... to write/read/...

Before:
```
       text    data     bss     dec     hex filename
 109827     601    6608  117036   1c92c nuttx/nuttx
```
    After:
```
       text    data     bss     dec     hex filename
108053     601    6608  115262   1c23e nuttx/nuttx
```
    After with CONFIG_FILE_STREAM disabled:
```
       text    data     bss     dec     hex filename
 105667     601    6608  112876   1b8ec nuttx/nuttx
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-22 13:47:41 +08:00
Xiang Xiao
6a686ba93d bluetooth/nimble: Update to 17a8e61fdec48d579df3bc5af59a9cff5edee674
which contain the fix:
https://github.com/apache/mynewt-nimble/pull/1462
https://github.com/apache/mynewt-nimble/pull/1459
https://github.com/apache/mynewt-nimble/pull/1457
https://github.com/apache/mynewt-nimble/pull/1161

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-21 23:39:51 +02:00
xinbingnan
5a8e089c66 drivertest/drivertest_i2c_spi.c: add testcase for i2c and spi
The BMI160 6-axis acceleration sensor is used as the peripheral of the I2C test. The main purpose of the test is to open the peripheral and read the data of the sensor. If it is read successfully, the test is successful.

Add compiled constraints to make it work only when the bmi160 driver is turned on.

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-02-22 02:46:36 +08:00
chao an
8ac809e680 system/libuv: check GCC version before set special flags
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-21 13:57:43 +08:00
chao an
f0ddb92be0 libuv: disable warning message of dangling-pointer
| In file included from libuv/src/uv-common.h:42,
|                  from libuv/src/uv-common.c:23:
| libuv/src/uv-common.c: In function 'uv_walk':
| libuv/src/queue.h:68:19: warning: storing the address of local variable 'queue' in '((void * (**)[2])MEM[(void *[2] * *)loop_13(D) + 8B])[1]' [-Wdangling-pointer=]
|    68 |     QUEUE_PREV(q) = (n);                                                      \
|       |                   ^
| libuv/src/queue.h:78:7: note: in expansion of macro 'QUEUE_SPLIT'
|    78 |       QUEUE_SPLIT(h, q, n);                                                   \
|       |       ^~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-20 19:25:58 +08:00
chao an
cf4db3f62d drivers/note: fix build break by note rename change
Regression by:

| commit 4e6041a46c (HEAD, origin/master, origin/HEAD)
| Author: Xiang Xiao <xiaoxiang@xiaomi.com>
| Date:   Tue Feb 14 01:17:13 2023 +0800
|
|     system: Change DRIVER_NOTExxx to DRIVERS_NOTExxx
|
|     follow the kernel side change: https://github.com/apache/nuttx/pull/8531
|
|     Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-20 16:13:54 +08:00
Xiang Xiao
4e6041a46c system: Change DRIVER_NOTExxx to DRIVERS_NOTExxx
follow the kernel side change: https://github.com/apache/nuttx/pull/8531

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-20 14:30:57 +08:00
Oreh
f63a3cac0e Add NSH lomtd command (creates MTD loop device) 2023-02-19 19:55:52 +08:00
pengyiqiang
8bee2e2fe0 lvgl/port/lv_port_touchpad: add cursor display
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-02-19 10:53:42 +08:00
Junbo Zheng
78b7318a04 fsutils/passwd: fix warning: leak of ‘iobuffer’ [CWE-401] [-Wanalyzer-malloc-leak]
In function ‘passwd_find’:
passwd_find.c:82:14: warning: leak of ‘iobuffer’ [CWE-401] [-Wanalyzer-malloc-leak]
   82 |       return -errcode;
      |              ^~~~~~~~
  ‘passwd_find’: events 1-5
    |
    |   65 |   iobuffer = (FAR char *)malloc(CONFIG_FSUTILS_PASSWD_IOBUFFER_SIZE);
    |      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    |      |                          |
    |      |                          (1) allocated here
    |   66 |   if (iobuffer == NULL)
    |      |      ~
    |      |      |
    |      |      (2) assuming ‘iobuffer’ is non-NULL
    |      |      (3) following ‘false’ branch (when ‘iobuffer’ is non-NULL)...
    |......
    |   73 |   stream = fopen(CONFIG_FSUTILS_PASSWD_PATH, "r");
    |      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    |      |            |
    |      |            (4) ...to here
    |   74 |   if (stream == NULL)
    |      |      ~
    |      |      |
    |      |      (5) following ‘true’ branch (when ‘stream’ is NULL)...
    |
  ‘passwd_find’: event 6
    |
    |   80 |       int errcode = errno;
    |      |                     ^~~~~
    |      |                     |
    |      |                     (6) ...to here
    |
  ‘passwd_find’: event 7
    |
    |   82 |       return -errcode;
    |      |              ^~~~~~~~
    |      |              |
    |      |              (7) ‘iobuffer’ leaks here; was allocated at (1)
    |

Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2023-02-18 17:24:54 +08:00
yintao
49f88d50b2 testing/cmocka: update cmocka version and add patch
Specify cmocka as the latest version 1.15
add patch to enable cmocka to output with syslog

Signed-off-by: yintao <yintao@xiaomi.com>
2023-02-17 23:44:30 +08:00
wangbowen6
f3d06972dc drivertest_relay: add relay test case
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-02-17 23:43:11 +08:00
Alan Carvalho de Assis
38eec3f0f0 netinit: Improve WiFi configuration
The current WiFi configuration expects user to look at symbols in
the wireless headers to configure it. This patch will improve it.
Notice that even those symbols that are bitfields are not allowed
to have more than 1 bit set at time.
2023-02-17 16:21:49 +08:00
Peter Bee
ce84d5d7cd system/nxcamera: fix sscanf overflow
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2023-02-16 19:00:29 +08:00
Huang Qi
1207977447 readline: Check the fd before echo
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-16 15:47:26 +08:00
Ville Juven
a38c23f557 system/cle.c: Fix configuration for CONFIG_EOL_IS_EITHER_CRLF=y
The old flagging was insufficient, only '\r' was accepted as a line terminator
if CONFIG_EOL_IS_EITHER_CRLF was set.

I noticed this regression after:
https://github.com/apache/nuttx/pull/8454
2023-02-14 00:19:24 +08:00
crafcat7
1789e685a2 testing/drivertest: add gpio driver test 2023-02-12 21:48:24 +08:00
Xiang Xiao
df55bf5cea system/adb: Update to 305007e0e574e7cc2b8d706b0f5d8cc76675fc51
which contain the fix: https://github.com/spiriou/microADB/pull/34

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-11 22:00:05 +02:00
zhanghongyu
96956ba83c dhcpc: under STATE_HAVE_OFFER, dont send DECLINE when offer from same server
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-02-11 14:37:19 +08:00
chao an
1927f8060c build/Kconfig: add BINDIR/APPSBINDIR to support out of tree build
First decoupling changes related to CMAKE

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-10 16:30:43 +08:00
Nathan Hartman
8e77b79f78 Kconfig: Make indent consistent with TABS 2023-02-10 14:11:48 +08:00
crafcat7
9ee3640b62 testing/drivertest: add block driver test 2023-02-09 19:52:52 +08:00
chao an
42d34fcef3 build/Kconfig: fix warnings detected by kconfiglib
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 19:45:36 +08:00
cuiziwei
9db9ef37b4 testing/drivertest:add watchdog test case.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-02-09 03:06:22 +08:00
cuiziwei
7394b4584d testing/drivertest: add pwm driver test
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-02-08 21:13:27 +08:00
raiden00pl
220a5a2ce6 nxscope: use the entire reserved channel length when sending strings
The previous version makes stream data parser too complicated and susceptible to errors.
2023-02-08 10:29:28 +08:00
raiden00pl
ee1e84a261 examples/nxscope: add a new option to wake up the samples thread with timer.
Now we can add samples with at a higher frequency than with usleep().
2023-02-08 02:54:56 +08:00
raiden00pl
1dd7d3dec3 examples/timer_gpio: fix compilation 2023-02-08 00:36:20 +08:00
chao an
8ad4ae5508 net: fix compiler warning
sixlowpan_assocresp.c: In function ‘sixlowpan_assoc_resp’:
sixlowpan_assocresp.c:48:3: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
   48 |   strncpy(arg.ifr_name, ifname, IFNAMSIZ);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-08 00:35:39 +08:00
yinshengkai
f102f6f405 trace: add trace header when dumping
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-08 00:35:17 +08:00
yinshengkai
ecadbbb43c trace: expand NOTE_DUMP_STRING
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-08 00:34:59 +08:00
raiden00pl
bcd721b627 examples/nxscope: add support for CDCACM dev 2023-02-08 00:34:33 +08:00
raiden00pl
3fd4ea8587 nxscope/nxscope_iser.c: wait for device if CONFIG_SERIAL_REMOVALBE=y 2023-02-08 00:34:33 +08:00
Lee Lup Yuen
c57e7a7b81 examples/lvglterm: Add LVGL Terminal for NSH
This PR adds an LVGL App that executes NSH Commands (entered with a Touchscreen Keyboard) and renders the NSH Output. The app follows the same design as the `lvgldemo` app and is explained here: ["NuttX RTOS for PinePhone: LVGL Terminal for NSH Shell"](https://lupyuen.github.io/articles/terminal)

`examples/README.md`: Added doc for `lvglterm` app

`examples/lvglterm/lvglterm.c`: LVGL Terminal App

`examples/lvglterm/Makefile`, `Make.defs`: Makefile for LVGL Terminal

`examples/lvglterm/Kconfig`: Added menuconfig option for "Application Configuration > Examples > LVGL Terminal"
2023-02-07 20:53:24 +08:00
raiden00pl
705b87e7a2 logging/nxscope/nxscope_chan.c: fix printf warnings 2023-02-07 20:50:12 +08:00
Xiang Xiao
0f9642d403 graphics/ft80x: Fix error: implicit declaration of function 'getpid
report here: https://github.com/apache/nuttx/actions/runs/4100097451/jobs/7070641033

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-07 12:15:35 +02:00
cuiziwei
8a131cb7e7 testing/drivertest: add timer driver test
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-02-07 00:54:03 +08:00