Commit Graph

52648 Commits

Author SHA1 Message Date
Ville Juven
6a6798ed31 arch/arm64: Add the head obj to libarch.a as well
On other platforms libarch.a contains the head object. Some projects
depend on this fact so let's provide the head object in the archive here
as well.
2024-03-25 20:38:53 +08:00
zhangjun21
ce61e866c3 CMake:Duplicate definition of CMAKE_CXX_STANDARD
CMAKE_CXX_STANDARD is repeatedly defined in the two files, nuttx/CMakeLists(14) and libs/libxx/libcxx.cmake(17), and is defined to different values. Matter needs to use the new features(std::is_signed_v) of c++17,so delete the definition in nuttx/CMakeLists and retain the definition in libs/libxx/libcxx.cmake.

Signed-off-by: zhangjun21 <zhangjun21@xiaomi.com>
2024-03-25 13:57:44 +08:00
zhanghongyu
104b0288a6 matter: solve compilation problems for the matter community
Compiling a 32-bit version of NuttX binary based on the Matter community's Docker image may encounter compilation issues due to some dependency libraries, so the M32 compilation option has been temporarily disabled.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-03-25 13:57:17 +08:00
GC2020
8a08190394 Modify the enable logic of FDCAN (all STM32H7 series are FDCAN pins) 2024-03-25 01:36:52 +08:00
Alan Carvalho de Assis
97e217b0ff libc/uname: Add option to disable uname timestamp
Don't include the build timestamp into final binary when the symbol
CONFIG_LIBC_UNAME_DISABLE_TIMESTAMP is defined.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-03-23 11:42:22 +08:00
Alan Carvalho de Assis
eaeca78cc8 boards/raspberrypi-pico: Add buttons support example
This patch add support to use buttons example on raspberrypi-pico.
Note: unfortunately the raspberry-pico board doesn't have usables
buttons, then you need to add external buttons connected to GPIO16
and GPIO17.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-03-23 11:42:11 +08:00
chao an
b9a74f30c6 sched/init: refine init state interface
N/A, refine init state interface

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-23 01:04:15 +08:00
chao an
f7434c2bc4 sched/init: move task list table from data to bss
N/A, help to extend the multi-core implementation

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-23 01:04:15 +08:00
chao an
7cc89bbd0e sched/init: move idle task initialize to inline function
N/A, help to extend the multi-core implementation

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-23 01:04:15 +08:00
Ville Juven
738bdb95b7 arm64_head.S: Add explicit input section for __start
As __start must be placed at a precise location, a separate, explicit
input section is needed to guarantee this.

Why is this an issue ? NuttX uses --entry=__start which puts __start in
its correct location, but out-of-tree builds won't work, so it more robust
to use an explicit section for the startup code and enforce its placement
in the linker script.
2024-03-23 00:21:54 +08:00
chao an
63a0a544be sched/signal: merge allocate of signal pool
1. merge allocate of signal pool
2. remove unnecessary static variables

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-22 21:40:56 +08:00
Ville Juven
00986bdd09 arm64/imx9: Add register definitions for LPTMR 2024-03-22 21:37:35 +08:00
Ville Juven
0b8f6af3d6 arm64/imx9: Add register definitions for LPIT 2024-03-22 21:37:35 +08:00
Ville Juven
d2373f4569 arm64/imx9: Add CCM (Clock Controller Module) 2024-03-22 21:37:35 +08:00
ligd
a1836de09a fdt: move fdx_xx extend APIs from boards to drivers
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-03-22 18:51:33 +08:00
mishuaishuai
22877e0fa5 add two new gd32f4 boards
modify format

add two new boards doc

modify bug

Signed-off-by: mishuaishuai <wangshuai26@xiaomi.com>
2024-03-22 13:22:20 +08:00
simbit18
391badcb24 tools/ci/testlist/macos.dat: fix path esp32c3-legacy
find: boards/risc-v/esp32c3/esp32c3-devkit/configs/cxx: No such file or directory
find: boards/risc-v/esp32c3/esp32c3-devkit/configs/wifi: No such file or directory
2024-03-22 13:20:02 +08:00
Jukka Laitinen
a54f7ffaa8 arch/arm64/src/common: Remove void * arithmetic
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-03-22 09:48:31 +08:00
simbit18
ac2021b906 Fix Kconfig style
Replace help => ---help---
Remove spaces from Kconfig
Add comments
2024-03-21 22:28:49 +08:00
zhanghongyu
a65cdce281 cdcecm: remove duplicate assignment statements
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-03-21 20:06:13 +08:00
Ville Juven
7a2edf9414 stm32f7/stm32_foc.c: Set .info_get to foc_lower_ops
This fixes build error (Werror):

