Commit Graph

49015 Commits

Author SHA1 Message Date
YAMAMOTO Takashi
0066bf80d2 esp32: enable LIBC_ARCH_ATOMIC
fixes a build issue in https://github.com/apache/nuttx-apps/pull/1723
2023-04-24 10:12:57 +08:00
yinshengkai
a40a802f9b sched/pthread: repalce sched_lock to enter_critical_section
After RR is enabled, an interrupt occurs during this period and the task cannot be switched

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-04-24 01:54:44 +08:00
zhanghongyu
9162800255 tcp_input: drop SYN when no free node in the backlog
Wait for the client to retransmit the ack before trying to allocate the
backlog

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-04-24 01:52:33 +08:00
hujun5
6063c0516e cpu: in SMP pthread_cancel occasionally deadlock
In smp when cpu0 calls up_cpu_resume to release the cpu1 lock, another locked cpu1 did not execute immediately,
and soon cpu0 called up_cpu_resume again, now cpu1 unable to respond to the interrupt at this time, resulting in a deadlock.
Our solution is to restore cpu1 execution from asynchronous to synchronous to ensure that cpu1 is restored.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-04-23 23:33:09 +08:00
anjiahao
9971dfd0c1 circbuf support write or read buffer direct
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-04-23 23:32:00 +08:00
anjiahao
781a34da94 memepool:fix memory consumption double counting issue
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-04-23 23:28:32 +08:00
anjiahao
49cd7a795a mm:change special pid to macro
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-04-23 23:28:32 +08:00
chao an
f2257ffd80 rv-virt/nsh64: enable CONFIG_BCH to support block device access
Since ramdisk is registered as block device, enable CONFIG_BCH
to support block device access

Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-23 23:27:23 +08:00
YAMAMOTO Takashi
2d223d0744 Documentation/platforms/sim/sim/boards/sim: mention toywasm config 2023-04-23 23:19:20 +08:00
YAMAMOTO Takashi
a5bf3d769b Add sim:toywasm config 2023-04-23 23:19:20 +08:00
Lwazi Dube
129a0703c4 bluetooth: Fix the Unexpected ACL flags error
This change fixes a bug that was introduced when a 16 bit handle was
changed into a 12 bit bitfield without adapting the rest of the stack.
2023-04-23 17:14:01 +08:00
chao an
13cdffd302 fs/procfs: fix readdir loss last character
nsh> ls proc/fs
/proc/fs: ----> /proc/fs:
 block           blocks
 moun            mount
 usag            usage

Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-23 17:13:51 +08:00
zhanghongyu
50488ac8f3 sim: multi netdevice forward issue when ll_guardsize not 14
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-04-23 10:37:50 +03:00
zhanghongyu
37644c8818 Revert "sim: multi netdevice forward issue when ll_guardsize not 14"
This reverts commit a69c6c1dac.
2023-04-23 10:37:50 +03:00
Huang Qi
b21f68d751 tools/mksymtab: Fix a compilation warning
Fix:
```
mksymtab.c: In function ‘main’:
mksymtab.c:280:15: warning: the comparison will always evaluate as ‘true’ for the address of ‘g_parm’ will never be NULL [-Waddress]
  280 |       cond = (g_parm[COND_INDEX] && strlen(g_parm[COND_INDEX]) > 0);
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-23 12:22:19 +08:00
TimJTi
4719e44b8b APDS9922
WIP

WIP - ALS now OK with full IOCTL.

WIP

WIP

ALS now works as intended

WIP - getting to bottom of crash when ctrl-c the app

Seems to all work...

ioctl #define changes

Update ioctl.h

Maybe final changes

Maybe final changes - again

Delete .settings directory

Delete nuttx Default.launch

Maybe final changes - again

changes after initial feedback

changes after initial feedback

Add snerr error when incorrect device ID seen

Update apds9922.c

Revert "Merge branch 'apds9922' of https://github.com/TimJTi/nuttx into apds9922"

This reverts commit 8fdf5cbfb783d25251d13bc338ece6adca1308bc, reversing
changes made to 0d58237ba27f3cf87cf711658f5388d974be502e.

Improve probe error messages

APDS9922

WIP

WIP - ALS now OK with full IOCTL.

WIP

WIP

ALS now works as intended

WIP - getting to bottom of crash when ctrl-c the app

Seems to all work...

ioctl #define changes

Update ioctl.h

Maybe final changes

Maybe final changes - again

Delete .settings directory

Delete nuttx Default.launch

Maybe final changes - again

changes after initial feedback

changes after initial feedback

Add snerr error when incorrect device ID seen

Update apds9922.c

Revert "Merge branch 'apds9922' of https://github.com/TimJTi/nuttx into apds9922"

This reverts commit 8fdf5cbfb783d25251d13bc338ece6adca1308bc, reversing
changes made to 0d58237ba27f3cf87cf711658f5388d974be502e.

Improve probe error messages

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Delete .gitignore

Changes after PR review

Remove static arrays from header file

Update apds9922.c

improvements to enum usage

Restore .gitignore

Update Kconfig

Update .gitignore

Update .gitignore
2023-04-22 20:38:29 +08:00
zouboan
9bc3a9e4bb drivers/mpu60x0 Fix the error when mpu60x0 in SPI case 2023-04-22 20:38:21 +08:00
Zhe Weng
44a04733d4 mm/iob: Don't return NULL in iob_pack
We don't want to get a NULL pointer after iob_pack on an IOB chain with
several iobs with length 0, it should return one IOB with length 0.
Otherwise each place calls iob_pack needs to check the result.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 19:26:22 +08:00
Zhe Weng
1aceb1d872 net/tcp: Fix clear condition in ofoseg input
We have a case that an http server gives out-of-ordered ACKs, and NuttX client makes `ofoseg`s with length 0, trying to rebuild / put them into `ofosegs` array, which is not intended (no available data and should be skipped). This breaks later logic and finally crashed in `tcp_ofoseg_bufsize` (`ofosegs[i].data` is `NULL`, which should never happen in normal logic).

Note:
- `iob_trimhead` won't return `NULL` when it's applying on normal IOB.
  - Keep `dev->d_iob == NULL` to avoid `iob_trimhead` changed.
- `iob_free_chain` will do nothing when applied to `NULL`.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 19:26:22 +08:00
zhanghongyu
6c73221dd4 forward: limit the forwarding range of broadcast packets
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-04-22 19:24:46 +08:00
Xiang Xiao
4be499a243 procfs: Make g_procfs_entries in the alphabetic order
and option in procfs/Kconfig

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-22 03:33:50 -04:00
Xiang Xiao
c6d210289f procfs: remove procfs_ from procfs_operations variables
to aglin the naming style with other implementation

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-22 03:33:50 -04:00
Xiang Xiao
149cafe450 procfs: Add g_ prefix to all procfs_operations
to conform the coding style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-22 03:33:50 -04:00
rongyichang
e6490694a1 drivers/video: passthrough unknown ioctl commands for customized scenarios in fb
driver

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-04-22 12:48:46 +08:00
ZhongAn
7eeba71366 audio: add audio_dma device driver.
Signed-off-by: ZhongAn <zhongan@pinecone.net>
2023-04-22 01:50:51 +08:00
YAMAMOTO Takashi
72783209a3 Migrate sim board README.txt to Documentation 2023-04-22 01:47:46 +08:00
AuroraRAS
581e9ce80b Add MPU60x0 IMU sensors support for ESP32C3
Add MPU60x0 IMU sensors support for ESP32C3

Signed-off-by: AuroraRAS <chplee@gmail.com>
2023-04-22 01:47:09 +08:00
Zhe Weng
d8da8dcc44 libc: Print error code for unknown errors in strerror/gai_strerror
Ref: Linux print unknown errors like "Unknown error nnn"
https://man7.org/linux/man-pages/man3/strerror.3.html#RETURN_VALUE

Note:
These interfaces are called at low freq, so a static buffer may be enough.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:46:39 +08:00
Denis Tolstov
ec3355a518 boards/stm32f411-minimum: Add support for USB mass storage (gadget)
* Bind smartfs0 to LUN 0 instead of mmcsd0
* Use USB composite code from similar boards
* Pull in CDC/ACM code as well

boards/stm32f411-minimum: composite: style refactor

* Unalign `int strbase = ` text, use single spaces
* Rename `int n` to `int dev_idx` like in newer `_composite.c` board code
* Add composite defconfig with CDC/ACM and MSC for build-testing
2023-04-22 01:45:19 +08:00
Denis Tolstov
da53c294b6 boards/stm32f411-minimum: Add optional onboard flash support
* Enable W25Q64 on SPI1 and use SMARTFS (using code from similar boards)
* Set defconfig dates to something more recent
2023-04-22 01:45:19 +08:00
Denis Tolstov
f09f167592 boards/stm32f411-minimum: Add README.txt 2023-04-22 01:45:19 +08:00
Denis Tolstov
b62db2b095 boards/stm32f411-minimum: Unmap USBHOST GPIOs
* OTG_FS_VBUS, OTG_FS_ID conflict with USART1. These are not
  connected to USB-C in any WeAct Studio MiniF4 board revisions.
* PC9 PWRON & PD5 OVER do not exist on UFQFPN48.
2023-04-22 01:45:19 +08:00
zhanghongyu
93c3b8f19e tcp: add TCP_MAXSEG support
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-04-22 01:42:47 +08:00
zhanghongyu
bd4d7a1b76 tcp: accept conn inherits some properties of listener conn
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-04-22 01:42:47 +08:00
raiden00pl
d416ead27c arch/nrf52: reimplement I-Cache control operations in nrf52_start.c 2023-04-22 01:42:01 +08:00
raiden00pl
c70c178a7d arch/nrf52: nvmc and flash should depends on ALLOW_BSD_COMPONENTS=y 2023-04-22 01:42:01 +08:00
zhanghongyu
a69c6c1dac sim: multi netdevice forward issue when ll_guardsize not 14
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-04-22 01:41:01 +08:00
Zhe Weng
60e66d5e29 net/netdev: Support dedicated thread in upper half driver
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:41:01 +08:00
Zhe Weng
f21742899f net/netdev: Use upper half of netdev to simplify sim driver
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:41:01 +08:00
Zhe Weng
72b77d36e2 net/netdev: Add upper half of netdev to simplify driver logic
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:41:01 +08:00
Stuart Ianna
4cae98674d litex: Support for kernel build with vexriscv-smp. 2023-04-22 01:40:32 +08:00
qinwei1
c4f3f8801f arm64: Support for FPU profiling with procfs
Summary:

   To reduce the count of FPU context switching will result at a
performance improve with system. it need to balance between
the using of FPU and counts of FPU trap
   the PR submit a base method to see performance counts for
the FPU with NuttX procfs
   Please read README.txt at chapter of FPU Support and Performance
for more information

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-04-22 01:38:21 +08:00
Xiang Xiao
165e266502 reboot: Remove SYS_DOWN to avoid the confusion
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-21 20:37:59 +03:00
Xiang Xiao
404de093a1 fs: Flush the file system cache in BOARDIOC_POWEROFF too
and remove the check of SYS_DOWN since it defines to SYS_RESTART in reboot_notifer.h:
  #define SYS_DOWN        0x0001     /* Notify of system down */
  #define SYS_RESTART     SYS_DOWN
  #define SYS_HALT        0x0002     /* Notify of system halt */
  #define SYS_POWER_OFF   0x0003     /* Notify of system power off */

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-21 20:37:59 +03:00
raiden00pl
b737d410b9 bt_rpmsghci: fix warnings 2023-04-22 01:37:24 +08:00
raiden00pl
d3fd1f50aa boards/nrf5340-dk: add RPMSG HCI controller support and examples 2023-04-22 01:37:24 +08:00
raiden00pl
bd9bfa9302 arch/nrf53: add RPMSG HCI controller support 2023-04-22 01:37:24 +08:00
raiden00pl
760e02977f boards/nrf5340-dk: add procfs support 2023-04-22 01:37:24 +08:00
zhanghongyu
fdc6dbf176 netlink: add RTM_NEWADDR, RTM_DELADDR and RTM_GETADDR
We have projects that need to sense ip address changes in time,
and set ip address or clear ip address through netlink
so the relevant implementation is added.
The usage and command structure are consistent with linux

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-04-22 01:35:18 +08:00
Fotis Panagiotopoulos
873abcb9ab stm32_eth: Added error handling for abnormal interrupts. 2023-04-22 01:30:48 +08:00