Commit graph

57289 commits

Author SHA1 Message Date
Ludovic Vanasse
04c7391162 Doc: loading ELF program
Migrate the Updating a release System with ELF programs with child pages
to official wiki
2024-12-29 14:23:27 +08:00
Bowen Wang
f0a3c43a54 rpmsg/rpmsg_virtio_lite: rename rpmsg_virtio to rpmsg_virtio_lite
Because rpmsg_virtio_lite is a better name to inform user that the
rpmsg virtio (original name) is a lite implementation of rpmsg virtio.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-12-28 22:43:20 -03:00
Alin Jerpelea
db1ebe0095 Documentation: add NuttX-12.8.0 release notes
Add release notes for 12.8.0 release

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-28 23:03:40 +08:00
Alin Jerpelea
48f80bf41e Documentation: add NuttX-12.7.0 release notes
Add release notes for 12.7.0 release

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-28 23:03:40 +08:00
Kyle Wilson
1cfab89e65 Added incomplete octospi hardware defintions.
Some checks failed
Build Documentation / build-html (push) Has been cancelled
Register addresses are defined. Bit defintions are still needed.

Bitmaps for OCTOSPI peripheral register

Incremental updates to qspi files

Redefined QSPI/OCTOSPI registers for STM32H5

Fixed register definitions for the STM32H5. However, more work still needs to be done. Some bits that shared registers on the STM32H7 have different register locations on the H5. This still needs to be accounted for.

Fixed more differences vs STM32H7 qspi

Added ifdef for including stm32_dma.h in stm32_qspi.c. Added stm32_qspi.c to Make.defs.

Register fixes. SPI activity but not able to format device yet.

Fixed DCYC mask

Set HCLK frequency to correct value. Undid ccrconfig debug.

Tested Interrupt Mode (single SPI). Added alternate bytes to meminfo and cmdinfo structures. Updated Kconfig variables for STM32H5.

Fixed base register in hardware/stm32_qspi.h. Updated qspi_dumpregs.

The base register was previously set to STM32_QUADSPI_BASE, changed to the correctly named STM32_OCTOSPI1_BASE. However, these defines for the OCTOSPI registers are not even used. Instead qspi_putreg and qspi_getreg utilize the priv->base value to access OCTOSPI registers.

Removed altbytes code, left as before. Moved QSPI clock selection to stm32h5xx_rcc.c

Changed STM32H5_QUADSPI to STM32H5_QSPI1

Added hook to define QSPI_CLK_FREQUENCY as STM32_QSPI_FREQUENCY from board.h

Removed changes to nuttx qspi.h

style fixes
2024-12-28 11:46:49 +08:00
zhangyuan29
ca4fd09275 arch_atomic: change atomic_fetch_x interface to inline function
When CONFIG_LIBC_ARCH_ATOMIC is defined, the atomic_fetch_x
interface conflicts with the atomic_fetch_x interface in libcxx.
Therefore, it has been changed to a inline function.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-28 11:46:04 +08:00
hujun5
4627a087f0 fix compile error
chip/efm32_leserial.c: In function 'efm32_restoreuartint':
Error: chip/efm32_leserial.c:329:37: error: 'len' undeclared (first use in this function); did you mean 'ien'?
  329 |   efm32_restoreuartint_nolock(priv, len);
      |                                     ^~~
      |                                     ien

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-28 11:42:59 +08:00
Kyle Wilson
96fa400c3d Fixed errors in CI build tests for pull request #15351
There were two simple errors when running ci tests on pull #15351. These errors were unrelated to that pull. After investigating I found two simple errors. 1. The len variable was likely a typo that should have been the function argument, ien. 2. The spinlock_t lock was defined in a section dependent on CONFIG_SERIAL_TERMIOS. However, the spinlock_t lock was used in code that did not require the SERIAL_TERMIOS config. Therefore errors resulted.

imxrt_edma_s missing lock variable

CI build tests noted that the variable g_edma was referencing a lock variable that did not exist in the structure. This change adds that missing lock as a spinlock_t type.

Remove unused flags variable from imxrt_dmach_stop

