Commit Graph

7053 Commits

Author SHA1 Message Date
chenrun1
4bc06d9a4b drivertest_block:New test items about cache and memory alignment
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-17 23:15:32 +08:00
chenrun1
9768cfab79 drivertest_block:Give redundant space for bad blocks in nand flash
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-17 23:15:32 +08:00
chenrun1
3cb5d475ae drivertest_block:Test the availability of each sector of the block.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-17 23:15:32 +08:00
Huang Qi
5d37383457 examples: Build both native app and wasm app for hello to pass CI test
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-07-17 23:14:47 +08:00
Huang Qi
3d5183f404 tools: Merge WASM_BUILD and WASM_BUILD_ONLY
By make WASM_BUILD as a three state variable: y , n or both.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-07-17 23:14:47 +08:00
Xiang Xiao
ff276e422f ostest: Skip test_dev_null when CONFIG_DEV_NULL isn't enabled
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-17 16:28:02 +09:00
zhanghongyu
1bc2e93124 iptables: modify the formatting of some definitions in xtables.h
Based on the previous patch comments, some changes were made to make it more
nuttx style.
https://github.com/apache/nuttx-apps/pull/1829

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-07-17 07:56:48 +02:00
chenrun1
046fe00b96 nsh_fscmd.c:fix "implicit declaration" warning.
Fix error: implicit declaration of function 'nsh_foreach_direntry' [-Werror=implicit-function-declaration] on file nsh_fscmds on some compiler versions.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-16 16:39:11 +08:00
chenrun1
415168dde6 nshlib: Add fdinfo to get information about the process associated fd
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-16 16:39:11 +08:00
raiden00pl
ed370ec674 cmake: port nxscope and foc and add missing directories 2023-07-14 22:04:35 +08:00
Petro Karashchenko
5dba460f5f wireless/bluetooth/nimble: increase number of ACL buffers available for controller
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-14 09:49:51 +08:00
Petro Karashchenko
4ac830ef1e wireless/bluetooth/nimble: add option to configure stack size of NimBLE NPL callout thread
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-14 09:49:51 +08:00
Petro Karashchenko
0c7788cf26 wireless/bluetooth/nimble: fix build issue with nimBLE example
The NimBLE source code is downloaded at the first pass of the
make system so some makefiles to include might be not in place
initially, but included after code is fetched

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-14 09:49:51 +08:00
Petro Karashchenko
355153cff5 examples/nimble: fix assertion during pthread create with zero priority
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-14 09:49:51 +08:00
raiden00pl
4df395bfc4 cmake: add support for boot utils 2023-07-13 23:50:49 +03:00
Huang Qi
b4ec3d7d4a tools: Don't register app into nsh if WASM_BUILD_ONLY == y
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-07-14 01:29:54 +08:00
chao an
b18cf9aab3 testing/ostest: fix Compiler Warning (level 1) C4716: 'function' must return a value
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4716?view=msvc-170
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-14 01:28:25 +08:00
Lucas Saavedra Vaz
0a7c308f1b examples/pwm: Fix PWM range
This commit fixes the overflow that happens when setting the duty cycle to 100% in the PWM example.
It now correctly passes the value 0xffff rather than 0x0000 when setting the duty cycle to 100 and makes sure that no underflow happens when setting the duty cycle to 0.
2023-07-14 01:25:05 +08:00
chao an
7cfcb49213 cmake/apps: add more applications into cmake support
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-13 19:00:18 +02:00
anjiahao
73b888869b gdbstub:Support a general gdbstub, support serial port and network link
Partially implement the gdb rsp protocol,
you can debug the nuttx kernel through the serial port or the network

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-07-13 19:31:57 +08:00
zhanghongyu
bbb2b289cf iptables: add iptables libary
Add xtables.c and xtables.h
In order to support the compilation of third-party utils, we encounter some
situations where the macro is not defined, refer to the common implementation
of other systems, add relevant definitions and empty function.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-07-13 15:52:36 +08:00
yinshengkai
a7c6b20e89 syste/setlogmask: add syslog channel filtering function
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-13 00:47:23 +08:00
chao an
391b643855 apps/cmake: add some note on cmake header
| # Important note:
| # This CMakeLists.txt is not meant as a top-level CMakeLists.txt. Instead,
| # CMake must be run using the top-level CMakeLists.txt from the nuttx
| # repository and point to this directory via NUTTX_APPS_DIR. For example:
| #   cmake -S <nuttx-dir> -B <build-dir> [...] -DNUTTX_APPS_DIR=<apps-dir>

Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-10 14:02:14 +03:00
Xiang Xiao
dab972b907 Remove the const cast from the initialization of boardioc_symtab_s::symtab
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-08 16:01:52 +03:00
chao an
4d79a5cbaf add initial cmake build system
Co-authored-by: Daniel Agar <daniel@agar.ca>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:52:02 +08:00
YAMAMOTO Takashi
c078b2ee7a wamr: add a kconfig to control wasi-threads
cf. https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/doc/pthread_impls.md
2023-07-06 09:25:14 -03:00
raiden00pl
41868f5061 boot: add support for a minimal NuttX-based bootloader
This can be useful for development purposes when you don't need any complex bootloader yet,
but just want to jump to the app image.