Error: chip/stm32_foc.c:1918:12: error: 'stm32_foc_info_get' defined but not used [-Werror=unused-function]
 1918 | static int stm32_foc_info_get(struct foc_dev_s *dev, struct foc_info_s *info)
      |            ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
2024-03-21 19:53:29 +08:00
zhanghongyu
430247cc99 include: format alignment
Align the comments in the include directory

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-03-21 19:53:05 +08:00
shizhenghui
5a313d0da3 Update v4l2 ctrls & v4l2_outputparm
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-03-21 19:23:53 +08:00
Xiang Xiao
d680ba47c4 Move video_controls.h from include/nuttx/video to include/sys
The video_controls.h is a public header file, and it is used by
videoio.h. So it should be moved to the include/sys directory.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-03-21 19:23:53 +08:00
shizhenghui
3afd26bcd1 Add ioctl interface used in v4l2m2m
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-03-21 19:23:53 +08:00
chao an
0f0c370520 fs/inode: replace some global variables to macro
replace to macro will help to extend the scheduling implementation

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-21 18:53:14 +08:00
chao an
feb6ede434 sched/cpu: replace up_cpu_index() to this_cpu()
In SMP mode, up_cpu_index()/this_cpu() are the same, both return the index of the physical core.
In AMP mode, up_cpu_index() will return the index of the physical core, and this_cpu() will always return 0

| #ifdef CONFIG_SMP
| #  define this_cpu()             up_cpu_index()
| #elif defined(CONFIG_AMP)
| #  define this_cpu()             (0)
| #else
| #  define this_cpu()             (0)
| #endif

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-21 18:52:35 +08:00
chao an
4e62d0005a sched: replace some global variables to macro
replace to macro will help to extend the scheduling implementation

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-21 18:51:25 +08:00
chao an
d90e1cb7b4 arch/tricore: add spinlock support
add atomic test and set operation

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-21 18:47:14 +08:00
Jukka Laitinen
1f6079814a arch/risc-v/src/common/supervisor/riscv_perform_syscall.c: Record the currently running task in risc-v syscall
If a context switch occurs in syscall, the g_running_task need to be recorded for assert logic.
This copies the logic from arm platforms

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-03-21 18:45:41 +08:00
Jukka Laitinen
0dee4eb7f0 arch/arm/src/imxrt/imxrt_start.c: Clear CONTROL register at start to make sure we use MSP as the stack pointer
When entering the function from an external bootloader, the CPU could be using PSP. But the following
code expects MSP to be in use.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-03-21 18:45:00 +08:00
vela-mib
8ff3b90742 add open posix test cases on qemu and sim on CI
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-03-21 18:42:47 +08:00
chao an
306c1c0b7d sched/tasklist: replace task status list with macro definition
replace to macro will help to extend the scheduling implementation

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-21 11:23:46 +09:00
chao an
ad0efd04ee sched/wqueue: replace some global variables to macro
replace to macro will help to extend the scheduling implementation

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-21 11:22:41 +09:00
Jukka Laitinen
f1c877d67d arch/risc-v/src/common/riscv_exception.c: Just _exit the user task causing an exception
We shouldn't panic the kernel when a user task excepts, we can just kill the user task and
it's children. Do this by returning to _exit() in kernel context.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-03-20 18:03:15 -03:00
Jukka Laitinen
7c6b6171f5 sched/group/group_killchildren.c: Force-cancel children if parent is force-cancelled
There is no point in waiting for children to exit if the parent is force-cancelled

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-03-20 18:03:15 -03:00
Stuart Ianna
401b3e682c arch/risc-v/litex: Allow FDT to be passed from previous boot change.
Allows a flattened device tree to be passed from either openSBI or the LiteX bios. The FDT is registered can be used, if supported.
2024-03-20 20:53:17 +08:00
Ville Juven
f2437b7f6a arm64/imx9: Add JLinkScript for imx93-evk
This is needed, as it contains the DAP addresses.
2024-03-20 20:13:14 +08:00
Ville Juven
a7713af0ef arm64/imx9: Add board for imx93-evk
Adds board definition for imx93-evk board

- Support for the Cortex-A55 core in i.MX93, support for the Cortex-M33
  core is _not_ provided
- "nsh" profile is provided, this includes a minimalistic feature set
  which boots the SoM to nsh console
