Commit Graph

137 Commits

Author SHA1 Message Date
Gao Jiawei 6b46e6c486 fix systick reload calculation on arm7-m
According to the doc:
https://developer.arm.com/documentation/dui0646/c/Cortex-M7-Peripherals/System-timer--SysTick/SysTick-Reload-Value-Register?lang=en
To ensure the accurate interval of the systick interrupt, it is important to set the RELOAD value one less than the desired cycle counts.
Failure to do so may result in a subtle *jiffy* compared to the expected interval.
For instance, let's assume that a CPU is running at 300MHz and the timeout is set to 1ms, which is equivalent to 300,000 cycle counts. If the RELOAD value is set to 300,000, then there will be a loss of 1/300 us per timeout interval.

TODO: Review other arm arch systick implementation

Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
2026-04-21 01:19:45 +08:00
Alin Jerpelea 1c4ebed9a4 include: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-21 00:59:40 +08:00
openvela-robot b566da436e sim:support sim elf and dynamic libs package in post build
use the dynamic library .so of the binding compilation environment,
and then modify the dynamic loader of elf at runtime to run sim elf across system versions

1.add post-build for sim build
2.collect dynamic .so and dynamic interpreter
3.add execution script for the entire package sim elf

change text-segment to 0x50000000
because patchelf will modify the .dynamic section in elf,
the upward alignment of elf will be less than 0x3fffffff,
which will cause asan shadow memory overlap error

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-04-21 00:59:38 +08:00
Alin Jerpelea 8a3b7f63ca include: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-04-21 00:59:19 +08:00
chao an 528464cd36 include: Add nitems() definition to sys/param.h
Signed-off-by: chao an <anchao@xiaomi.com>
2026-04-20 22:33:38 +08:00
openvela-robot ba202fa89d net/ip: fix compile break if disable NET_TCP
1.
ipfrag/ipv4_frag.c: In function ‘ipv4_fragin’:
ipfrag/ipv4_frag.c:184:22: warning: ‘head’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  184 |   ipv4->len[1] = head->io_pktlen & 0xff;
      |                  ~~~~^~~~~~~~~~~
ipfrag/ipv4_frag.c:123:21: note: ‘head’ was declared here
  123 |   FAR struct iob_s *head;
      |                     ^~~~

2.
devif/ipv6_input.c: In function ‘ipv6_in’:
devif/ipv6_input.c:60:33: error: ‘TCPIPv6BUF’ undeclared (first use in this function); did you mean ‘UDPIPv6BUF’?
   60 | #define PAYLOAD ((FAR uint8_t *)TCPIPv6BUF)
      |                                 ^~~~~~~~~~