Can be helpful when we need to switch from secure environment to non-secure environment.
2023-07-06 00:26:08 +08:00
Huang Qi
be0e677699 interpreters/wamr: New option for configurable bounds checks
Works with https://github.com/bytecodealliance/wasm-micro-runtime/pull/2289

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-07-05 16:25:56 +08:00
Junbo Zheng
9de5a2550e nshlib: add -h option for ls command
config: ./tools/configure.sh sim:nsh
CONFIG_LIBC_FLOATINGPOINT=y
```
nsh> ls -l /dev
/dev:
 crw-rw-rw-       0 console
 crw-rw-rw-       0 gpio0
 crw-rw-rw-       0 gpio1
 crw-rw-rw-       0 gpio2
 crw-rw-rw-       0 gpio3
 crw-rw-rw-       0 loop
 crw-rw-rw-       0 null
 crw-rw-rw-       0 oneshot
 brw-rw-rw- 1048576 ram0
 brw-rw-rw-    1024 ram1
 brw-rw-rw-  524288 ram2
 crw-rw-rw-       0 zero
nsh> ls /lh /dev
nsh: ls: too many arguments
nsh> ls -lh /dev
/dev:
 crw-rw-rw-       0 console
 crw-rw-rw-       0 gpio0
 crw-rw-rw-       0 gpio1
 crw-rw-rw-       0 gpio2
 crw-rw-rw-       0 gpio3
 crw-rw-rw-       0 loop
 crw-rw-rw-       0 null
 crw-rw-rw-       0 oneshot
 brw-rw-rw-    1.0M ram0
 brw-rw-rw-    1.0K ram1
 brw-rw-rw-  512.0K ram2
 crw-rw-rw-       0 zero
```

