Commit Graph

7544 Commits

Author SHA1 Message Date
Yanfeng Liu
31908b3128 nshlib/prompt: extend NSH prompt string management
Currently NSH prompt is defined at build time, thus improper for AMP cases
where the same NSH binary is used on different nodes as the same NSH prompt
shows on all nodes.

This patch attempts to support runtime prompt string population from ordered
sources:
  - the environment variable defined by NSH_PROMPT_ENV plus suffix
  - the NSH_PROMPT_STRING
  - the HOSTNAME plus suffix
The suffix is defined by NSH_PROMPT_SUFFIX so that to clearly separate the
command inputs.

Changes in `nshlib/`

- Kconfig:       add configs NSH_PROMPT_MAX/ENV/SUFFIX etc
- nsh.h:         adjust g_nshprompt defs, add nsh_update_prompt
- nsh_parse.c    relocate g_nshpromt to nsh_prompt.c
- nsh_init.c     revise to use nsh_update_prompt once
- nsh_session.c  revise to use methods in nsh_prompt.c
- Makefile       add nsh_prompt.c
- CMakeLists.txt add nsh_prompt.c

New additions in `nshlib/`

- nsh_prompt.c   prompt related data structures and methods.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-25 00:55:47 -08:00
Alan Carvalho de Assis
f1137b3b55 apps: Make /dev/temp0 as default to system/lm75
The stm32 common logic board uses /dev/temp0 as
default, but system/lm75/lm75.c is trying to
open /dev/temp instead

Signed-off-by: Alan C Assis <acassis@gmail.com>
2024-02-23 19:21:40 -08:00
vela-mib
02d212e829 fix pthread_sigmask_4_1 sigprocmask_4_1 build warning
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-02-23 04:11:17 -08:00
Neo Xu
c1dfeae0b3 cmake: add lvgl cmake support
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-02-22 21:22:41 -08:00
Zhe Weng
9236d9a2f4 apps/tcpdump: Support capture RAW IP interfaces like TUN
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-02-22 21:22:00 -08:00
vela-mib
be74e34ede add mm/sched and open posix on CI
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-02-22 06:55:01 -08:00
YAMAMOTO Takashi
60cd8ff592 toywasm: regen
```
REF=4ccb44f9f6477412c289f7ffad6a0f660e99d5a5 ./regen.sh
```
2024-02-21 18:39:06 -08:00
YAMAMOTO Takashi
e3205459af toywasm: update to v41 2024-02-21 18:39:06 -08:00
Yanfeng Liu
b32abfab39 build/ci: fix CI blocking unused variables/functions issues
This patch attempts to fix the blocking issues encountered with build
6374 of apps/pull/2300.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-21 18:38:53 -08:00
Yanfeng Liu
3dd35cb549 nshlib/syscmds: guard help mesg for rpmsg ping
This patch guards help message for ping sub-command so that it only
shows when the sub-command is enabled.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-21 05:31:45 -08:00
rongyichang
1e9daf0200 apps/graphics: add lcddev_obj initialization to fix crash in lcd_dev mode.
Reference: https://github.com/apache/nuttx/issues/11683

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2024-02-20 21:55:39 -08:00
Jorge Guzman
90ea9821df modbus_master: fix cmake build warning
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2024-02-20 08:58:30 -08:00
simbit18
faa8f6666f tools/ci: add initial support for MSYS2
build.yml  -> add msys2 job
2024-02-19 08:32:54 -08:00
wangyongrong
25e8c1c9c4 cmd rptun: Strip rpmsg ioctl and rptun ioctl.
cmd_rptun handles RPTUNIOC_START, RPTUNIOC_STOP, RPTUNIOC_RESET,
cmd_rpmsg handles the public ioctl commands part.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-02-19 05:59:34 -08:00
chao an
05ffbabca7 nsh/uname: improve compatibility for non-GNU compilers
The alloca() function is machine- and compiler-dependent.  For certain
applications, its use can improve efficiency compared to the use of
malloc(3) plus free(3).  In certain cases, it can also simplify memory
deallocation in applications that use longjmp(3) or siglongjmp(3).
Otherwise, its use is discouraged.

