Commit Graph

51920 Commits

Author SHA1 Message Date
Michal Lenc d7c53a6939 docs: add description about local CI tests
This page adds description how to run CI tests locally.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-11-17 19:36:53 +01:00
weidengke f2ed885e69 fix spi slave driver build break
fix build break when CONFIG_SPI_SLAVE_DRIVER_COLORIZE_TX_BUFFER not
define

Signed-off-by: weidengke <weidengke@xiaomi.com>
2023-11-17 06:38:32 -08:00
zhanghongyu bdc934b817 usb_rawgadget: remove halt operation
The halt operation may be causes the raw epread data segment lost, and
usb ep_queue can handle when the usb buffer is full. so remove the
relevant operations.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-11-17 06:38:21 -08:00
Bowen Wang f01f290c3f qemu/config: enable CONFIG_DEV_SIMPLE_ADDRENV for all qemu configs
Enable CONFIG_DEV_SIMPLE_ADDRENV for all the qemu configs that used
the virtio driver to fix compile error when use the NuttX implemented
metal io read/write operations.
Becasue up_addrenv_pa_to_va() and up_addrenv_va_to_pa() are not
implemented by default.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2023-11-17 09:42:52 +01:00
Bowen Wang 8ed836f05e openamp/libmetal: aligned io read/write when size=1,2,3,4
Make NuttX implemented metal io read/write to aligned access

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2023-11-17 09:42:52 +01:00
Bowen Wang af39ee49d8 virtio-mmio: use nuttx implemented io operation instead libmetal's
Openamp/libmetal's metal io operation used the atomic operation, but
in QEMU 8.1.2, the risc-v IO region is not allow to use atomic instruction
in SMP case.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2023-11-17 09:42:52 +01:00
Stuart Ianna 90cf37a179 Documentation: Fix sd_bench command help description.
The help prompt usage output for sd_bench was inconsistent with that of
the actual application. Amend this error.
2023-11-16 22:52:30 -08:00
raiden00pl 23de8cefb9 Documentation: update nRF91 doc 2023-11-16 20:32:41 -08:00
raiden00pl ca88513a0c boards/nrf9160-dk: enable GNSS for modem_ns config 2023-11-16 20:32:41 -08:00
raiden00pl 42211cc1c3 nrf91: initial support for GNSS (GPS only for now) 2023-11-16 20:32:41 -08:00
raiden00pl d38bf3ff2d nrf91/nrf91_modem.c: configure system mode 2023-11-16 20:32:41 -08:00
raiden00pl c53211afb9 boards/nrf9160-dk: add board specific modem configuration 2023-11-16 20:32:41 -08:00
raiden00pl b14b8c6db3 boards/thingy91: add board specific modem configuration 2023-11-16 20:32:41 -08:00
raiden00pl 18cf6aef16 nrf91/nrf91_modem.c: add support for board-specific modem configuration
this can be used to configure an antenna that is specific to a given board
2023-11-16 20:32:41 -08:00
raiden00pl 4b6213adef nrf91/nrf91_modem_sock.c: fix printf warnings 2023-11-16 20:32:41 -08:00
raiden00pl 6f0cf35a4e drivers/sensors/Make.defs: cosmetics 2023-11-16 20:32:41 -08:00
raiden00pl 90cf9f871c sensors/gps: define the number of items in the satellite info list 2023-11-16 20:32:41 -08:00
chao an 42427e9e29 sched/taskfiles: skip unnecessary file open/close operations to improve performance
The task files should consult the "spawn action" and "O_CLOEXEC flags"
to determine further whether the file should be duplicated.

This PR will further optimize file list duplicating to avoid the performance
regression caused by additional file operations.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-16 07:30:36 -08:00
chao an 342a6bb676 sched/task: ignore return value of nxspawn_close()
Closing an invalid file descriptor will not cause the action fail.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-16 07:30:36 -08:00
zhanghongyu 8a479cc2ca igmp: call IFF_SET_IPv4 when igmp_send
If the flag is not set, The flag is affected by the previously sent and
received packets, L2 header may be filled with ipv6

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-11-16 07:29:48 -08:00
Masayuki Ishikawa 479dda98ed arch: Disable ARCH_HAVE_FORK for arm64 as a precaution
Summary:
- Temporarily disables ARCH_HAVE_FORK for arm64 to address a crash issue,
  as detailed in https://github.com/apache/nuttx/pull/9755.
