Commit graph

57308 commits

Author SHA1 Message Date
nuttxs
0945bc0fb8 arch/esp32s3_wdt: ESP32-S3 WDT1 adds clock enable
and reset operations in the initial section
2025-01-07 10:47:59 +08:00
Bowen Wang
6485093277 rpproxy_virtio/rpserver_virtio: fix the compile error
1. Change the CONFIG_RPMSG_VIRTIO to CONFIG_RPMSG_VIRTIO_LITE
2. fix the error when modify the sim_rpmsg_virtio to port to
rpsmg_virtio_lite;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-12-31 18:01:47 +08:00
Huang Qi
6eb2f33278 arch/risc-v: inline up_cpu_index if RISCV_PERCPU_SCRATCH is not enabled
Inline the short function to provide better performance.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-12-31 04:02:22 -03:00
cd92e2d6e7 boards/risc-v, xtensa: Remove CONFIG_DEV_ZERO
CONFIG_DEV_ZERO is no longer needed in some defconfig files due to
- https://github.com/apache/nuttx/pull/15223

This PR removes CONFIG_DEV_ZERO from the affected defconfig files:
```bash
make distclean ; tools/refresh.sh --silent canmv230:knsh
make distclean ; tools/refresh.sh --silent canmv230:master
make distclean ; tools/refresh.sh --silent canmv230:nsbi
...
```

The failed builds above were extracted from [nuttx-prometheus-to-mastodon.json](https://lupyuen.org/articles/mastodon.html#appendix-post-nuttx-builds-to-mastodon)
2024-12-31 04:01:32 -03:00
liwenxiang1
c748047e25 arch/x86_64: The interrupt context flag is stored in the CPU private data
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-12-31 13:43:38 +08:00
zhanghongyu
f344a422e8 tcp_input: remove tcp_callback(ABORT) when accept conn recv TCP_RESET
when accept conn receives TCP_RESET, only accept conn itself should handle
the event, and there is no need to notify the listening conn. otherwise,
the server's poll will return with POLLERR and POLLHUP. this may cause
some applications to execute incorrect logic in the future.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-12-31 09:43:35 +08:00
Tiago Medicci Serrano
a4fd1b3a6a netpacket/sockaddr_ll: Add valid packet types for sll_pkttype
Add valid packet types for the sll_pkttype member of the struct
sockaddr_ll. These definitions are commonly used by third-party
libraries.
2024-12-31 09:41:39 +08:00
liwenxiang1
4612185cd6 arch/x86_64:g_current_regs is only used to determine if we are in irq,
with other functionalities removed.

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2024-12-30 22:59:15 +08:00
ce920f9e93 arm/gd32f4: Remove extra lock from gd32f4xx_serial
An extra `lock` appears in gd32f4xx_serial due to 2 conflicting PRs:
- https://github.com/apache/nuttx/pull/7011
- https://github.com/apache/nuttx/pull/15352

This PR removes the extra `lock` in gd32f4xx_serial.
2024-12-30 22:57:10 +08:00
9b9869158a arm/imxrt: Remove extra lock from imxrt_edma
An extra `lock` appears in imxrt_edma due to 2 conflicting PRs:
- https://github.com/apache/nuttx/pull/15352
- https://github.com/apache/nuttx/pull/15353

This PR removes the extra `lock` in imxrt_edma.
2024-12-30 22:56:51 +08:00
mazhuang
60683d7495 nuttx/boards/XXX/defconfig:DEV_ZERO is not set
Signed-off-by: mazhuang <mazhuang@xiaomi.com>
2024-12-30 22:22:29 +08:00
Bowen Wang
812613fabc drivers/misc/Kconfig: change DEV_ZERO deafult to !DEFAULT_SMALL.
/dev/zero is a very commonly used config, for example use
/dev/zero to test the filesystem, mtd or block devices performance.
So let's default enable it when not enable DEFAULT_SMALL

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-12-30 22:22:29 +08:00
wangmingrong1
b27dc9ee7f mm: Unified memory management alignment length
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-30 19:49:00 +08:00
Gao Feng
da845163a3 xtensa/esp32: add lock for async operation work
g_work as singleton can be changed by context switching,
but previous one async operation have not finished yet.

adapt based on: 10a1d17a85
2024-12-30 18:14:32 +08:00
Ludovic Vanasse
c55c2511ad Doc: improve and add documentations for the guide section of the wiki
Some checks failed
Build Documentation / build-html (push) Has been cancelled
* Add a migration warning to the update release system and the elf
programs documentation pages. This is just to add a papertrail from
where the documentation originate in case of error during the migration
process.
* Improve the building nuttx with app out of source tree
* Add new guide pages
	* Building uclibc++
	* Custom app directories
	* Debugging ELF loadable modules
	* Multiple NSH sessions
	* NSH network link management
	* RAM & ROM disks
	* Reading CAN messages
	* Remove device drivers with NSH
2024-12-30 12:32:42 +08:00
chao an
dc82a296f7 libc/semaphore: remove unused hander file
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-30 12:02:34 +08:00
chao an
27a03b8278 sched/semaphore: tick wait 0 timeout should be safe in interrupt context
1. remove up_interrupt_context() check, which should be safe in interrupt context
2. remove sem instance check will be handle in nxsem_trywait()

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-30 12:02:34 +08:00
YAMAMOTO Takashi
a393f7fbd3 littlefs: fix EINVAL on path operations with littlefs 2.10.0
littlefs 2.10.0 and later rejects empty paths.  use "/" instead.

tested with esp32s3-devkit:toywasm.
2024-12-29 20:43:33 -03:00
Ludovic Vanasse
b02a0758a7 Doc: add migration warning to updating release system and elf programs
Some checks are pending
Build Documentation / build-html (push) Waiting to run
Add a migration warning to the update release system and the elf
programs documentation pages. This is just to add a papertrail from
where the documentation originate in case of error during the migration
process. Also fix a bit of formatting in the pages
2024-12-29 23:40:57 +08:00
Ludovic Vanasse
04c7391162 Doc: loading ELF program
Some checks are pending
Build Documentation / build-html (push) Waiting to run
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
Some checks are pending
Build Documentation / build-html (push) Waiting to run
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.
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.
Some checks are pending
Build Documentation / build-html (push) Waiting to run
2024-12-27 21:50:19 -03:00
Ville Juven
e19e1a8532 nxsem_destroyholder: Use critical section when destroying holder(s)
Some checks failed
Build Documentation / build-html (push) Has been cancelled
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