Signed-off-by: chao an <anchao@lixiang.com>
2024-02-19 03:49:22 -08:00
raiden00pl
1cb991cce7 i8sak: add support for tracedump command
used to dump trace log from radio
2024-02-18 04:10:48 -08:00
Jorge Guzman
49204e1389 modbus_master: fix modbus master example 2024-02-17 05:01:18 -08:00
zhangchao53
f9f63dc8e1 add cmocka tools and fix __WORDSIZE not defined warning 2024-02-15 04:56:13 -08:00
Abhishek Akkabathula
da9903fe57 elf/tests/helloxx: fix build break with elf cpp exceptions example
fix the below build error by correcting the typo (tring -> string)

hello++5.cxx: In member function 'virtual void CThingSayer::ThrowMyThing(const char*)':
hello++5.cxx:157:21: error: 'tring' was not declared in this scope
  157 |   throw MyException(tring(czSayThis));
      |                     ^~~~~

Signed-off-by: Abhishek Akkabathula <a.akkabathul@samsung.com>
2024-02-15 08:31:51 +01:00
SPRESENSE
90c9364b3b lte/alt1250: Force change modem parameter
In some conditions, LTE connection has issue.
To fix it, need to change a modem parameter.
2024-02-15 08:14:10 +01:00
Tiago Medicci Serrano
9fd1251dcb examples/rmtchar: Increase initial duration time
With higher RMT source clocks, small durations are hard to be
detected. Increasing it makes it easier to enable automated tests.
2024-02-14 10:53:40 -05:00
SPRESENSE
3650251c5e lte/alt1250: Fix bug that caused stack when executing the socket API
Fix a bug that caused the application to get stuck when executing
the socket API after waking up from hibernation and before executing
lte_hibernation_resume().
2024-02-09 14:52:05 +02:00
SPRESENSE
2ac0adf37d lte/alt1250: Correspond to ALT1250_EVTBIT_RESTARTAPI event
If the ALT1250_EVTBIT_RESTARTAPI event is received,
the ALT1250 daemon changes its state to handle LAPI normally.
2024-02-08 23:52:47 +02:00
raiden00pl
4c3dcb2044 cmake: add ieee802154 tools 2024-02-05 08:46:22 -08:00
raiden00pl
89cf6b4ce6 cmake: add smp test 2024-02-05 08:46:22 -08:00
raiden00pl
9921571674 cmake: add cachespeed 2024-02-05 08:46:22 -08:00
raiden00pl
364ca42837 cmake: fix spinlock_bench compilation 2024-02-05 08:46:22 -08:00
YAMAMOTO Takashi
46888aa8e4 toywasm: regen for v38
```
REF=b3e060f308db23e21aaa3004484bf9335e4d3fcc ./regen.sh
```
2024-02-05 03:37:32 -08:00
YAMAMOTO Takashi
aba3e27c6c toywasm: update to v38 2024-02-05 03:37:32 -08:00
Ville Juven
0f31a8d98e nsh_fscmds.c: Fix CONFIG_FS_SHM -> CONFIG_FS_SHMFS
The define macro was wrong
2024-01-31 08:52:05 -08:00
chao an
0968264ac0 nshlib: fix build break if CONFIG_CPP_HAVE_VARARGS if undefined
ctc E272: ["nsh_ddcmd.c" 197/7] undeclared identifier "vtbl"

Signed-off-by: chao an <anchao@lixiang.com>
2024-01-30 20:44:05 -08:00
wangyongrong
32f269a079 nsh_syscmds: update rptun_ping to rpmsg_ping, add cmd_rpmsg.
To support rpmsg ioctl, add cmd_rpmsg function, and update rptun ping to rpmsg ping.
depends on apache/nuttx#11618

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-01-30 20:42:49 -08:00
YAMAMOTO Takashi
b43340b0aa toywasm: regen
```
REF=15e6585cecd8049a03a901a4ed8a6b2dd3c18e48 ./regen.sh
```
2024-01-30 04:09:27 -08:00
YAMAMOTO Takashi
df573bb024 toywasm: bump the version 2024-01-30 04:09:27 -08:00
Yanfeng Liu
d381699ac1 testing/getprime: add cmake support
add CMakeLists.txt to support building with CMake

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-27 00:56:13 -08:00
yangjian11
09122debe9 nsh_timcmds: display date using set format
Reference: https://www.geeksforgeeks.org/date-command-linux-examples/?ref=gcse#9-list-of-format-specifiers-used-with-date-command

Signed-off-by: yangjian11 <yangjian11@xiaomi.com>
2024-01-26 19:13:25 -08:00
Michal Lenc
61d1f37f5f nsh_timcmds: show RTC time in timedatectl command only if CONFIG_RTC_DRIVER is set
NuttX build fails otherwise as required structures are not included.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-01-26 09:45:03 -08:00
Junbo Zheng
c699b05f74 nshlib: add expr command support
It is a mini version for the `expr` command, which implements the features of addition, subtraction, multiplication, division and mod.

