Commit Graph

56049 Commits

Author SHA1 Message Date
cuiziwei 8e95f6800b fix GCCVER cmake define.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-21 18:03:23 +02:00
cuiziwei 35c278b716 libcxx: Ignore compile warnings.
nuttx/libs/libxx/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp:17:4: warning: #warning exception_ptr not yet implemented [-Wcpp]
17 | #  warning exception_ptr not yet implemented
   |    ^~~~~~~

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-21 15:06:42 +02:00
Leo Chung c8d683ce7a fs/nxffs: Fix syslog formats compile error
If CONFIG_FS_LARGEFILE is enabled, the off_t is 64bit.
So use PRIiOFF instead of PRIi32.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2024-10-21 19:33:33 +08:00
xuxin19 82677145ed cmake(bugfix):Fixed the issue that the host toolchain version cannot be specified
SIM arch does not need to execute find_program

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-21 18:28:39 +08:00
yangsong8 e00fbc5557 syslog: enable LF to CRLF config as default
This commit fixes the issue #14418

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-10-21 10:50:36 +02:00
Xiang Xiao 8c882cb790 ramlog: Remove RAMLOG_CRLF config and related code
since the conversion is moved to common layer after:
https://github.com/apache/nuttx/pull/14362

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-21 16:27:35 +08:00
yezhonghui 317d7a7f59 Fix make warn as error in pci drivers
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-10-21 15:35:39 +08:00
Felipe Moura 0496f357c9 Fix spi slave communication issue 2024-10-21 12:21:39 +08:00
Lup Yuen Lee df5ff920aa CI: Build only Arm32 Targets arm-01 / 03 / 05 / 06 / 07 / 09 / 11 for Complex PRs
This PR updates the Build Rules `arch.yml` to build only these Arm32 Targets when we create or update a Complex PR:
- arm-01, arm-03, arm-05, arm-06, arm-07, arm-09, arm-11

No changes for Simple PRs (arm-01 to arm-14) and for Merging PRs (also arm-01 to arm-14).

This will improve our breadth of CI Checks across Arm32 Targets, as explained here: https://github.com/apache/nuttx/issues/14376
2024-10-21 09:24:26 +08:00
raiden00pl 6f8953ed0b boards/arm/stm32f7: move SPI test logic to common
move STM32F7 SPI test logic to common
2024-10-21 09:23:44 +08:00
raiden00pl 56e07b0606 boards/arm/stm32f7/nucleo: remove not used stm32_dma_alloc.c
remove not used stm32_dma_alloc.c
2024-10-21 09:23:44 +08:00
raiden00pl dadace3638 boards/arm/stm32f7: move reset logic to common
move stm32f7 reset logic to common
2024-10-21 09:23:44 +08:00
raiden00pl d4e158f86d boards/arm/stm32f7: move ROMFS logic to common directory
move ROMFS logic to common directory
2024-10-21 09:23:44 +08:00
raiden00pl b606c17619 boards/arm/stm32f7: move CAN init logic to a common directory
move CAN init logic to a common directory
2024-10-21 09:23:44 +08:00
raiden00pl 6657f2abb7 boards/arm/stm32f7: separate nucleo-144 board into individual boards
nucleo-144 combines 3 different ST boards. This approach is inconsistent with
the support for the rest of the nucleo boards, where each board is in separate folders.
Also nucleo-144 is no longer reserved for STM32F7 chips but other families also use this format.

After this commit nucleo-144 is divided into 3 boards:

- nucleo-f746zg
- nucleo-f767zi
- nucleo-f722ze
2024-10-21 09:23:44 +08:00
Ludovic Vanasse d73d34b1a0 Doc: Migrate Semihosting
Migrate https://cwiki.apache.org/confluence/display/NUTTX/Semihosting to
official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-21 09:23:07 +08:00
Ludovic Vanasse aef4d78e70 Doc: Migrate Porting drivers to stm32f7
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Porting+Drivers+to+the+STM32+F7
to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-21 09:23:07 +08:00
Ludovic Vanasse 9cf3cae3a2 Doc: Migrate Platform Directories
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Platform+Directories
to the official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-21 09:23:07 +08:00
Ludovic Vanasse b0679cbeee Doc: Migrate NuttX Protected Build
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/NuttX+Protected+Build
to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-20 17:36:40 -03:00
Ludovic Vanasse e9548e46b9 Doc: Migrate Integrating with Newlib
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Integrating+with+Newlib
to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-20 17:36:40 -03:00
Ludovic Vanasse 035faaccc7 Doc: Migrate IPv6
Migrate https://cwiki.apache.org/confluence/display/NUTTX/IPv6 to
official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-20 17:36:40 -03:00
Ludovic Vanasse e9c107e0ba Doc: Migrate logging to a ram buffer
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Logging+to+a+RAM+Buffer
to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-20 17:36:40 -03:00
dongjiuzhu1 c4780f1a69 drivers/spi_slave: call SPIS_DEV_NOTIFY when rx or tx complete for all spi slave driver
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-20 15:48:00 -03:00
Lup Yuen Lee 9c1e0d3d64 CI: Split the Build Jobs for Arm64 and x86_64
This PR creates the new CI Build Jobs `arm64-01` and `x86_64-01`. The new jobs will split and offload the Arm64 and x86_64 Build Targets from `other`. This will reduce our usage of GitHub Runners, to comply with the ASF Policy for GitHub Actions. (Recently we see more PRs for Arm64 and x86_64)