config: ./tools/configure.sh ../vendor/sim/boards/miwear/configs/miwear -j16
```
nsh> ls -l /resource/misc/media
/resource/misc/media:
 -rwxrwxr-x  384044 AlexaTimer.wav
 -rwxrwxr-x   57001 AlexaReminder.mp3
 -rwxrwxr-x  384132 AlexaAlarm.wav
 -rw-rw-r--   20733 Clank.mp3
 -rw-rw-r--   45183 NotificationXylophone.mp3
 -rw-rw-r--   27420 Robot.mp3
 -rw-rw-r--   21986 FadeIn.mp3
 -rw-rw-r--   42049 Flute.mp3
 -rw-rw-r--  362748 Latona-15s.mp3
 drwxrwxr-x    4096 .
 -rw-rw-r--   47198 alarm_volume_adjust.mp3
 -rw-rw-r--   95338 Expect.mp3
 drwxrwxr-x    4096 ..
 -rw-rw-r--  409435 Sunrise.mp3
 -rw-rw-r--   55841 Fresh.mp3
 -rw-rw-r--   36685 Bells-1s.mp3
 -rw-rw-r--    4432 camera_click.mp3
 -rw-rw-r--  469621 MiRemix.mp3
nsh>
nsh> ls -lh /resource/misc/media
/resource/misc/media:
 -rwxrwxr-x  375.0K AlexaTimer.wav
 -rwxrwxr-x   55.7K AlexaReminder.mp3
 -rwxrwxr-x  375.1K AlexaAlarm.wav
 -rw-rw-r--   20.2K Clank.mp3
 -rw-rw-r--   44.1K NotificationXylophone.mp3
 -rw-rw-r--   26.8K Robot.mp3
 -rw-rw-r--   21.5K FadeIn.mp3
 -rw-rw-r--   41.1K Flute.mp3
 -rw-rw-r--  354.2K Latona-15s.mp3
 drwxrwxr-x    4.0K .
 -rw-rw-r--   46.1K alarm_volume_adjust.mp3
 -rw-rw-r--   93.1K Expect.mp3
 drwxrwxr-x    4.0K ..
 -rw-rw-r--  399.8K Sunrise.mp3
 -rw-rw-r--   54.5K Fresh.mp3
 -rw-rw-r--   35.8K Bells-1s.mp3
 -rw-rw-r--    4.3K camera_click.mp3
 -rw-rw-r--  458.6K MiRemix.mp3
```

Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2023-07-05 16:25:27 +08:00
chao.an
85fe229de0 apps/libtest: add libtest demo
Redefine the name of BIN to support static library:

BIN = $(APPDIR)/libtest$(LIBEXT)

Signed-off-by: chao.an <anchao@xiaomi.com>
2023-07-02 07:48:50 -06:00
fangxinyong
7faebbd425 libuv: fix compile warning
CC:  pthread/pthread_mutexinconsistent.c libuv/src/unix/getaddrinfo.c:103:9: warning: implicit declaration of function ‘getaddrinfo’; did you mean ‘uv_getaddrinfo’? [-Wimplicit-function-declaration]
  103 |   err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo);
      |         ^~~~~~~~~~~
      |         uv_getaddrinfo
libuv/src/unix/getaddrinfo.c: In function ‘uv_freeaddrinfo’:
libuv/src/unix/getaddrinfo.c:222:5: warning: implicit declaration of function ‘freeaddrinfo’; did you mean ‘uv_freeaddrinfo’? [-Wimplicit-function-declaration]
  222 |     freeaddrinfo(ai);
      |     ^~~~~~~~~~~~
      |     uv_freeaddrinfo