Reference: https://www.geeksforgeeks.org/expr-command-in-linux-with-examples/

bl2>
bl2> expr 1 + 2
3
bl2> expr
Usage: expr <operand1> <operator> <operand2>
bl2> expr 5 - 2
3
bl2> set hello 10
bl2> expr $hello - 2
8
bl2> expr 8 a 9
Unknown operator
bl2> expr 20 / 5
4
bl2> expr 10 % 4
2
bl2> expr 10 / 0
operand2 invalid
bl2>
bl2> expr mi + 100
invalid parameter
bl2> expr 100 + mi
invalid parameter
bl2> expr 100 + 0
100

Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2024-01-25 18:12:28 -08:00
Yanfeng Liu
596328ccca nshcmd/rptun: align help mesg with impl
the ping subcommand is guarded with RPTUN_PING in its handler.
its help mesg should have same guard to avoid confusing user.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-25 18:11:39 -08:00
xuchaojie
ca5293629f wapi: Add pscan cmd to trigger a passive scan.
Added scanning in passive mode without affecting the scan command.

Signed-off-by: xuchaojie <xuchaojie@xiaomi.com>
2024-01-25 03:10:06 -08:00
SPRESENSE
a16fb23dd7 lte/alt1250: Notice instance information
Notice instance information of LwM2M server operation to application.
2024-01-24 22:21:56 +01:00
Takeyoshi Kikuchi
c82aa9f683 config.nims: fix NimSuggest crash.
When editing in VSCode, NimSuggest refers to config.nims and tries
to find the NuttX .config.
Fixed a problem that .config cannot be read because the environment
variable "TOPDIR" is not defined.

Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2024-01-23 04:03:59 -08:00
dependabot[bot]
dabdad732e build(deps): bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 23:17:06 -08:00
Yanfeng Liu
14d4059159 Zig: revise apps build support
This requires nuttx/pull/11548 to work.

- Zig apps can use normal entrance "main()" now as we
- added RENAMEMAIN for none BUILD_MODULE case.
- enabled Zig program building in BUILD_MODULE case.

Note the Zig main source need to have "fn main(" pattern as
renaming is implemented via `sed`.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-21 06:21:18 -08:00
Huang Qi
dbcbec363d wamr: Add new option to enable quick aot entry
Enable AOT quick entry to improve performance for call
AOTed function from host side in some cases with simple
signature.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-01-19 01:02:59 -08:00
YAMAMOTO Takashi
70108ae59e wamr: bump the default stack guard size
using 0 by default seems a bit too aggressive to me.

1024 here is what would have been used before this kconfig knob
was introduced by https://github.com/apache/nuttx-apps/pull/1259.
It also matches some expectations in the recent wamrc.
40b430fd24/core/iwasm/compilation/aot_emit_aot_file.c (L2672-L2678)
2024-01-19 09:08:10 +01:00
zhanghongyu
9c48a8d4fc iperf: add parameters to support dynamic device bind
In addition to the CONFIG_NETUTILS_IPERFTEST_DEVNAME configuration, you can specify network cards by parameter to support devices with multiple network interface

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-01-17 00:54:31 -08:00
Xiang Xiao
e4e43a1ca0 adb: Don't declare variables in the middle of function
and unify the prefix from ADB to ADBD

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-01-15 19:29:57 +08:00
Xiang Xiao
db0e0b9bfe adbd/logcat: Change alog_ prefix to logcat_
to unify the prefix usage in the code base

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-01-15 19:29:57 +08:00
YAMAMOTO Takashi
8930743831 Wasm.mk: disable by default
Fixes partly: https://github.com/apache/nuttx-apps/issues/2046

Also, this fixes warnings like:
```
spacetanuki% ./tools/configure.sh -E sim:wamr
  Copy files
  Select CONFIG_HOST_MACOS=y
  Refreshing...
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory              /usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
CP: arch/dummy/Kconfig to /Users/yamamoto/git/nuttx/nuttx/arch/dummy/dummy_kconf
ig
CP: boards/dummy/Kconfig to /Users/yamamoto/git/nuttx/nuttx/boards/dummy/dummy_k
config
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory
/usr/local/bin/bash: line 1: /bin/clang: No such file or directory

```
2024-01-13 02:16:16 -08:00