Removed extra =
2024-12-28 11:14:42 +08:00
Matteo Golin
b15cd35bb0 docs/porting: Create a porting guide for the BCM2711 and organize porting case studies into their own directory. 2024-12-27 21:50:19 -03:00
Ville Juven
e19e1a8532 nxsem_destroyholder: Use critical section when destroying holder(s)
Some checks are pending
Build Documentation / build-html (push) Waiting to run
Otherwise the free holder list will leak, causing either a crash due to
holder->htcb = NULL, or the free holder list becomes (erroneously) empty
even though most of the holder entries are free.
2024-12-27 00:28:34 +08:00
chenxiaoyi
ad8902a33e esp32[|s2|s3]: adapt to new syscall implementation
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2024-12-27 00:25:55 +08:00
chenxiaoyi
aa426d1edb xtensa: change write intset register to syscall instruction
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2024-12-27 00:25:55 +08:00
chenxiaoyi
1757ecc5c1 xtensa: add backtrace link from syscall exception
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2024-12-27 00:25:55 +08:00
Peter van der Perk
430c79ff89 imxrt: FlexSPI allow RWW 2024-12-27 00:16:47 +08:00
hujun5
2886fddc0f arm64: fix tpidr maybe null
Before the MPU initialization, the up_update_task(this_cpu()) function is called at a time when hardware cache coherency is not yet enabled.
In certain critical scenarios, Core 1 reads a zero value for tcb from the global variable g_assignedtask and stores this zero value into the tpidr
register. This results in subsequent interrupt handlers reading a zero tcb, causing an exception.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-27 00:16:35 +08:00
Jorge Guzman
d4acd6949f stm32h7/linum-stm32h753bi: fix fdcan configuration
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2024-12-27 00:14:39 +08:00
wangjianyu3
3093b28860 drivers/sensors/gnss: Fix deactivate failure when using both topic and device
Deactivate lower driver fails when both uORB topic and driver device are subscribed and opened.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-27 00:13:47 +08:00
hujun5
c0f7dd979e fix compile error
CC:  pthread/pthread_exit.c common/espressif/esp_lowputc.c: In function 'esp_lowputc_disable_all_uart_int':
common/espressif/esp_lowputc.c:215:29: error: passing argument 1 of 'spin_lock_irqsave' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
  215 |   flags = spin_lock_irqsave(&priv->lock);
      |                             ^~~~~~~~~~~
In file included from common/espressif/esp_lowputc.c:40:
/home/hujun5/下载/vela_sim/nuttx/include/nuttx/spinlock.h:511:55: note: expected 'volatile spinlock_t *' {aka 'volatile unsigned int *'} but argument is of type 'const spinlock_t *' {aka 'const unsigned int *'}
  511 | irqstate_t spin_lock_irqsave(FAR volatile spinlock_t *lock)
      |                                  ~~~~~~~~~~~~~~~~~~~~~^~~~
common/espressif/esp_lowputc.c:232:26: error: passing argument 1 of 'spin_unlock_irqrestore' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
  232 |   spin_unlock_irqrestore(&priv->lock, flags);
      |                          ^~~~~~~~~~~