CC:  misc/lib_crc16ccitt.c libuv/src/unix/getnameinfo.c: In function ‘uv__getnameinfo_work’:
libuv/src/unix/getnameinfo.c:45:9: warning: implicit declaration of function ‘getnameinfo’; did you mean ‘uv_getnameinfo’? [-Wimplicit-function-declaration]
   45 |   err = getnameinfo((struct sockaddr*) &req->storage,
      |         ^~~~~~~~~~~
      |         uv_getnameinfo

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-07-01 13:27:02 +08:00
Mingjie Shen
e94e1e59f3 rexec: warn users about cleartext password transmission
Close apache/nuttx#9642.

Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2023-07-01 13:23:04 +08:00
Stuart Ianna
3e8f7e33fc tools/mkimport: Add system map to mkimport script.
The `make export` target from the Nuttx repository correctly packs the
System.map file. This change ensure that ./tools/mkimport.sh extracts
this file correctly into the `import`correctly.
2023-06-30 16:18:44 +08:00
Stuart Ianna
44ae5cc14a import/mk: Update ELF flags to represent build configuration type.
Allows board configuration to select the output ELF format for application built using the `make import` target.
2023-06-30 02:17:10 +08:00
pengyiqiang
cb9cba8d3f testing/monkey: add file permission settings
Add missing file permission setting, fix file read failure.

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-06-29 20:08:05 +08:00
Gregory Nutt
6d9259f334 Add small test of pthread_exit()/pthread_self() on main thread. 2023-06-29 13:53:02 +08:00
Lucas Saavedra Vaz
7bfd623616 system/nxdiag: Add Espressif's HAL version
Adds the currently used ESP HAL version to NXdiag's output.
2023-06-29 00:57:53 +08:00
raiden00pl
f7072ceea8 examples: add NimBLE example, based on nimble/porting/examples/nuttx
It's better to keep this example as part of nuttx-apps instead of relying on an external project
2023-06-27 22:28:32 +03:00
raiden00pl
d8ea8e3d1f nimble: improve integration with NuttX
1. add Makefile.nimble that helps integrate NimBLE with custom applications
  To enable NimBLE for an custom application, user needs to include Makefile.nimble in the app's Makefile:
    include $(APPDIR)/wireless/bluetooth/nimble/Makefile.nimble

2. add NuttX specific syscfg.h
  - file based on nimble/porting/examples/nuttx/include/syscfg/syscfg.h
  - all unnecessary definitions was removed
  - definitions are configurable from Kconfig

3. add NuttX specific logcfg.h
  - bind NimBLE logging with debug.h macros
2023-06-27 22:28:32 +03:00
raiden00pl
93c8cb29ea nimble: make nimble porting example optional
Enabled by default for the moment to avoid CI errors
2023-06-27 22:28:32 +03:00
SPRESENSE
86efbcbee7 Change the way of definition of SUFFIX
When archiving, if the number of files is large, the full path
in SUFFIX may exceed the command line limit for Cygwin and other
programs. To avoid this, the SUFFIX can be changed in the Makefile
in each application or library.
2023-06-26 10:20:40 +02:00
chenrun1
fd38b95467 system/ramtest.c:New automatic memory acquisition function.
In this change, we have added a malloc from the heap to get the address when the user does not pass an address.
We took into account that the user would be testing the memory after the device was started, but this required them to focus on how to get a piece of address available. To improve the experience of tool users, we can simply ask them to get a size for testing purposes, while also keeping the ability to test for a given address
This change is mainly in the 'parse_commandline' function, so there are a few changes in the way it is used, see usage for details.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-06-26 13:57:11 +08:00
Stuart Ianna
53e837e357 nshlib/dd: Increase the integer width for sector size in dd.
On some systems, using sector sizes larger than 65536 is needed for
profiling performance or testing.
2023-06-26 13:56:29 +08:00
Stuart Ianna
a549668439 system/ramspeed: Allow read and write buffers to be allocated from the heap.
This change makes it much easier to use the ramspeed test in BUILD_KERNEL,
as one does not need to know which virtual address is safe to use.
2023-06-23 17:06:09 +08:00
Stuart Ianna
40886698fb mk: Attempt to silence "Nothing to be done for xx" messages.
When rebuilding, it's not really useful to see reams of "Nothing to be done for" for every application being built. This change attempts to silence these messages.
2023-06-23 17:05:56 +08:00
Petro Karashchenko
c9c4cc13e6 apps: correct print specifiers to fix compilation warnings
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-06-23 12:05:54 +08:00
Xiang Xiao
a2f01f5e64 build: Replace "$(shell $(DEFINE) $(CC) ...)" with $(DEFINE_PREFIX)
to unify the way to define macros in Makefile

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-22 23:27:26 +03:00
Xiang Xiao
7986f66006 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX)
to unify the way to get include directories

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-22 23:27:26 +03:00
YAMAMOTO Takashi
3bd106081f toywasm: regen after bumping the version
```
REF=99468253ca11c9b8df444e3e23865b5030f6af69 ./regen.sh
```
2023-06-22 09:52:02 +03:00
YAMAMOTO Takashi
5c9e8d6352 toywasm: bump the version 2023-06-22 09:52:02 +03:00