- A bootloader is required, u-boot has been tested
2024-03-20 20:13:14 +08:00
Ville Juven
46bd210ae4 arm64/imx9: Add support for imx9 series SoMs, imx93 implemented
Adds support for NXP i.MX9-series System-on-Module chips.

- Support for i.MX93 is added
- CPU is Cortex A55 / ARMv8.2A
  - The chip also contains a Cortex M33, but no support is provided
- Supported drivers include lpuart only for now
2024-03-20 20:13:14 +08:00
Ville Juven
8d52020fe1 arm64_internal.h: Expose prototype for arm64_lowputc
Useful procedure in many places.
2024-03-20 20:13:14 +08:00
Michal Lenc
7c7e163e23 icjx: add support for multiple pin read/write
This commit implements functions icjx_multireadpin and icjx_multiwritepin.
These functions can be used for multiple pin access (read/write) if
CONFIG_IOEXPANDER_MULTIPIN is selected. This access is generally
faster than one by one pin and may simplify user application.

Changes to general functions icjx_read and icjx_write were also required
to provide support for multiple data send/receive.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-03-20 20:06:33 +08:00
simbit18
e622e95d5b tools/ci/platforms/darwin.sh: Removed pyyaml folder
add rm -rf pyyaml
2024-03-20 16:22:26 +08:00
Ville Juven
2bed7c4646 arm64_mmu: Add data synchronization barrier after page tables are written
The page tables must be committed to system memory before we can proceed
enabling the MMU. ISB() is not enough to do this.
2024-03-19 15:46:51 -03:00
Radek Pesina
8f9c337c66 drivers/can/sja1000: Add SJA1000 CAN driver support
This driver is based on ESP32 TWAI CAN drivers currently available
in Nuttx, and captures the differences currently present across the
TWAI drivers for easy future adaption to remaining ESP32 platforms
with no loss of support/function. Also provides a generic SJA1000 CAN
driver solution that is CPU-architecture independent.

Changes:
- Low-level driver re-written to allow usage independent of CPU
architecture, and support both SJA1000 and TWAI CAN controllers.
- Platform-specific settings abstracted away to be provided by board
layer.
- Support for multiple instances of SJA1000 driver.
2024-03-19 15:45:53 -03:00
simbit18
21572864e7 Minor improvement for tools/ci: Fixed cmake build of bloaty and installation in darwin.sh script.
function bloaty() Add  -D CMAKE_INSTALL_PREFIX="${NUTTXTOOLS}"/bloaty.
Improves workflow execution time because it is now cached.

Changed reference file to calculate the hash for key of actions/cache@v4. Now it is darwin.sh.
2024-03-19 20:52:40 +08:00
TaiJu Wu
23d65cb97f shced:sem: replace mutex with spinlock
The overhead of spinlok is less than mutext (mutex need to call
enter_critical section.)
After this patch, `down_write_trylock` and `down_read_trylock` can be
use in interrupt context.

The instruction is protected with mutex only one instruction so using
spinlock is better.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2024-03-19 18:06:12 +08:00
Philippe Leduc
a7389c0057 Fix: typo in the if condition. 2024-03-19 18:04:18 +08:00
ligd
327d0789e4 arch: add ARCH_TRUSTZONE_DISABLED choice
We can decide whether use trustzone

After this patch, we can support the following mode:

                             ARCH_HAVE_TRUSTZONE   ARCH_TRUSTZONE_DISABLED  ARCH_TRUSTZONE_SECURE  ARCH_TRUSTZONE_NONSECURE

Without Security Extensions         n                       n                       n                         n
CHIP have NO trustzone

With Security Extensions            y                       y                       n                         n
Only one bin in sec mode

With Security Extensions            y                       n                       y                         n
TEE bin in sec mode

With Security Extensions            y                       n                       n                         y
REE bin in non-sec mode

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-03-19 18:24:42 +09:00
zhangyuan21
9c0d2e1a3c armv7-a/gicv2: move IRQ to group1 and group0 as the FIQ
Purpose: make the the os crash when busyloop with interrupt disable

Follow the arm gicv2 spec, if we want to use the IRQ and FIQ
simultaneously when not using the processor Security Externsions.
We should:
1. IRQ to Group 1 and FIQ to Group 0;
2. Set CICC_CTLR.FIQEn to 1;

Then in NuttX:
1. implement the arm_decodefiq and directly crash in it;
2. provide interface to change the IRQ to FIQ, e.g. change the
   watchdog IRQ to FIQ, so the watchdog can trigger even with the
   interrupt disabled (up_irq_save() called);

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-03-19 18:24:42 +09:00