/home/hujun5/下载/vela_sim/nuttx/include/nuttx/spinlock.h:674:54: note: expected 'volatile spinlock_t *' {aka 'volatile unsigned int *'} but argument is of type 'const spinlock_t *' {aka 'const unsigned int *'}
  674 | void spin_unlock_irqrestore(FAR volatile spinlock_t *lock,

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-26 23:43:49 +08:00
yangsen5
15c1c9d42e sim_alsa: set paused to false when executing close
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2024-12-26 23:31:55 +08:00
zhanghongyu
05f7b7ac97 include/netinet/arp.h: change the type of arp_dev from uint8_t to char
the same variable type in linux is char, in order to avoid modifying
the third-party library code when porting the third-party library code.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-12-26 23:29:23 +08:00
chao an
54e85075c4 sched/event: init deleted node to avoid null pointer reference
nxevent_tickwait() will remove the node in failure case(EINTR). If the node
has been deleted in the nxevent_post(), NULL pointer reference will
be triggered after semaphore wait.

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-26 23:28:37 +08:00
wangmingrong1
500d193096 drivers/e1000: malloc size error
priv->mta is uint32_t

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-26 23:26:18 +08:00
zhangshoukui
ebf1ab5392 lib_get_pathbuffer: Modify size to the maximum value of PATH_MAX and CONFIG_LINE_MAX
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-12-26 13:25:19 +08:00
zhangshoukui
f8377f8666 Add LINE_MAX configuration
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-12-26 13:25:19 +08:00
wangjianyu3
c6c89ac262 Thermal/step_wise: Fix that hysteresis takes no effect
Test command

  nsh> cat /proc/thermal/cpu-thermal

Trips

  /* Copy from drivers/thermal/thermal_dummy.c */

  {.name = "cpu_crit",   .temp = 90, .hyst = 5, .type = THERMAL_CRITICAL},
  {.name = "cpu_alert1", .temp = 70, .hyst = 5, .type = THERMAL_HOT},
  {.name = "cpu_alert0", .temp = 60, .hyst = 5, .type = THERMAL_NORMAL},

Without this patch

  # Error occured when temperature jump to 69.

  z:cpu-thermal t:67 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:72 t:1 h:16 l:0 c:fan0 s:1|1
  z:cpu-thermal t:69 t:1 h:16 l:0 c:fan0 s:0|0
  z:cpu-thermal t:74 t:1 h:16 l:0 c:fan0 s:1|1

With this patch

  z:cpu-thermal t:67 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:72 t:1 h:16 l:0 c:fan0 s:1|1
  z:cpu-thermal t:69 t:1 h:16 l:0 c:fan0 s:1|1
  z:cpu-thermal t:74 t:1 h:16 l:0 c:fan0 s:2|2

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-26 09:23:10 +08:00
wangjianyu3
9899acf20b sim:thermal: Enable command line history
Make it easier to debug.
e.g. execute some commands frequently, like:
  cat /proc/thermal/cpu-thermal

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-26 09:23:10 +08:00
wangjianyu3
975eddaac5 Thermal/procfs: Do not print invalid target cooling state directly
Diff
  - z:cpu-thermal t:48 t:1 h:16 l:0 c:fan0 s:0|4294967295
  + z:cpu-thermal t:48 t:1 h:16 l:0 c:fan0 s:0|(invalid)

The invalid value 4294967295(THERMAL_NO_TARGET, defined as UINT_MAX(0xffffffff)) may bother users.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-26 09:23:10 +08:00
wangjianyu3
e06ff62063 Thermal/dummy: Add temperature jump to test hysteresis
Log

  z:cpu-thermal t:50 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:47 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:52 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:49 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:54 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:51 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:56 t:1 h:16 l:0 c:fan0 s:0|(invalid)

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-26 09:23:10 +08:00
wangjianyu3
8c5a61d93c Thermal: The thermal core depends on LPWORK
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-26 09:23:10 +08:00
wangjianyu3
77630ea6d9 sim:thermal: The thermal core depends on LPWORK
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-26 09:23:10 +08:00
wangjianyu3
3ea7796ef2 sim:thermal: The sim:thermal is based on sim:nsh
Coverting to including sim:nsh.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-26 09:23:10 +08:00
yangsen5
94c0f71db9 v4l2m2m: modify return value of g_bufsize to uint32_t
CID 1578530: (#1 of 1): INTEGER_OVERFLOW

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2024-12-25 17:06:48 +08:00
Zhe Weng
286de7df01 netdev/upper: Fix wrong CPU when RSS is disabled
Some checks failed
Build Documentation / build-html (push) Has been cancelled
When `CONFIG_NETDEV_RSS` is disabled, `NETDEV_THREAD_COUNT` will be 1,
and we should not access `upper->sem[cpu]` with `cpu > 0`.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-12-25 15:58:42 +08:00
hujun5
233e175f28 fix a deadlock
0  up_testset (lock=0x404241c0 <g_uart1priv+32>) at /home/hujun5/下载/vela_sim/nuttx/include/arch/spinlock.h:96
1  spin_lock_wo_note (lock=<optimized out>) at /home/hujun5/下载/vela_sim/nuttx/include/nuttx/spinlock.h:207
2  spin_lock_irqsave_wo_note (lock=0x404241c0 <g_uart1priv+32>) at /home/hujun5/下载/vela_sim/nuttx/include/nuttx/spinlock.h:467
3  spin_lock_irqsave (lock=0x404241c0 <g_uart1priv+32>) at /home/hujun5/下载/vela_sim/nuttx/include/nuttx/spinlock.h:521
4  pl011_txint (dev=0x404240b0 <g_uart1port>, enable=false) at serial/uart_pl011.c:746
5  0x00000000402a3f1c in uart_xmitchars (dev=0x404240b0 <g_uart1port>) at serial/serial_io.c:118
6  0x00000000402a10f8 in pl011_txint (dev=<optimized out>, enable=<optimized out>) at serial/uart_pl011.c:756
7  0x00000000402a2ca0 in uart_write (filep=<optimized out>, buffer=<optimized out>, buflen=0) at serial/serial.c:1493
8  0x000000004028c464 in file_writev_compat (filep=0x4046cda0, uio=<optimized out>) at vfs/fs_write.c:81
9  0x000000004028c588 in file_writev (filep=<optimized out>, uio=uio@entry=0x40470dc0) at vfs/fs_write.c:161
10 0x000000004028c5fc in nx_writev (fd=<optimized out>, iov=iov@entry=0x40470e10, iovcnt=iovcnt@entry=1) at vfs/fs_write.c:257
11 0x000000004028c660 in writev (fd=<optimized out>, iov=iov@entry=0x40470e10, iovcnt=iovcnt@entry=1) at vfs/fs_write.c:356
12 0x000000004028c6dc in write (fd=<optimized out>, buf=buf@entry=0x404090b2 <g_nshgreeting>, nbytes=<optimized out>) at vfs/fs_write.c:421
13 0x00000000402adb10 in nsh_session (pstate=pstate@entry=0x40471080, login=login@entry=1, argc=argc@entry=1, argv=argv@entry=0x4046cf40) at nsh_session.c:108
14 0x00000000402ad94c in nsh_consolemain (argc=argc@entry=1, argv=argv@entry=0x4046cf40) at nsh_consolemain.c:75
15 0x00000000402ad894 in nsh_main (argc=argc@entry=1, argv=argv@entry=0x4046cf40) at nsh_main.c:74
16 0x00000000402a5880 in nxtask_startup (entrypt=0x402ad7fc <nsh_main>, argc=1, argv=0x4046cf40) at sched/task_startup.c:72
17 0x000000004029d444 in nxtask_start () at task/task_start.c:116
18 0x0000000000000000 in ?? ()

fix regresion from https://github.com/apache/nuttx/pull/15301

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-25 04:22:49 -03:00
YAMAMOTO Takashi
c0c04cf6ba bump littlefs to 2.10.1 where 2.10.0 was used
2.10.1 contains a fix for a long-standing wrong-data issue.
https://github.com/littlefs-project/littlefs/pull/1058
2024-12-25 03:40:43 -03:00
YAMAMOTO Takashi
958e30b3e2 Add some clarification comments on the mutex api 2024-12-25 11:11:41 +08:00
Laczen JMS
28937fed4d Documentation: add (nim)ble on esp32c3
Modify documentation of esp32c3 and add nimble section to
esp32c3-generic.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2024-12-25 11:09:38 +08:00
Laczen JMS
57bdeb86d4 boards: add nimble defconfig to esp32c3-generic
Add a configuration for ble using nimble on esp32c3-generic

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2024-12-25 11:09:38 +08:00
Henry Rovner
923dc37a3b risc-v/bl808: Add I2C driver
This change implements a driver with support for all four I2C blocks on the BL808.
2024-12-25 11:03:26 +08:00
41c0fc01b9 risc-v/rv-virt: Remove SCANFTEST from rv-virt:citest
`CONFIG_TESTING_SCANFTEST` is no longer needed in `rv-virt:citest` defconfig because of https://github.com/apache/nuttx-apps/pull/2914

This PR excludes `CONFIG_TESTING_SCANFTEST` from `rv-virt:citest` so that CI Job `risc-v-05` will complete successfully.
2024-12-25 02:32:33 +08:00
Javier Alonso
4ada30b8f7 Revert "[POSIX][Bug] syslog: Add support for %m modifier"
This reverts commit badb5c5ac6.
2024-12-24 11:02:04 -05:00
wangmingrong1
e3a733ae96 libc/machine: fix config error
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-24 21:18:12 +08:00
Filipe Cavalcanti
293a87a5e1 boards/xtensa/esp32s3: increase stack size of buttons defconfig
Some checks failed
Build Documentation / build-html (push) Has been cancelled
2024-12-24 10:49:39 +08:00
Filipe Cavalcanti
acd0031362 boards/xtensa/esp32s3: set 16MB flash on qemu_debug defconfig 2024-12-24 10:49:39 +08:00
Filipe Cavalcanti
1ae7efd388 tools/espressif: add fill-flash-size to build if MERGEBIN selected 2024-12-24 10:49:39 +08:00
Zhe Weng
84d261e3be net: Optimize ipfwd and wrbuffer by buffer pool
To allow dynamic allocation of these structs, performance keeps the same
as the previous implementation.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-12-23 16:57:19 -03:00
Zhe Weng
1fe07d0838 net: Add buffer pool to replace connection allocation
Our net socket connection allocations are powerful but redundant
because they're implemented once in each protocol.  This is not good for
further optimizing and extending to other allocations, so maybe we can
add a common implementation for the usage.

Impact:
1. We add a `struct net_bufpool_s` as pool descriptor, which may use a
   little bit more memory than previous implementation (~28Bytes).
2. We share same functions between pools, so code size may shrink under
   some scenarios.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-12-23 16:57:19 -03:00
Javier Alonso
badb5c5ac6 [POSIX][Bug] syslog: Add support for %m modifier
The POSIX standard states that the `syslog()` function generates
the body from the message and arguments the same way as `printf()`,

> except that the additional conversion specification `%m` shall be
> recognized;

*https://pubs.opengroup.org/onlinepubs/009695399/functions/syslog.html*

What most of the implementations do is to leverage the processing to
`vsprintf` internals, to reduce code duplicity. This means the `%m`
modifier is present on almost all `printf` implementations. Take
the following code snippet as an example: https://onlinegdb.com/YdR9pU6KS.

Therefore, for `syslog` to support such a specification, the underlying
library shall be updated to support it too.
2024-12-23 16:54:41 -03:00
hujun5
50fd02c789 use small lock in following files:
arch/arm/src/kinetis/kinetis_serial.c
arch/arm/src/kl/kl_serial.c
arch/arm/src/lc823450/lc823450_irq.c
arch/arm/src/lc823450/lc823450_syscontrol.c
arch/arm/src/lpc54xx/lpc54_serial.c
arch/arm/src/max326xx/max32660/max32660_dma.c
arch/arm/src/max326xx/max32660/max32660_gpio.c
arch/arm/src/max326xx/max32660/max32660_lowputc.c
arch/arm/src/max326xx/max32660/max32660_serial.c
arch/arm/src/mx8mp/mx8mp_serial.c
arch/arm/src/nrf52/nrf52_gpio.c
arch/arm/src/nrf53/nrf53_gpio.c
arch/arm/src/nrf91/nrf91_gpio.c
arch/arm/src/rp2040/rp2040_uart.c

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-23 23:02:26 +08:00
hujun5
9aa5eda649 use small lock in following file
arch/arm/src/efm32/efm32_leserial.c
arch/arm/src/efm32/efm32_serial.c
arch/arm/src/gd32f4/gd32f4xx_serial.c
arch/arm/src/imx9/imx9_edma.c
arch/arm/src/imxrt/imxrt_edma.c
arch/arm/src/imxrt/imxrt_hprtc.c
arch/arm/src/kinetis/kinetis_lpserial.c
arch/arm/src/lc823450/lc823450_gpio.c
arch/arm/src/s32k1xx/s32k1xx_edma.c
arch/arm/src/s32k3xx/s32k3xx_edma.c
arch/arm64/src/imx9/imx9_edma.c

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-23 23:01:01 +08:00