Commit Graph

7296 Commits

Author SHA1 Message Date
Petteri Aimonen
af6e4d2cb9 ptpd: Code style and FAR pointer fixes 2023-11-24 20:15:38 -08:00
Petteri Aimonen
0adce22400 ptpd: Implement status & stop interfaces 2023-11-24 20:15:38 -08:00
Petteri Aimonen
efc6cfddb4 ptpd: Fix compilation error when debug messages disabled
The debug macros did not get declared in all setups.
2023-11-24 20:15:38 -08:00
Petteri Aimonen
e2168abe9a ptpd: Implement delay reqs, fix timing bugs
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.
2023-11-24 20:15:38 -08:00
Petteri Aimonen
8dbf26016a ptpd: Re-join multicast group after timeout
If multicast PTP packets are not being received, rejoin the multicast group.
This automatically recovers from situations such as rebooting a network switch.
2023-11-24 20:15:38 -08:00
zhanghongyu
ae59177279 matter: download chip and dependent source for open source version
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>
2023-11-23 00:19:37 -08:00
zhanghongyu
72e67e9d6d jsoncpp: add cmake scripts for jsoncpp
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-11-23 00:19:37 -08:00
zhanghongyu
891c5e0cc8 matter: add cmake support
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>
2023-11-23 00:19:37 -08:00
Huang Qi
097411de49 wamr: Add support for custom section loading
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-11-21 08:11:59 -08:00
Marco Casaroli
ba43911a77 libtest: add PRIVATE to CMakeLists.txt
It looks like this word is needed for this build to work with cmake
2023-11-21 08:05:02 -08:00
raiden00pl
27588be53e examples/foc: replace CONFIG_INDUSTRY_FOC_* with CONFIG_EXAMPLES_FOC_*
Decouple the FOC example configuration from the FOC lib configuration.
Purely cosmetic change, without affecting functionality.
2023-11-18 08:40:16 -08:00
raiden00pl
d589443980 industry/foc: fix direction alignment
CCW direction wasn't properly detected when we start alignment from near zero position
2023-11-18 08:39:40 -08:00
Huang Qi
1cf9640bb6 Wasm.mk: Allow application defined linker flags
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-11-17 18:46:51 -08:00
raiden00pl
cdbd14eb5f cmake: support for system/uorb 2023-11-17 03:32:54 -08:00
simbit18
6a35182033 Fix Kconfig style
Remove spaces from Kconfig files
Replace help => ---help---
Add TABs
Add comments
2023-11-16 20:31:08 -08:00
Masayuki Ishikawa
79c7962af6 apps: Replace CONFIG_ARCH_HAVE_VFORK with CONFIG_ARCH_HAVE_FORK
Summary:

- Resolves an issue where `vfork_test` was not executed following
  the renaming from CONFIG_ARCH_HAVE_VFORK to CONFIG_ARCH_HAVE_FORK,
  as detailed in https://github.com/apache/nuttx/pull/9755.

Impact:
- Please merge https://github.com/apache/nuttx/pull/11200 before
  merging this PR.

Testing:
- Successfully tested with rv-virt:smp64, spresense:smp, and sim:smp.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-11-16 07:58:57 -08:00
raiden00pl
144bf0bd1f examples/foc: remove obsolete CONFIG_EXAMPLES_FOC_IPHASE_ADC option 2023-11-15 18:49:42 +01:00
chao an
6754d42715 system/popen: popen should depends on pipe()
Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-15 08:27:28 -08:00
raiden00pl
fa19b71ba4 examples/foc: get iphase scale from the FOC device interface 2023-11-15 03:48:53 -08:00
raiden00pl
9eb5bd4091 examples/foc: pass from velocity controller to torque controller 2023-11-14 09:46:07 -08:00
raiden00pl
ce53f0fc4c examples/foc: add torque saturation 2023-11-14 09:46:07 -08:00
raiden00pl
dc4330476d examples/foc: add velocity saturation 2023-11-14 09:46:07 -08:00
raiden00pl
32a8c29753 examples/foc: don't raise error when EXAMPLES_FOC_IPHASE_ADC isn't set
This is the first step towards getting rid of CONFIG_EXAMPLES_FOC_IPHASE_ADC completely
2023-11-14 04:42:13 -08:00
raiden00pl
eeacbdde3a examples/foc: get velocity from observer if sensored mode 2023-11-14 10:30:52 +01:00
raiden00pl
c5314b54a4 examples/foc: fix active brake for sensored mode 2023-11-14 10:30:52 +01:00
raiden00pl
cb36d9c8b2 examples/foc: fix compilation for open-loop without angle observer 2023-11-14 10:30:52 +01:00
raiden00pl
b52f7dae0c examples/foc: set direction when updating new setpoint 2023-11-13 08:49:21 -08:00
raiden00pl
1095aec162 examples/foc: start from the beginning if control loop is started
After the start request to FOC device, we should return to the
beginning of the loop and wait for the first synchronization event.

