Commit Graph

54122 Commits

Author SHA1 Message Date
Inochi Amaoto 0ddcbe62ec arch/risc-v: does not clear IPI address in S mode
According to the riscv-aclint doc, writing 0 to SSWI address
has no effect. Remove this unnecessary write for S mode.

Link: https://github.com/riscv/riscv-aclint/blob/main/riscv-aclint.adoc

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-07-18 22:59:29 +08:00
YAMAMOTO Takashi 985d395b02 esp32s3_textheap.c: fix a build error w/o CONFIG_ESP32S3_SPIRAM 2024-07-18 16:42:52 +08:00
nuttxs de3737cd90 arch/xtensa/esp32s3: Deinitialize ESP32-S3 QSPI GDMA engine.
Correctly releasing channels after using QSPI is crucial
to prevent issues caused by multiple requests that may lead
to DMA channel resource conflicts.
2024-07-18 13:41:04 +08:00
chao an 7780cfc5a6 tricore/cmake: add support of cmake build for tricore
Toolchain Upstream:
https://github.com/EEESlab/tricore-gcc-toolchain-11.3.0

CMake command:
$ cmake -B build -DBOARD_CONFIG=tc397/nsh -GNinja
$ cmake --build build

Signed-off-by: chao an <anchao@lixiang.com>
2024-07-18 13:40:49 +08:00
chao an cab82e0a02 cmake/linker: replace --script= with -T to enhance compatibility
Some niche toolchains do not support the "--script=" option, such as tricore-elf-gcc

Signed-off-by: chao an <anchao@lixiang.com>
2024-07-18 13:40:49 +08:00
Inochi Amaoto 000b0ec4a1 arch/risc-v: make common up_allocate_heap weak symbol
The common `up_allocate_heap` is a strong symbol, which leads to
error when building with CONFIG_DEBUG_LINK_WHOLE_ARCHIVE. Make
`up_allocate_heap` weak function to mitigate this problem.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-07-18 13:40:37 +08:00
simbit18 1540dc2d67 tools/testbuild.sh: add option -N use CMake with Ninja
tools/testbuild.sh
     added option -N Use CMake with Ninja as the backend.

    updated help.

    added date to print startup board

   added HOST=Msys

github/workflows/build.yml

   added option -N job docker
2024-07-18 13:40:20 +08:00
Lup Yuen Lee bdf60d7966 risc-v/bl808, sg2000: Configure MMU to cache Kernel Text, Data and Heap (T-Head C906)
This PR configures the BL808 and SG2000 MMU (inside T-Head C906) to cache the the Kernel Text, Data and Heap.  We set the MMU Flags (Shareable, Bufferable and Cacheable) as explained in this article: https://lupyuen.github.io/articles/plic3#appendix-mmu-caching-for-t-head-c906

This PR fixes the Slow Memory Access for NuttX Kernel in BL808 and SG2000: https://github.com/apache/nuttx/issues/12696

In the next PR, we will fix the Slow Memory Access for NuttX Apps, by caching the User Text and Data.

arch/risc-v/src/bl808/bl808_mm_init.c: Added MMU Flags (Shareable, Bufferable and Cacheable) for BL808 Kernel Text, Data and Heap

arch/risc-v/src/sg2000/sg2000_mm_init.c: Added MMU Flags (Shareable, Bufferable and Cacheable) for SG2000 Kernel Text, Data and Heap
2024-07-17 12:08:04 -03:00
Yanfeng Liu d6c67c555f riscv/trap: fix sp restore logic
This fixes stack pointer restore logic to avoid parent stack corruption
by forked child in PROTECTED build.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-17 17:20:00 +08:00
Yanfeng Liu 08c4686f47 riscv/fork: fix tp for PROTECTED
This fixes `tp` value of forked child in PROTECTED build to support
vfork. Why? the optimized `dispatch_syscall` requires `tp` to hold
the task TCB since commit e6973c764c.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-17 17:20:00 +08:00
Yanfeng Liu 70c5c94507 docs/cmake: add out-of-tree usage
This adds out-of-tree usage guide of CMake for FLAT, PROTECTED and KERNEL
configs so that more kernel developers can enjoy cmake for their daily
work.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-17 17:19:41 +08:00
chao an 4db1169e6f arch/tricore: fix compiler warning on GCC toolchain
tc3xx/tc3xx_timerisr.c: In function ‘up_timer_initialize’:
tc3xx/tc3xx_timerisr.c:58:39: warning: passing argument 1 of ‘tricore_systimer_initialize’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   58 |   lower = tricore_systimer_initialize(&MODULE_STM0, 192, SCU_FREQUENCY);
In file included from tc3xx/tc3xx_timerisr.c:31:
nuttx/arch/tricore/src/common/tricore_internal.h:252:35: note: expected ‘void *’ but argument is of type ‘volatile Ifx_STM *’ {aka ‘volatile struct _Ifx_STM *’}
  252 | tricore_systimer_initialize(void *tbase, int irq, uint64_t freq);
      |                             ~~~~~~^~~~~
