Commit Graph

53678 Commits

Author SHA1 Message Date
Alan Carvalho de Assis e2aeb5cd11 Fix pin LTDC_B0, should be PJ12 instead of PF0
Fix a small issue found on Linum-STM32H753BI Documentation.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-07-22 02:19:09 +08:00
Alan Carvalho de Assis 8acca7c40a stm32f777zit6-meadow: Add support for two USB CDC/ACM
This modification adds support for two USB Composite CDC/ACM for
meadow board.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-07-21 10:31:12 +08:00
Jorge Guzman cb64096da6 board/linum-stm32h753bi: Add support to external sdram
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2024-07-20 19:53:19 -03:00
Alan Carvalho de Assis a1a0315b9c Doc: Fix CustomApps/CustomHello example
NuttX generates the app main name from Kconfig symbol
xxxx_PROGNAME. The documentation was defining manually
the entry point as custom_hello(int char, char *argv[])
and pointing CONFIG_INIT_ENTRYPOINT="custom_hello".

The right thing to do is creating the application entry
point as "int main(int char, char *argv[])" and the build
system will add "_main" to the PROGNAME.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-07-20 13:17:48 +08:00
hujun5 d708edab76 fix compile error
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/spinlock.h: In function 'bool spin_trylock_wo_note(volatile spinlock_t*)':
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/spinlock.h:401:22: error: 'atomic_ushort' was not declared in this scope; did you mean 'std::__1::atomic_ushort'?
  401 |     atomic_load((FAR atomic_ushort *)&lock->tickets.next);
      |                      ^~~~~~~~~~~~~
      |                      std::__1::atomic_ushort
/home/hujun5/downloads1/vela_sim/nuttx/include/libcxx/__atomic/aliases.h:33:7: note: 'std::__1::atomic_ushort' declared here
   33 | using atomic_ushort = atomic<unsigned short>;
      |       ^~~~~~~~~~~~~
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/spinlock.h:401:37: error: expected primary-expression before ')' token
  401 |     atomic_load((FAR atomic_ushort *)&lock->tickets.next);
      |                                     ^
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/spinlock.h:410:14: error: expected unqualified-id before 'new'
  410 |   spinlock_t new =
      |              ^~~
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/spinlock.h:417:44: error: 'atomic_uint' was not declared in this scope; did you mean 'std::__1::atomic_uint'?
  417 |   if (!atomic_compare_exchange_strong((FAR atomic_uint *)&lock->value,
      |                                            ^~~~~~~~~~~
      |                                            std::__1::atomic_uint
/home/hujun5/downloads1/vela_sim/nuttx/include/libcxx/__atomic/aliases.h:35:7: note: 'std::__1::atomic_uint' declared here
   35 | using atomic_uint   = atomic<unsigned int>;
      |       ^~~~~~~~~~~
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/spinlock.h:417:57: error: expected primary-expression before ')' token
  417 |   if (!atomic_compare_exchange_strong((FAR atomic_uint *)&lock->value,
      |                                                         ^
/home/hujun5/downloads1/vela_sim/nuttx/include/nuttx/spinlock.h:418:54: error: expected type-specifier before '.' token
  418 |                                       &old.value, new.value))

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-07-19 09:54:21 +02:00
zhaoxingyu1 b706891fc7 NVS: fix align size
when update for powerloss data write, data_wra should move NVS_ALIGN_SIZE

Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
2024-07-18 16:36:23 -03:00
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