This also fixes the problem with the extended first loop cycle,
so we can remove the workaround in foc_perf.
2023-11-13 08:48:22 -08:00
raiden00pl
f9a4ace59a examples/foc: fix warning for sensored configurations 2023-11-13 08:47:21 -08:00
raiden00pl
87dcf877e7 examples/foc: raise error if both sensorless and sensored modes enabled 2023-11-13 08:47:21 -08:00
raiden00pl
8a04e2b282 examples/foc: add #error messages 2023-11-13 08:47:21 -08:00
raiden00pl
3c541c496b examples/foc: allow sensored velocity mode 2023-11-13 08:47:21 -08:00
zhangchao53
ac64c7d144 add short command-line arguments and record execution time 2023-11-11 11:23:04 +08:00
Ville Juven
f32b4c7f9c examples/thttpd: Remove TCB_FLAG_CANCEL stuff
The flags are removed from kernel side
2023-11-11 11:22:24 +08:00
Huang Qi
07bbbd541c testing: Fix cmocka_driver_block give more than once
Fix:
```
/home/huang/Work/vela/sifli/apps/Application.mk:273: target 'drivertest_block.c.home.huang.Work.vela.sifli.apps.testing.drivertest.o' given more than once in the same rule
/home/huang/Work/vela/sifli/apps/Application.mk:297: target '/home/huang/Work/vela/sifli/apps/builtin/registry/cmocka_driver_block.bdat' given more than once in the same rule
CC:  romfs_main.c /home/huang/Work/vela/sifli/apps/Application.mk:273: target 'drivertest_block.c.home.huang.Work.vela.sifli.apps.testing.drivertest.o' given more than once in the same rule
/home/huang/Work/vela/sifli/apps/Application.mk:297: target '/home/huang/Work/vela/sifli/apps/builtin/registry/cmocka_driver_block.bdat' given more than once in the same rule
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-11-09 23:53:30 +08:00
Ritvik
6798294129 Fix #2181 : LELYCANOPEN_UNPACKNAME comes from extracted tarball directory 2023-11-09 14:48:15 +01:00
SPRESENSE
efdbaaefdd lte/alt1250: Fix some bugs in alt1250 daemon
Fix alt1250 daemon to return -ENOTTY when receiving ioctl
request and in the state of using kernel's network stack.
Fix alt1250 daemon to return -ENOTSUP when receiving socket
request and in the state of using kernel's network stack.
Fix alt1250 daemon to set dummy subnet mask in network devices.
This allows the correct network device to be selected when two
network devices exist.
2023-11-09 20:11:07 +08:00
Zhe Weng
56ef320d6f nshlib/ifconfig: Add support for add/del a single IPv6 address
Note: We're using similar error codes as Linux:
```
linux> sudo ifconfig eth0 inet6 add fc00::2/64
linux> sudo ifconfig eth0 inet6 del fc00::2/112
SIOCDIFADDR: Cannot assign requested address
linux> sudo ifconfig eth0 inet6 del fc00::3/64
SIOCDIFADDR: Cannot assign requested address
linux> sudo ifconfig eth0 inet6 add fc00::2/64
SIOCSIFADDR: File exists

nuttx> ifconfig eth0 inet6 add fc00::2/64
nuttx> ifconfig eth0 inet6 del fc00::2/112
Failed to manage IPv6 address: Cannot assign requested address
nuttx> ifconfig eth0 inet6 del fc00::3/112
Failed to manage IPv6 address: Cannot assign requested address
nuttx> ifconfig eth0 inet6 add fc00::2/64
Failed to manage IPv6 address: File exists
```

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-11-08 00:20:19 +08:00
Zhe Weng
2f9d98cab2 netutils/netlib: Add support for add/del a single IPv6 address
Note:
The `SIOCSIFADDR` and `SIOCDIFADDR` uses different params for `AF_INET` and `AF_INET6` (`struct ifreq` vs `struct in6_ifreq`) as defined by https://man7.org/linux/man-pages/man7/netdevice.7.html

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-11-08 00:20:19 +08:00
pengyiqiang
8cc06ac5cf testing/monkey: refact monkey test
1. Simplify kconfig configuration items.
2. Use events to control the status of virtual devices and improve testing efficiency.
3. Add adaptive screen resolution support.

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-11-07 18:26:04 +08:00
GC-20-20
0c572e1675 Update serialrx_main.c
Add missing variables
2023-11-06 09:02:42 +08:00
raiden00pl
9ba7092000 examples/foc: add support for control loop performance measurements
also format CMakeLists.txt
2023-11-06 09:02:28 +08:00
raiden00pl
73ab7dedd4 examples/foc: refactor control loop
1. get FOC device state at the beginning of the loop
2. simplify if-else block
2023-11-05 13:56:52 +08:00
TaiJu Wu
388256b7d7 feature: spinlock benchmark
Use multi-threads to measure spinlock.
You can get related setting with make menuconfig.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>
2023-11-05 13:36:14 +08:00
raiden00pl
57f98ee20e industrial/foc: add options to configure foclib logs 2023-11-05 12:15:03 +08:00
Bowen Wang
d6522be9b5 testing/epoll: add epoll test case
This commid add an epoll testcase to test the epoll
Test case 1: epoll_wait timeout test.
Test case 2: epoll_wait with driver call poll_notify()
             many times simultaneously.
Test case 3: epoll_wait with some driver/socket need call
             poll_setup() again when it's internal state
             changed.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2023-11-02 14:49:54 +08:00
yinshengkai
647db6393d nsh: rename CONFIG_SCHED_CPULOAD to CONFIG_SCHED_CPULOAD_NONE
Explicitly select dependencies to avoid automatically selecting inappropriate configurations.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-11-01 09:23:07 +08:00
raiden00pl
b8c35f667e remove nshlib/README.md which is already in Documentation/applications/nsh 2023-10-30 20:33:41 +08:00
Stuart Ianna
8f56bc1de2 testing/sd_bench: Port sdbench testing utility for PX4-Autopilot.
Add port of the sdbench utility from PX4-Autopilot: https://github.com/PX4/PX4-Autopilot

This tool is useful for evaluating and testing peformance of SD cards,
block devices or mount points.
2023-10-30 16:58:10 +08:00
raiden00pl
532bcc5061 remove logging/xxx/README.md. Migrated to Documentation/applications/logging 2023-10-30 10:00:01 +08:00