Before the Split: Simple PRs (One Arch and/or One Board) for Arm64 and x86_64 require almost 1 hour for CI Build
- `other` (57 mins): AVR, SPARC, x86, PinePhone, QEMU Arm64, QEMU x86_64

After the Split: Simple PRs for Arm64 and x86_64 will complete under 30 mins
- `other` (24 mins): AVR, SPARC, x86
- `arm64-01` (29 mins): PinePhone, QEMU Arm64
- `x86_64-01` (9 mins): QEMU x86_64

To skip more unnecessary builds: Our Build Rules `arch.yml` shall ignore the label "Area: Documentation", so that a Simple PR + Docs is still a Simple PR. Previously we experienced longer CI Build Times, just because we added docs to our Simple PR. (Now our PR shall be built exactly like a Simple PR)

The updated CI code is explained here: https://github.com/apache/nuttx/issues/13775
2024-10-20 09:49:13 +08:00
raiden00pl 56b50a2267 boards/arm/nrf52/nrf52840-dk: replace some configs with jumbo config
replace some configs with jumbo config for nrf52840-dk
2024-10-20 09:40:54 +08:00
raiden00pl 01704380d3 boards/arm/nrf52/nrf52832-dk: replace some configs with jumbo config
replace some configs with jumbo config nrf52832-dk
2024-10-20 09:40:54 +08:00
wanggang26 adc52bf968 syslog: fix ramlog not work issue with cmake
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-19 12:37:07 +02:00
Tomasz 'CeDeROM' CEDRO 2ed9bd5e71 boards/nucleo-l432kc: Add internal DAC code.
* Nucleo-L432KC board was missing internal MCU DAC code.
* DAC is now available on PA4/A3 and /dev/dac0 when enabled.
* Updated info on ADC inputs (PA6/A5,PA7/A6) depending on configuration.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2024-10-19 12:29:49 +02:00
jihandong 444ba4caa4 libcxx: optional localization.
Signed-off-by: jihandong <jihandong@xiaomi.com>
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-19 14:34:38 +08:00
jihandong 100c43c8c3 libcxx: optional wide characters support.
Disable wchar can reduce approximately 1/3 of the libcxx.
mainly from locale, string and streams.

Platform: sim
Figures: bin size in bytes.

   Size   | Description
----------+------------------------------------------------
 10045336 | Base, enable libcxx whithout any cxx programs.
 42067224 | Add cxxtest.
 29997304 | Disable libcxx wchar support.

Signed-off-by: jihandong <jihandong@xiaomi.com>
2024-10-19 14:34:38 +08:00
guoshichao 65aa5415a7 cmake: fix the fdiagnostics-color handle issue
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-10-19 14:32:35 +08:00
cuiziwei 9614e1fed5 Add GCCVER define to Toolchain.cmake
Since GCCVER will also be used in the toolchain, it needs to be defined in advance.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-19 14:32:08 +08:00
Lup Yuen Lee a94c099b7d CI: Skip half of RISC-V, Xtensa and Simulator targets when a Complex PR is created / updated
When we submit or update a Complex PR that affects All Architectures (Arm, RISC-V, Xtensa, etc): CI Workflow shall run only half the jobs for RISC-V, Xtensa and Simulator:
- `risc-v-01` to `03`
- `xtensa-01`
- `sim-01`

When the Complex PR is Merged: CI Workflow will still run all jobs for RISC-V, Xtensa and Simulator:
- `risc-v-01` to `06`
- `xtensa-01` to `02`
- `sim-01` to `02`

Simple PRs with One Single Arch / Board will build the same way as before:
- `risc-v-01` to `06`
- `xtensa-01` to `02`
- `sim-01` to `02`

We hope to lower drastically our usage of GitHub Runners before the ASF Deadline, as explained here: https://github.com/apache/nuttx/issues/14376
2024-10-19 06:57:22 +07:00
ouyangxiangzhen 8ecca52b27 sched/timer: Simplify setitimer implementation.
This commit simplified setitmer implementation by eliminating a redundant conditional branch.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-18 23:58:07 +08:00
cuiziwei 541f30878a arch/x86_64:Add CXX configuration for enabling x86_64 support for C++ applications.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-18 23:53:35 +08:00
simbit18 791d7c97d0 cmake: Renamed savedefconfig with refreshsilent
Renamed savedefconfig -> refreshsilent name more consistent with the refresh stage for cmake on github.

