This commit corresponds to apache/nuttx#11498 in nuttx.
Move etc romfs mount to sched/init for compatibility with kernel/protected mode.
changes:
- move etc romfs mount from nsh to Nuttx, but keep the script to parse and execute.
- move and rename the related CONFIG, move customized nsh_romfsimg.h to etc_romfs.c
in boards, and no need declaration for romfs_img/romfs_img_len.
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
server:
when ipv6 is enable:
ap> coap_server
only ipv4 is enable, we need to specify the ip address of the network card:
ap> coap_server -A [ipv4 address]
client:
ap> coap_client -m get coap://[ipv4/6 address]/time
Dec 26 06:41:12
Other Examples:
coap_client -m get coap://[::1]/
coap_client -m get coap://[::1]/.well-known/core
coap_client -m get coap+tcp://[::1]/.well-known/core
coap_client -m get coap://%2Funix%2Fdomain%2Fpath%2Fdgram/.well-known/core
coap_client -m get coap+tcp://%2Funix%2Fdomain%2Fpath%2Fstream/.well-known/core
coap_client -m get coaps://[::1]/.well-known/core
coap_client -m get coaps+tcp://[::1]/.well-known/core
coap_client -m get coaps://%2Funix%2Fdomain%2Fpath%2Fdtls/.well-known/core
coap_client -m get coaps+tcp://%2Funix%2Fdomain%2Fpath%2Ftls/.well-known/core
coap_client -m get -T cafe coap://[::1]/time
echo -n 1000 | coap-client -m put -T cafe coap://[::1]/time -f -
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
NuttX Build fails when it compiles `examples/hello_nim` for RISC-V (32-bit and 64-bit). That's because the Nim Config Script `config.nims` couldn't identify the Nim Target Platform: `riscv32` or `riscv64`.
This PR fixes `config.nims` so that Nim Compiler correctly derives the Nim Target Platform (`riscv32` or `riscv64`), by searching NuttX `.config` for `CONFIG_ARCH_FAMILY=rv32` or `rv64`.
This logic is slightly different from the Nim Targets `arm` and `arm64`, which are currently derived from `CONFIG_ARCH=arm` and `arm64`.
`config.nims` is explained in this article: https://lupyuen.github.io/articles/nim#inside-nim-on-nuttx
The Nim Example App fails to build because the `.nimcache` is located 2 folders up. This PR fixes the location of `.nimcache` in the `Makefile` of the Nim Example App.
`.nimcache` is explained in this article: https://lupyuen.github.io/articles/nim#inside-nim-on-nuttx
"dns" option of `ifconfig` can work just with `CONFIG_NETDB_DNSCLIENT`,
no need to depend on `CONFIG_NETINIT_DNS` or `CONFIG_NETINIT_DHCPC`.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
1.call AUDIOIOC_RELEASE when finished
2.make sure the driver dequeue all buffers before free the buffers
Signed-off-by: renjianguang <renjianguang@xiaomi.com>
task_* APIs are unavailable in kernel build mode, replacing with
posix_spawn or pthread_* API to pass the case. But posix_spawn requires
some dependency, for example CONFIG_BUILTIN and CONFIG_LIBC_EXECFUNCS,
so pthread_* APIs are used in most scenarios. Some tests should be
re-visited because the intent is to user another task (in this case
another process) to e.g. receive signals.
That will require quite a bit of extra work.
Tests that had to be disabled:
- restart: task_restart() does not work at all with kernel mode so it is
disabled entirely
- fpu: make sure the FPU test is not even attempted, because it will cause
ASSERT() and stop the test
- vfork: vfork() does not work for some reason in CONFIG_BUILD_KERNEL,
there is something missing on the kernel side, so just disable the test for now
Tests that should be re-visited:
- The signal tests, now they signal the process itself while before the
signal was sent to another task. This will require building the part
that receives the signal as a separate process
- waitpid: Like stated above, waitpid does not work for pthreads
- suspend: kill to send signal does not work for pthreads
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
Co-authored-by: Ville Juven <ville.juven@unikie.com>
The RMT (remote control) character driver is used to send and/or
receive data packets. Eventually, this app can be used to perform
a loopback test to validate the RMT driver implementation.
bas_token.l: In function 'yylex':
Error: bas_token.l:1210:31: error: 'strcpy' writing 1 or more bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
1210 | }
| ^
In file included from bas_auto.h:77,
from bas_token.l:16:
bas_token.h:103:8: note: at offset 2 into destination object 'name' of size 2
103 | char name[2/* ... */];
| ^~~~
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Switch the order of setting network mask and gateway, re-order only, no
logic change.
In IPv6 cases, we may set `addr6` and prefix length together to an
interface, but the gateway logic may change the value in `addr6`, and
result in wrong address set to the interface.
The order doesn't change behavior in network stack, so we just need to
make sure the value is correct.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
If Managed Address Congfiguration flag in the Router Advertisement
Messsage is set, we would obtain the IPv6 address though the stateful
DHCPv6 procedure.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
And leave all intermediate file in apps/wasm,
such as .map file, entry object etc used in
wasm module build.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Try to follow current NuttX's toolchain parttern:
Wasm.mk: Provide target rule for building wasm module
WASI-SDK.defs: Provide compile flags for building
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Before WAMR 1.3.0, eabihf in wamrc is `gnueabihf`, so without
this patch call wamrc will failed with target abi was `eabihf`,
we should convert the standard llvm target to wamrc required.
Both `eabihf` and `gnueabihf` supported after WAMR 1.3.0.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Since this change is only merged into the lvgl.v9, let us workaround for v8:
37835260ca
./lvgl/src/core/lv_obj.c:363:25: warning: variable 'x' set but not used [-Wunused-but-set-variable]
363 | static uint32_t x = 0;
| ^
1 warning generated.
CFLAGS += -Wno-unused-but-set-variable
Signed-off-by: chao an <anchao@xiaomi.com>