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>
Fixed bug where negative offsets were not properly handled because
clock_timespec_subtract clamps values to zero.
Implement support for SO_TIMESTAMP to get accurate packet
reception timestamp.
Implemented delay requests for measuring packet transfer delay.
Implemented clock drift estimation to bring the clocks closer to
sync and to filter out measurement jitter.
If multicast PTP packets are not being received, rejoin the multicast group.
This automatically recovers from situations such as rebooting a network switch.
The community version needs to dynamically fetch the matter source code at compile time and apply the required nuttx adaptation patch
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
A nuttx with the matter command can be compiled using cmake and enable CONFIG_MATTER option.
The matter compiled by the current script is just a lighting example of
a limited number of commands that can be tested by chip-tool.
After nuttx is connected to the LAN and the matter command is executed, other devices in the LAN, such as linux PCS, can run the following commands to scan, connect, turn on and off, adjust brightness and contrast, and so on.
chip-tool pairing onnetwork 1 20202021
chip-tool onoff on 1 1
chip-tool levelcontrol move-to-level 128 10 0 0 1 1
chip-tool colorcontrol move-to-hue-and-saturation 240 100 0 0 0 1 1
Depends on the following configuration options:
CONFIG_CRYPTO_MBEDTLS=y
CONFIG_DEV_URANDOM=y
CONFIG_LIBCXX=y
CONFIG_LIBM=y
CONFIG_NET_IPv6=y
CONFIG_NET_ICMPv6=y
CONFIG_NET_ICMPv6_AUTOCONF=y
CONFIG_NET_ICMPv6_NEIGHBOR=y
CONFIG_NET_ICMPv6_ROUTER=y
CONFIG_NET_ICMPv6_SOCKET=y
CONFIG_NET_IGMP=y
CONFIG_NET_MLD=y
CONFIG_NET_MLD_ROUTER=y
This initial version does not yet have Bluetooth and OTA support.
The community version needs to dynamically fetch the matter source code at compile time and apply the required nuttx adaptation patch.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>