tc3xx/tc3xx_serial.c:177:16: warning: initialization discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  177 |   .uartbase  = &MODULE_ASCLIN0,
      |                ^
tc3xx/tc3xx_serial.c:178:16: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  178 |   .pins      = &g_uart0_pins,
      |                ^
common/tricore_trapcall.c: In function ‘tricore_trapcall’:
common/tricore_trapcall.c:66:3: warning: passing argument 4 of ‘_assert’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   66 |   PANIC_WITH_REGS("Trap", CURRENT_REGS);
      |   ^~~~~~~~~~~~~~~
In file included from common/tricore_trapcall.c:29:
nuttx/include/assert.h:189:45: note: expected ‘void *’ but argument is of type ‘volatile uintptr_t *’ {aka ‘volatile long unsigned int *’}
  189 |              FAR const char *msg, FAR void *regs);

Signed-off-by: chao an <anchao@lixiang.com>
2024-07-17 17:18:02 +08:00
chao an 8e20b8d862 arch/tricore: add support of tricore gcc toolchain
Toolchain Upstream:
https://github.com/EEESlab/tricore-gcc-toolchain-11.3.0

Signed-off-by: chao an <anchao@lixiang.com>
2024-07-17 17:18:02 +08:00
chao an 7e2b25d45e cmake/boards: fix build break on custom board
Special string filters can be ignored normally

Loaded configuration '.config'
Minimal configuration saved to 'defconfig.tmp'
gmake[3]: *** [CMakeFiles/savedefconfig.dir/build.make:73: CMakeFiles/savedefconfig] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:17869: CMakeFiles/savedefconfig.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:17876: CMakeFiles/savedefconfig.dir/rule] Error 2
gmake: *** [Makefile:208: savedefconfig] Error 2

Signed-off-by: chao an <anchao@lixiang.com>
2024-07-17 15:09:07 +08:00
Huang Qi f555b3de91 boards/esp32s3: Increse the default stack size for usbnsh
Fix https://github.com/apache/nuttx/issues/12712

If run nsh over usb based serial port, the default stack size is too small,
for example simple `ps` command will use more than 2208 bytes stack.

Then the stack overflow will happen and the system will hang here.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-07-17 15:08:17 +08:00
zouboan 85e8536fbe zcu111: add support for board led 2024-07-16 18:50:52 -03:00
zouboan b817db86b8 zynq-mpsoc: add support for mio/emio 2024-07-16 18:50:52 -03:00
chao an 532c437dc9 compiler/tasking: fix build break after inline spinlock change
Regression by:
| commit a4fece3450
| Author: hujun5 <hujun5@xiaomi.com>
| Date:   Wed Jul 3 15:10:49 2024 +0800
|
|     spin_lock: inline spin_lock

Signed-off-by: chao an <anchao@lixiang.com>
2024-07-16 21:13:13 +08:00
chao an bc7791e079 arch/tricore: synchronize instruction/data following MTCR/MFCR
Some barrier are necessary to avoid compiler optimizations

Signed-off-by: chao an <anchao@lixiang.com>
2024-07-16 21:13:13 +08:00
GC2020 8f243d3eb7 /rp2040 Rename the RP2040-specific PWM_MULTICHAN definition to avoid confusion with the global PWM_MULTICHAN 2024-07-16 20:09:10 +08:00
Huang Qi ae0ef94438 doc: Add a simple guide for thread local storage
Explain the basic concept of thread local storage and
the usage, limits of CONFIG_SCHED_THREAD_LOCAL.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-07-16 08:34:55 -03:00
shizhenghui fea727a050 arch/sim/Makefile: add openh264 & x264 include path
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-07-16 08:33:50 -03:00
shizhenghui 347864152d sim codec: add dependence to Kconfig
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-07-16 08:33:50 -03:00
shizhenghui 61f79757f7 v4l2m2m/sim encoder: move hostencoder to x264encoder
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-07-16 08:33:50 -03:00
shizhenghui 7248ba0293 sim decoder: update CMakeLists.txt
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-07-16 08:33:50 -03:00
shizhenghui 3675cfe585 v4l2m2m/sim decoder: rename hostdecoder to openh264dec
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-07-16 08:33:50 -03:00
Alin Jerpelea 622babc6c9 Documentation: add NuttX-12.6.0 release notes
Add release notes for 12.6.0 release

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-07-16 18:19:12 +08:00
Huang Qi 6acb4532d4 sched.h: Update doc link for tcbinfo_s
Original documentation link for riscv is broken,
so update to the correct link for all architectures.