Added new savedefconfig to fix
https://github.com/apache/nuttx/issues/14281
2024-10-18 22:14:50 +08:00
zhangbo56 0496984338 libc: Add debug assert to prevent tls allocation failure
So It's easy to find TASK_TLS_ELEM not enough error.

Signed-off-by: zhangbo56 <zhangbo56@xiaomi.com>
2024-10-18 21:34:18 +08:00
Eren Terzioglu 05ba822c41 esp32[c3]: Add BLE support 2024-10-18 21:33:58 +08:00
chao an 68d6b18f9a drivers/misc/devmem: add dev_mem.c into cmake build
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-18 21:32:48 +08:00
chao an 11af0e476f drivers/misc/devmem: remove unnecessary register parser
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-18 21:32:48 +08:00
chao an 91cb625f9d memory_region: add static/const for read only instance
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-18 21:32:48 +08:00
chao an d49db03e04 libs/misc/memoryregion: remove unused memory_region
memory region will no longer be used

Signed-off-by: chao an <anchao@lixiang.com>
2024-10-18 21:32:48 +08:00
Ville Juven 5de9d957e6 ricv/riscv_cpuid: Return meaningful values for CPU/Hart ID when SMP=no
Return 0 for CPU ID for any hart ID, and return the current Hart ID for
any CPU ID. At least these values are somewhat usable / meaningful in
non-SMP configurations.
2024-10-18 21:31:17 +08:00
xuxingliang 53d90c8205 tools/checkpatch: fix isort doesn't return error
Flag --diff will output the changes content.
Flag --check-only will return exit code. It can be used together with --diff.

Run isort again to format the code in place, to make the behavior same as before.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-18 21:30:13 +08:00
YAMAMOTO Takashi 0d57e3dba6 tools/esp32s3/Config.mk: fix "unterminated call to function" error
this # would be parsed by make as a start of a comment.
2024-10-18 20:47:28 +08:00
zhangshoukui a7f7afe019 bmi160: fix Parameter passing error when use spi
nuttx/drivers/sensors/bmi160_uorb.c:596:18: warning: passing argument 1 of ‘bmi160_getreg8’ from incompatible pointer type [-Wincompatible-pointer-types]
  596 |   bmi160_getreg8(priv, 0x7f);
      |                  ^~~~
      |                  |
      |                  struct bmi160_dev_uorb_s *
In file included from nuttx/drivers/sensors/bmi160_uorb.c:25:
nuttx/drivers/sensors/bmi160_base.h:235:49: note: expected ‘struct bmi160_dev_s *’ but argument is of type ‘struct bmi160_dev_uorb_s *’
  235 | uint8_t bmi160_getreg8(FAR struct bmi160_dev_s *priv, uint8_t regaddr);
      |                            ~~~~~~~~~~~~~~~~~~~~~^~~~
nuttx/drivers/sensors/bmi160_uorb.c:597:18: warning: passing argument 1 of ‘bmi160_getreg8’ from incompatible pointer type [-Wincompatible-pointer-types]
  597 |   bmi160_getreg8(priv, 0x7f); /* workaround: fail to switch SPI, run twice */
      |                  ^~~~
      |                  |
      |                  struct bmi160_dev_uorb_s *

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-10-18 19:58:22 +08:00
zhangshoukui 50f16c840c bmi160: fix compile warning and %zu replace %u
VELAPLATFO-45270

nuttx/drivers/sensors/bmi160.c: In function ‘bmi160_set_normal_imu’:
nuttx/drivers/sensors/bmi160.c:79:3: warning: implicit declaration of function ‘up_mdelay’ [-Wimplicit-function-declaration]
   79 |   up_mdelay(30);
      |   ^~~~~~~~~

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-10-18 19:58:22 +08:00
Ville Juven cf95305934 mpfs/mpfs_plic: Add procedure to initialize per hart PLIC state
MPFS implements external interrupt control on a per-hart basis i.e. there
are PLIC control registers for each hart separately. This means we need
a procedure to initialize such registers for each hart individually,
instead of only for the boot hart like it is now.

Fix this by implementing mpfs_plic_init_hart which can be called by each
hart as needed.

Note: it is not a good idea to initialize all harts from the boot hart,
as the boot hart may not know which harts are used by NuttX in AMP
configuration. It is better that the hart initializes itself.

Note: The hartid must be provided as explicit parameter, as it cannot
be queried via riscv_mhartid() yet; the per-cpu structure is initialized
later on which means riscv_mhartid() would return 0 for all harts except
the boot hart.
2024-10-18 19:34:57 +08:00
Ville Juven a33e63097a riscv/mpfs: Add boilerplate code for SMP 2024-10-18 19:34:57 +08:00
Ville Juven c99de98995 mpfs_start: Initialize percpu as soon as possible
Otherwise querying for hartid doesn't work.
2024-10-18 19:34:57 +08:00