- This is a precautionary measure until a more permanent solution is implemented.

Impact:
- Temporarily limits certain functionalities on arm64,
  but necessary to ensure system stability.

Testing:
- Successfully tested on QEMU-8.1.2.
- Note: please apply the changes from https://github.com/apache/nuttx-apps/pull/1962.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-11-16 00:35:43 -08:00
Xiang Xiao 5ca3e805b2 arch/imx6: Replace cpu_start_t with start_t
avoid the unnecessary typedef

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-16 14:35:48 +09:00
PwnVerse e2627d4558 Fix improper handling of 64 bit types for libvsprintf 2023-11-15 18:37:43 -08:00
Ville Juven 0dedbcd4ae task/pthread_cancelpt: Move cancel point handling to libc, data to TLS
This moves task / thread cancel point logic from the NuttX kernel into
libc, while the data needed by the cancel point logic is moved to TLS.

The change is an enabler to move user-space APIs to libc as well, for
a coherent user/kernel separation.
2023-11-15 08:52:04 -08:00
Ville Juven 1e31ec8003 sched/tls_info: Add tl_ prefix to pthread cleanup stack / tos 2023-11-15 08:52:04 -08:00
chao an 64cf63475c arch/dumponexit: unify dump on exit to common code
remove arch implement and move to common code

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-15 08:28:25 -08:00
chao an 6104f32afc fs/fat: fix ubsan warning of shift-out-of-bounds
ubsan_prologue: ================================================================================
ubsan_prologue: UBSAN: shift-out-of-bounds in fat/fs_fat32util.c:989:40
__ubsan_handle_shift_out_of_bounds: left shift of 268435455 by 4 places cannot be represented in type 'int'
ubsan_epilogue: ================================================================================

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-15 07:14:41 -08:00
chao an 61aa2c36b6 misc/assert: restore assertion registers to array of last registers
Some assertions in extreme cases will cause syslog to be unable to
output logs normally, so this PR will restore the input registers
into the array of last registers to ensure that we can also obtain
some important informations.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-15 15:49:27 +01:00
Masayuki Ishikawa 194af23d1b Revert "tools/ci: Skip build sabre-6quad:libcxx temporarily"
This reverts commit 65e2a68e48.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-11-15 03:52:26 -08:00
Masayuki Ishikawa 991c5029a0 boards: sabre-6quad: Fix cxxtest issue
Summary:
- Fixes a linker issue in https://github.com/apache/nuttx/pull/8244 by disabling compiler optimization.
- Adjusts CONFIG_DEFAULT_TASK_STACKSIZE to 4096 to ensure proper functioning of cxxtest.

Impact:
- The changes may slightly affect performance due to disabled optimizations
  but are necessary for cxxtest stability.

Testing:
- Successfully tested on QEMU-8.1.2 with arm gcc 12.3.Rel1,
  confirming resolution of the linker issue and stable operation of cxxtest.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-11-15 03:52:26 -08:00
fengxuesong bb14e45ec9 the bug of sscanf exception output in arm64 platform
Signed-off-by: fengxuesong <fengxuesong@xiaomi.com>
2023-11-15 03:45:32 -08:00
Ville Juven b7b0a17682 sched/sem_holder.c: When accessing SEM_WAITLIST, use holder's addrenv
If the semaphore is shared, the holder has put its own mmapped address
to pholder->sem. This means we must switch to the holder's address
environment when going through the held semaphores list.

A better option would be to get the kernel mapped address for the
semaphore's physical page, but that mechanism is not functional yet.

This fixes a full system crash when CONFIG_PRIORITY_INHERITANCE=y and
CONFIG_BUILD_KERNEL=y and user makes shared semaphore via:

int semfd  = shm_open("sem", O_CREAT | O_RDWR, 0666);
sem_t *sem = mmap(0, sizeof(sem_t), PROT_READ | PROT_WRITE, MAP_SHARED, semfd, 0);
2023-11-15 03:45:15 -08:00
raiden00pl e1b947cd52 stm32/stm32_foc.c: rename some macros
change the names to be the same as for stm32f7/stm32_foc.c
2023-11-15 03:44:17 -08:00
raiden00pl c0ffcca0e8 boards: remove obsolete CONFIG_EXAMPLES_FOC_IPHASE_ADC option 2023-11-15 03:43:25 -08:00
Xu Xingliang 6e7115ca09 mm: free delay list when exceeding specified count
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2023-11-15 12:05:20 +01:00
Petteri Aimonen 6dabcd567e stm32/samv7: Update SysTick drivers to new up_adjtime() API. 2023-11-14 19:47:40 -08:00
Petteri Aimonen 1825f9534c adjtime: Rewrite implementation to work for RTC and tickless kernel
Previous adjtime() implementation was limited to adjusting system
timer tick period. This commit reimplements the internals to use
a kernel watchdog timer. Platform-independent part of the code now
works also for adjusting hires RTC and tickless timer rate.

User code facing API is unchanged. Architecture code API has changed:
up_adj_timer_period() is replaced by up_adjtime().

Other improvements:

- Support query of remaining adjustment by passing NULL to first
  argument of adjtime(). This matches Linux behavior.

- Improve resolution available for architecture driver, previously
  limited to 1 microsecond per tick. Now 1 nanosecond per second.
2023-11-14 19:47:40 -08:00
Eren Terzioglu 4033018a72 xtensa/esp32s3: Add XTWDT support 2023-11-14 19:42:33 -03:00
chao an d63034994e fs/inode: check file list before memcpy
The file list is NULL if task group initialized, check the validity
of the file list before memcpy.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-11-14 19:11:32 -03:00
Michal Lenc 0554b975da s25fl1: fix compile warnings caused by incorrect variable print format
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-11-14 09:08:08 -08:00
rongyichang 52d516ab46 drivers/lcd: change lcd stride from pixel to bytes
In order to achieve better scalability, change the stride
from pixel mode to byte mode.For example, in the case of RGB888
mode with 466 pixels in width and a 4-byte aligned buffer,it is
only necessary to extend the buffer of one line from 1398 bytes
to 1400 bytes, instead of extending it to 1404 bytes.

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-11-14 07:30:29 -08:00
raiden00pl 99513ac23e drivers/foc: return scaling factor for phase currents and BEMF via ioctl
These values are board-specific properties that must be known on the application side.
Until now, these values had to be hardcoded on the application side.
2023-11-14 04:34:49 -08:00
raiden00pl 7d99f01cf7 drivers/foc: get hardware information via lower-half interface 2023-11-14 04:34:49 -08:00
Masayuki Ishikawa 5f15c73219 Documentation, tools: Bump xpack-riscv-none-elf-gcc to 12.3.0-2
Summary:
- Upgraded to xpack-riscv-none-elf-gcc-12.3.0-2 to resolve symbol recognition
  issues in riscv-none-elf-gdb, as reported in
  https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/issues/22.

Impact:
- Expected to enhance toolchain stability with no negative side effects.

Testing:
- Verified with rv-virt:netnsh and rv-virt:netnsh64 configurations

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-11-14 12:33:36 +01:00
Eren Terzioglu d92a7011fd xtensa/esp32s3: Add RWDT support 2023-11-13 21:04:30 -03:00
raiden00pl 0e40cc2853 stm32/stm32_adc.c: protect irq_attach with refcounter
irq_attach should only be called once for ADCs that share a common interrupt handler.
We can move irq_attach to just before interrupts are enabled.
2023-11-13 21:03:36 -03:00
raiden00pl 225d5bba6e stm32/foc: add support for board-specific ioctl 2023-11-13 08:40:11 -08:00
Ville Juven b3f20d4bd6 uart_tcsendbreak: Remove cancel point, as tcsendbreak is not one
Reference:
https://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html
2023-11-13 08:11:24 -08:00
raiden00pl 7996266f6e drivers/segger/Kconfig: cosmetics 2023-11-13 06:08:30 -08:00
Xiang Xiao 459f8235e4 arch/arm: Let's old arm's arm_doirq return register context like armv7-a
and remove the duplicated arm_doirq and arm_ack_irq prototype

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-11-13 11:41:56 +01:00