Put the link around `reg_off` to avoid the long line warning
from nxstyle.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-07-16 14:46:57 +08:00
Eren Terzioglu 0df037855a esp32[c3]: Add mcuboot build script for esp32c3-legacy 2024-07-16 10:30:56 +08:00
Eren Terzioglu a9082e0882 esp32[s2]: Add nuttx toolchain support on mcuboot 2024-07-16 10:30:56 +08:00
Eren Terzioglu c9f5ae5fa4 esp32[s3]: Add nuttx toolchain support on mcuboot 2024-07-16 10:30:56 +08:00
Eren Terzioglu 024e95875a esp32: Add nuttx toolchain support on mcuboot 2024-07-16 10:30:56 +08:00
Eren Terzioglu 553b1f5f5e esp32[c3|c6|h2]: Add nuttx toolchain support on mcuboot 2024-07-16 10:30:56 +08:00
Saurav Pal 786701c752 fs/mnemofs: Add master node and r/w methods
Adds master node and r/w methods to mnemofs

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-07-16 09:06:51 +08:00
adriendesp baf52268cc arch/xmc4: Added pwm driver 2024-07-15 16:14:55 -03:00
Peter van der Perk 55d711d214 Docs: S32K1XX FlexIO emulated I2C documentation 2024-07-15 10:06:55 -03:00
Peter van der Perk f03842e0ec boards: ucans32K146L Add support for FlexIO I2C driver
Also some corrections on clockconfig
2024-07-15 10:06:55 -03:00
Peter van der Perk 622b6d234a s32k1xx: FlexIO I2C master driver 2024-07-15 10:06:55 -03:00
Raman Gopalan ef271b8fe2 at32uc3a0: Initial work for SimpleMachines' Mizar32-A 2024-07-15 20:46:41 +08:00
chenwen@espressif.com e0b99216b0 driver/net/lan9250: Add lan9250_ioctl and lan9250_uninitialize APIs
- use 'lan9250_ioctl' to set and get the value of lan9250 phy register
    - use `lan9250_uninitialize` to un-initialize the ethernet driver

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-07-15 19:41:15 +08:00
Yanfeng Liu 8bdc975abb riscv/cmake: fix Toolchain.cmake issue
This fixes the following issue when configuring canmv230:master
with Ubuntu stock toolchain and cmake 3.22:

```
CMake Error at .../arch/risc-v/src/cmake/Toolchain.cmake:218 (if):
  if given arguments:
    "STREQUAL" "GNU_RVG"
  Unknown arguments specified
```

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-15 19:41:03 +08:00
halyssonJr 2900fca28e add defconfig to ws2812 driver 2024-07-15 13:35:12 +08:00
Rodrigo Sim da8934180a board/stm32f401rc-rs485: Add support to Device Configuration over Telnet
Signed-off-by: Rodrigo Sim rcsim10@gmail.com
2024-07-15 13:35:03 +08:00
hujun5 a4fece3450 spin_lock: inline spin_lock
test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
2024-07-15 02:29:30 +08:00
zouboan ae8ce535f3 arm64/arm64_boot.c: Fix exception caused by accesses to ICC_SRE_EL3 when GICv3 was not implemented 2024-07-15 02:26:40 +08:00
zhanghongyu 84f4bd6ec1 sysinfo.h: add get_nprocs_conf/get_nprocs definition
This definition was added in order to solve some compilation problems
encountered when porting tripartite libraries

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-07-14 15:09:04 -03:00
zhanghongyu d53d7d6c34 sched.h: add SCHED_BATCH and SCHED_IDLE definition
Resolve undefined compile-time issues encountered when porting
third-party libraries.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-07-14 13:20:53 -03:00
zhanghongyu 3fa5466077 net/pkt: correct PF_PACKET family sending errors
Enable the pkt_sendmsg interface to send packets containing Layer 2
headers.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-07-14 13:20:14 -03:00
zhanghongyu d0aa42c2ca net/devif: devif_send supports negative offset
To enable the pkt_sendmsg interface to send packets containing L2 headers

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-07-14 13:20:14 -03:00
zhanghongyu 4245da43ca ioctl.h: add SIOCATMARK definition to resolve compilation errors
This definition was added in order to solve some compilation problems
encountered when porting third-party libraries

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-07-14 10:53:45 -03:00