3.
nat/ipv4_nat.c: In function ‘ipv4_nat_inbound_icmp’:
nat/ipv4_nat.c:67:30: error: ‘TCP_HDRLEN’ undeclared (first use in this function); did you mean ‘UDP_HDRLEN’?
   67 |   ((proto) == IP_PROTO_TCP ? TCP_HDRLEN : \
      |                              ^~~~~~~~~~
nat/ipv4_nat.c:323:47: note: in expansion of macro ‘L4_HDRLEN’
  323 |             inner_l4hdrlen = MIN(inner_l4len, L4_HDRLEN(inner->proto));
      |                                               ^~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2026-04-20 22:33:37 +08:00
chao an 28b26c2db4 include: Add nitems() definition to sys/param.h
Signed-off-by: chao an <anchao@xiaomi.com>
2026-04-20 22:33:31 +08:00
openvela-robot a339d44bcb misc/mutex: fix assertion if nxmutex_reset() before nxmutex_unlock()
sim/rpserver

NuttShell (NSH) NuttX-12.0.0
server> cu
_assert: Current Version: NuttX server 12.0.0 3ead669e7a-dirty Feb  2 2023 23:53:48 sim
_assert: Assertion failed : at file: libs/libc/misc/lib_mutex.c:303 task: cu 0x5662fff4

Signed-off-by: chao an <anchao@xiaomi.com>
2026-04-20 22:32:48 +08:00
openvela-robot b596e5955b fs: Add model field to geometry and mtd_geometry_s
the model is very useful to track the device info

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 22:32:46 +08:00
openvela-robot 9991164d72 Remove OK macro from the code base
let's use OK from sys/types.h instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 22:32:39 +08:00
openvela-robot a872448922 libs/netdb: add sanity check to avoid null pointer reference
Signed-off-by: chao an <anchao@xiaomi.com>
2026-04-20 22:32:34 +08:00
openvela-robot 05d0cc693e tools/makefile: silent all compile output
In order to make compilation warnings and errors easier to be found out,
this commit will disable the printing of the compilation process as much
as possible, and also if you want to restore the log information of the
compilation process, please enable verbose build on command line:

$ make V=0
OR
$ make V=1

| V=0:   Exit silent mode
| V=1,2: Enable echo of commands
| V=2:   Enable bug/verbose options in tools and scripts

Signed-off-by: chao an <anchao@xiaomi.com>
2026-04-20 22:32:31 +08:00
openvela-robot 23c90ddb72 Revert "tools/Config: add make V=0 to keep original style"
This reverts commit f1ae900b83b9c23b1b3253e01d5d8ded6ae85729.

Reason for revert: <revert>
2026-04-20 22:32:29 +08:00
openvela-robot 8ad0b36db3 assert:add a Kconfig option to limit binfile size
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-04-20 22:32:25 +08:00
openvela-robot cc81ca6e90 tools/Config: add make V=0 to keep original style
Signed-off-by: chao an <anchao@xiaomi.com>
2026-04-20 22:32:23 +08:00
Gustavo Henrique Nihei e8355b545b include: Add MIN/MAX definition to sys/param.h
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2026-04-20 22:32:18 +08:00
anjiahao cda105a82a add MAXHOSTNAMELEN in headfile
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-04-20 21:24:15 +08:00
openvela-robot 6b9280200b arch:hostfs: add cache coherence config for semihosting option
N/A

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2026-04-20 21:24:15 +08:00
anjiahao a300c176cb add MAXHOSTNAMELEN in headfile
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-04-20 21:24:13 +08:00
openvela-robot c7bda2ddf5 Merge remote-tracking branch 'mirtos/master' into dev-upmerge-nuttx-10.1-0507
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2026-04-20 20:59:17 +08:00
openvela-robot fe6ab93c6f Revert "binfmt/Makefile: remove the specified prefix from target variables"
This reverts commit 608f380aee19521137d403a83a6ca3757e35ec66.
2026-04-20 20:59:11 +08:00
openvela-robot 8810ce0b35 esp32: replace EPS32 typo with ESP32 2026-04-20 20:58:53 +08:00
openvela-robot f80ef805a6 procfs: fix cat status error when meet long thread name
nsh> cat /proc/3/status
Name:       init123456789987654Type:       Task
Group:      3
State:      Running

Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-20 20:58:48 +08:00
openvela-robot a85a6b9358 arch/risc-v: Fix stack alignment according to calling convention
The RISC-V Integer Calling Convention states that the stack pointer
shall always be aligned to a 128-bit boundary upon procedure entry, both
for RV32* and RV64* ISAs (exception to the RV32E ISA, which must follow a
specific convention)
2026-04-20 20:58:42 +08:00
openvela-robot b81b93265d cmd/free: add nused field in command free
N/A

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 20:58:38 +08:00
openvela-robot 746dcc0ae8 risc-v/esp32c3: Add driver for General Purpose SPI Master 2026-04-20 20:58:32 +08:00
openvela-robot 61500f924d procfs: Group: should return tg_task when HAVE_GROUPID opened
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-20 20:58:28 +08:00
openvela-robot d7d768c12c arch: rp2040: Fix the initial stack pointer
Summary:
- The NuttX for raspberrypi-pico boots via the boot_stage2 provided
  by the pico-sdk which sets the MSP at the end of the SRAM.
- However, the NuttX expects the MSP is set to the top of the idle stack.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with nsh, nshsram and smp configrations
2026-04-20 20:58:23 +08:00
openvela-robot 4d176540f9 arm/v7-a/fpu: add VFP-v3 D32 support
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 20:58:18 +08:00
openvela-robot 420172f284 audio/pcm_decode.c: skip extra chunk of wav header
Summary:
- The wav header parser in /dev/audio/pcm device driver expects the 'data'
  chunk is placed just after the 'fmt ' chunk.
- Because the wav files generated by FFmpeg places 'LIST' chunk which
  contains the music track information between 'fmt ' and 'data' chunks,
  nxplayer cannot playback the files.
- This patch skips extra chunks after 'fmt ' chunk to find the 'data' chunk.

Impact:
- All architectures which support /dev/audio/pcm device.

Testing:
- Tested by Raspberry Pi Pico audio driver.
- nxplayer can playback the wav files which are created by FFmpeg after
  applying this patch.
2026-04-20 20:58:11 +08:00
openvela-robot 2fd768df06 libc/execinfo/dumpstack: correct the line size to avoid LF overwrite
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 20:58:07 +08:00
openvela-robot ffdce6d958 documentation: Add release notes for 10.1.0 release 2026-04-20 20:58:01 +08:00
openvela-robot f0649f695f arch: Remove the special check for idle thread in up_use_stack
since the idle thread don't call up_use_stack anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 20:57:57 +08:00
openvela-robot d542237954 stm32h7:Serial Add RX and TX DMA
stm32h7:Serial Use Idel to poll RX DMA

stm32h7:Serial Do not loop in an ISR!

stm32h7:Serial signal txdma completion with semaphore

stm32h7:Serial Apply formatting suggestions from code review

Co-authored-by: Mateusz Szafoni <raiden00pl@gmail.com>

stm32h7: Serail Add Power Managment (Untested)
2026-04-20 20:57:51 +08:00
openvela-robot 628c73da1c mm: idle check heap use mm_trysemaphore
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-20 20:57:47 +08:00
openvela-robot 910b662aee stm32:Serial DMA config USART{4578} -> UART{4578} 2026-04-20 20:57:31 +08:00
openvela-robot cf408a017b fs/procfs: fix heap overflow when snprintf meet long string
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-20 20:57:27 +08:00
openvela-robot 153e1affa8 stm32/Kconfig: move configuration common for G4 under STM32_STM32G4XXX option 2026-04-20 20:57:18 +08:00
openvela-robot 6f37dac02a sim: correct miwear config symlink since project replaced
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2026-04-20 20:57:14 +08:00
openvela-robot c530a0fe77 drivers/sensors: Adds new driver for ds18b20 sensore module
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2026-04-20 20:57:08 +08:00
openvela-robot 9e82f58baf add #undef for some stdlibc api. 2026-04-20 20:57:03 +08:00
openvela-robot a4e82221de stm32g4xx: add support for ADC 2026-04-20 20:56:57 +08:00
openvela-robot 41133230a0 net/arp: Fix a potential bug in arp_notify()
Summary:
- In arp_wait_setup() and arp_wait_cancel(), g_arp_waiters
  is protected by a critical section.
- However, I noticed that arp_notify() does not protect the
  g_arp_waiters that would cause memory corruption
- This commit fixes the issue.

Impact:
- None

Testing:
- Tested with spresense:rndis_smp, spresense:rndis

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 20:56:52 +08:00
openvela-robot 94a6974770 nucleo-g431rb: refactor bringup logic for consistency with other boards 2026-04-20 20:56:47 +08:00
openvela-robot 18c7039c1b execinfo: add cplusplus support
N/A

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 20:56:43 +08:00
openvela-robot 4e50deebd4 boards/arm/stm32/nucleo-f446re: added support for ili9225 display
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-04-20 20:56:33 +08:00
openvela-robot f89fb80ac5 get/setsockopt: change break to return OK to fix bug
N/A

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 20:56:28 +08:00
openvela-robot 1face74bfb syslog: syslog_device ops are handled internally by the driver. 2026-04-20 20:56:22 +08:00
openvela-robot e3c7dc5daf libc/time: add strptime porting support
lib_strptime.c copies from android bionic/libc/tzcode.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2026-04-20 20:56:18 +08:00
openvela-robot f42ba633be syslog: Fix in syslog_intbuffer flushing. 2026-04-20 20:56:07 +08:00