Commit graph

16305 commits

Author SHA1 Message Date
hujun5
03af486d68 arm: remove up_set_current_regs/up_current_regs
reason:
up_set_current_regs initially had two functions:

1: To mark the entry into an interrupt state.
2: To record the context before an interrupt/exception. If we switch to
   a new task, we need to store the upcoming context regs by calling up_set_current_regs(regs).

Currently, we record the context in other ways, so the second function is obsolete.
Therefore, we need to rename up_set_current_regs to better reflect its actual meaning,
which is solely to mark an interrupt.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-03 18:27:54 +08:00
Kyle Wilson
e1e1d534af Add STM32H5 FDCAN Hardware File
Adding the STM32H5 FDCAN Hardware definitions. The register set is identical to the STM32G4. No major changes other than changing G4 to H5 and removing ifdef requirement for STM32G4.

Fixed style issues
2024-12-03 08:33:31 +08:00
Kyle Wilson
d417e1525b First commit of STM32H5 SPI Hardware file.
This file is heavily based on the STM32H7 implementation. CFG1_BPASS and UDRCFG were the main differences.
2024-12-03 08:32:50 +08:00
Michal Lenc
9fbb81e8a4 samv7: fix bytes to words calculation in user signature read
EEFC read sequence requires read length in words instead of bytes,
therefore bytes given by the user has to be recalculated to words.
The calculation however had a mistake in brackets and was just adding
1 to buflen instead of recalculating it to 4 byte words. This caused
global array g_page_buffer to overflow for some reads.

This fixes the calculation.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-12-02 19:47:43 +08:00
hujun5
8b46a4d916 lc823450_usbdev: use small lock in arch/arm/src/lc823450/lc823450_usbdev.c
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-02 13:35:14 +08:00
hujun5
c116b6578a max32660_wdt: use small lock in arch/arm/src/max326xx/max32660/max32660_wdt.c
reason:
we plan to remove all instances of spin_lock_irqsave(NULL)

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-02 13:34:53 +08:00
hujun5
30940d9251 imxrt_serial: use small lock in arch/arm/src/imxrt/imxrt_serial.c
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-01 18:02:10 +08:00
wangjianyu3
074c494f8f nrf91: Support using different nbuffer for each topic
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-30 14:10:57 +08:00
hujun5
74dfcdfbd6 cxd56xx: use small lock in arch/arm/src/cxd56xx/cxd56_clock.c
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-30 03:15:02 +08:00
chao an
8257b11944 arm/isr: move up_set_interrupt_context() to chip define
up_set_interrupt_context() is chip specific implement, move this function to correct place

Signed-off-by: chao an <anchao@lixiang.com>
2024-11-29 18:37:08 +08:00
simbit18
9c9b945876 fix nxstyle
Removed extra spaces from .h and .c files
2024-11-28 20:40:13 +08:00
hujun5
0bba53ce12 remove redundant scheduling records
reason:
Since the scheduling records have already been moved to the interrupt exit in this submission,
we need to delete the original records' locations.
This commit fixes the regression from https://github.com/apache/nuttx/pull/13651

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-28 18:56:13 +08:00
guoshichao
a2fcd9862c nuttx/arch: remove the custom board check in up_testset implementation
the up_testset implementation is common code, should not add custom
board check

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-11-28 15:06:57 +08:00
simbit18
0476895c0d fix nxstyle
Remove TABs
2024-11-28 09:14:49 +08:00
Jinliang Li
37a0445ddb armv8-r/gicv3: support fiq
1. support fiq decoding and dispatch
2. replace CONFIG_ARMV8R_DECODEFIQ with CONFIG_ARCH_HIPRI_INTERRUPT

Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
2024-11-27 14:28:27 +08:00
hujun5
ef313755e7 sched: replace up_cpu_index with this_cpu
Make this_cpu is arch independent and up_cpu_index do that.
In AMP mode, up_cpu_index() may return the index of the physical core.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-27 03:00:32 +08:00
hujun5
610efc8f1a arm: remove up_set_current_regs/up_current_regs
reason:
up_set_current_regs initially had two functions:

1: To mark the entry into an interrupt state.
2: To record the context before an interrupt/exception. If we switch to
   a new task, we need to store the upcoming context regs by calling up_set_current_regs(regs).

Currently, we record the context in other ways, so the second function is obsolete.
Therefore, we need to rename up_set_current_regs to better reflect its actual meaning,
which is solely to mark an interrupt.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-26 20:04:54 +08:00
hujun5
03f430edf7 fix some build error
hujun5@hujun5-OptiPlex-7070:~/downloads1/vela_sim/nuttx$ make -j12
chip/qemu_boot.c: In function 'up_cpu_start':
chip/qemu_boot.c:102:3: warning: implicit declaration of function 'sched_note_cpu_start' [-Wimplicit-function-declaration]
  102 |   sched_note_cpu_start(this_task(), cpu);
      |   ^~~~~~~~~~~~~~~~~~~~
chip/qemu_boot.c:102:24: warning: implicit declaration of function 'this_task' [-Wimplicit-function-declaration]
  102 |   sched_note_cpu_start(this_task(), cpu);
      |                        ^~~~~~~~~

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-25 17:10:50 +08:00
yinshengkai
0194c2f88a gcov: update gcov compilation parameters
profile-generate is used to generate compilation feedback optimization data, not just code coverage data

It will rely on the toolchain library:
nuttx/libs/libc/misc/lib_utsname.c:94:(.text.uname+0x2c): undefined reference to `__gcov_indirect_call_profiler_v4'
arm-none-eabi-ld: nuttx/libs/libc/misc/lib_utsname.c:113:(.text.uname+0x178): undefined reference to `__gcov_indirect_call'
arm-none-eabi-ld: nuttx/libs/libc/misc/lib_utsname.c:113:(.text.uname+0x188): undefined reference to `__gcov_time_profiler_counter'
arm-none-eabi-ld: nuttx/staging/libc.a(lib_utsname.o):(.data..LPBX0+0x30): undefined reference to `__gcov_merge_time_profile'

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-11-22 19:08:08 +08:00
simbit18
d16de91e39 [MSYS2] CMake+Ninja Fix arm-none-eabi-ar: Argument list too long
This issue is related to the Arm toolchain for Windows which is available for x86 host architecture only (compatible with x86_64)

Windows (mingw-w64-i686) hosted cross toolchains
AArch32 bare-metal target (arm-none-eabi)

Issue
/bin/sh: line 1: /home/nuttx/nuttxnew/tools/gcc-arm-none-eabi/bin/arm-none-eabi-ar: Argument list too long

On Windows, arm-none-eabi-ar can only accept strings up to a maximum length of 32,768 characters.

We could suppress the 32K include string limitation by setting the CMake variable CMAKE_NINJA_FORCE_RESPONSE_FILE to ON.

This is unfortunately not enough!!! ): In the build phase this error comes out

$ cmake --build build
[2/1025] Building ASM object arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj
FAILED: arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj
/home/nuttx/nuttxnew/tools/gcc-arm-none-eabi/bin/arm-none-eabi-gcc.exe @arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj.rsp -MD -MT arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj -MF arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj.d -o arch/CMakeFiles/arch.dir/arm/src/armv7-m/arm_exception.S.obj -c /home/nuttx/nxninja/nuttx/arch/arm/src/armv7-m/arm_exception.S
C:/msys64/home/nuttx/nxninja/nuttx/arch/arm/src/armv7-m/arm_exception.S:42:10: fatal error: nuttx/config.h: No such file or directory
   42 | #include <nuttx/config.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

The Workround I found to solve this problem is to overwrite
the responsible file flag CMAKE_${lang}_RESPONSE_FILE_FLAG with $DEFINES $INCLUDES $FLAGS

Maybe there is a better solution but this one it works. :)
2024-11-21 19:18:38 -03:00
guoshichao
f6cfcfa39f armv6-m: fix the incorrect stub-function entry address of svc call
the stub-function entry address is stored in r4, we should branch to the
stub-function with blx r4, not r5

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-11-21 20:08:42 +08:00
Peter Bee
3e6913775d fix(rp2350): should copy data before init clock
Signed-off-by: Peter Bee <peter@PeterdeMac-mini.local>
2024-11-21 20:00:17 +08:00
stbenn
9cd0ea32ea arch/stm32h5: Add timer register hardware file
This commit adds register definitions for advanced, basic, and general purpose timers. Formatting convention was taken from the H7 hardware timer header.
2024-11-21 10:54:10 +08:00
simbit18
7df0e945ad Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
Replace help => ---help---
Remove extra TABs
Add comments
2024-11-20 16:45:40 -03:00
Peter Bee
c0f776dbc3 follow upstream change & fix minor things
Signed-off-by: Peter Bee <pbjd97@gmail.com>
2024-11-20 16:32:05 -03:00
Peter Bee
48ded21e30 refine driver
Signed-off-by: Peter Bee <pbjd97@gmail.com>
2024-11-20 16:32:05 -03:00
Marco Casaroli
c5b81401d8 arch(rp23xx): add files 2024-11-20 16:32:05 -03:00
Marco Casaroli
047b832f24 rp23xx: add pico-sdk files
These files were copied from a config of pico-sdk 2.0.0.

They provide struct address mapped access to peripherals, along
with register definitions. It also provides some compiler helpers
that are partially used by the port.
2024-11-20 16:32:05 -03:00
wangmingrong1
d41e3da911 Fix ALIGN_UP duplicate definition error
ALIGN_UP has been defined in nuttx.h

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-20 14:51:54 +08:00
stbenn
8def1764a4 arch/stm32h5: add basic ADC support
Adds ADC support with minimal feature set (no DMA or Timers etc). A new nucleo-h563zi configuration was added to
provide easy testing with the adc example NSH addon.

Fix Kconfig spacing to tabs
2024-11-20 08:51:27 +08:00
chao an
f8ccfc3f7f arm/efm32: fix regression by PR#14810
itm syslog should use syslog_write() not up_putc()

Signed-off-by: chao an <anchao@lixiang.com>
2024-11-19 20:50:33 +08:00
chao an
c328650aa5 arm/cortex-m: itm syslog should select SYSLOG_REGISTER
Signed-off-by: chao an <anchao@lixiang.com>
2024-11-19 20:50:33 +08:00
chao an
5582134c04 arm/efm: fix build warning
chip/efm32_start.c:150:3: warning: implicit declaration of function 'itm_syslog_initialize';
                                   did you mean 'syslog_initialize'? [-Wimplicit-function-declaration]
  150 |   itm_syslog_initialize();
      |   ^~~~~~~~~~~~~~~~~~~~~
      |   syslog_initialize

Signed-off-by: chao an <anchao@lixiang.com>
2024-11-19 20:50:33 +08:00
SPRESENSE
f142d04b91 arch: cxd56xx: Fix compile error of cxd56_gnss.c
Fix error: 'g_rtc_enabled' undeclared (first use in this function).
2024-11-19 15:37:42 +08:00
Masayuki Ishikawa
1d6ece71b8 arch: arm: Fix cxd56xx for SMP
Summary:
- In https://github.com/apache/nuttx/pull/14465,
  atomic_compare_exchange_weak_explicit() was newly introduced
  in semaphore. However, cxd56xx has an issue with the API
  if SMP is enabled (see up_testset2 in cxd56_testset.c).
- This commit fixes the issue by using LIBC_ARCH_ATOMIC.

Impact:
- Only cxd56xx SoCs in SMP mode.

Testing:
- Tested with spresense:smp, spresense:wifi_smp
- NOTE: If DEBUG_ASSERTIONS is enabled assert would be happend.
  I think this might be another issue.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2024-11-19 15:17:28 +08:00
guoshichao
2d7b19b359 ghs: add thumb mode detection support for ghs compiler
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-11-17 15:43:18 +08:00
stbenn
caaee545b1 arch/stm32h5: Simplify PLL configuration.
The PLL clock configuration was simplified on the assumption the clocks are correctly set in the board.h file. Instead of seperate conditions
for register components, assume the relevant PLL registers are fully defined in board.h. This should result in easier to understand defines in board.h
and simpler code flow in the standard clock configuration function.

Changes were mad in the board file alongside changing the arch files. Changes to board/stm32h5:
  - PLL1 has been configured to use integer instead of fractional mode to reach the 250 MHz target. PLL2 and PLL3 configurations were
    removed since they are currently unused in the H5 configuration.
  - PLL1 output was verified by testing for changes in serial baud rate.
2024-11-16 01:55:32 +08:00
chao an
238cddde3a drivers/syslog: remove implement of syslog_putc()
syslog_putc() have a lot of duplicate logic with syslog_write().
remove syslog_putc() and reuse syslog_write() to simplify syslog printing.

Signed-off-by: chao an <anchao@lixiang.com>
2024-11-15 19:46:36 +08:00
hujun5
19b4911d7f arch: remove up_current_regs in common code
reason:

When entering an exception or interrupt, there are two sets of registers:
one is the "running regs", which we need to save,
and the other is the "ready to running regs", which we may soon use.
For consistency in logic, we can always store the "running regs" in the regs field of g_running_tasks,
otherwise it may lead to errors in the storage location of the "running regs."

When we need to access the "running regs," we should uniformly retrieve them from the regs field of g_running_tasks.

As the next step, we will rename the set_current_regs/up_current_regs functions
for each architecture to more appropriate names, solely for the purpose of identifying interrupts.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-15 18:25:35 +08:00
Takuya Miyasita
2275138dcf arch_atomic : Introduce CONFIG_LIBC_ARCH_ATOMIC
Some armv7-m-based SoCs do not work with atomic instructions,
even though armv7-m supports them.

To avoid using atomic instructions generated by gcc,
CONFIG_LIBC_ARCH_ATOMIC is newly introduced with which
arch_atomic.c is linked explicitly.

However, the function names need to be changed to avoid
build errors, since the functions described in stdatomic.h
are gcc built-in and inlined when the code is compiled.

About libcxx with CONFIG_LIBC_ARCH_ATOMIC, it still
does not work. It is also needed to call nx_atomic_ ver
instead of __atomic ver in
libcxx/include/__atomic/cxx_atomic_lmpl.h.

Signed-off-by: Takuya Miyasita <Takuya.Miyashita@sony.com>
2024-11-15 14:01:56 +08:00
Pressl, Štěpán
fe4f7a3a16 arch/arm/src/samv7/sam_afec.c: AFEC1 actually has 12 physical inputs
This commit adds a max_pins field into the private struct.
AFEC0 has 11, AFEC1 has 12. The 12th pin of AFEC0 is an internal
pin connected to a temperature sensor, which we don't use.

Signed-off-by: Stepan Pressl <pressste@fel.cvut.cz>
2024-11-15 08:43:07 +08:00
wangmingrong1
9b0df45d1c gcov: arm,arm64 add coverage global
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-15 01:05:16 +08:00
wangmingrong1
17ce9b86c1 gcov: Correct existing gcov configuration
1. add CONFIG_COVERAGE_ALL to replace CONFIG_SCHED_GCOV_ALL
2. Correct all SCHED_GCOV, SCHED_GCOV_ALL

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-15 01:05:16 +08:00
wangmingrong1
b6f6cadf93 gprof: Remove duplicate content
1. arch/arm/src/cmake/gcc.cmake: The same judgment has been made in line 164
2. boards/sim/sim/sim/scripts/Make.defs: arch/sim/src/Makefile also has in line 147

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-15 01:05:16 +08:00
wangmingrong1
656883fec5 arch/toochain: Add toochain to gcc
1. Modify the select the gcc compiler

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-14 15:45:24 +08:00
Kyle Wilson
d4f6cc229d STM32H5 I2C Driver
Added I2C driver for the STM32H5. This driver uses the STM32H7 I2C driver as a base. The primary difference is setclock dynamically sets the I2C TIMINGR register instead of using hardcoded values. This allows the I2C peripherals to use any of the input clocks and set to any speed 0-1MHz. Additionally, Kconfig options were made available to set the Digital Noise Filter (DNF), Analog Noise Filter, I2C Clock source (i2c_ker_ck), as well as set i2c rise/fall times which are crucial to timing. Care must be taken when setting the clock source and filters, as not all settings are compatible with all i2c clock frequencies.
2024-11-14 08:50:28 +08:00
stbenn
5d87319cb6 arch/stm32h5: Add ADC hardware register file
This change defines macros for the ADC register map from ST document RM0481.
2024-11-13 16:33:22 -03:00
Masayuki Ishikawa
bbf2bbf37d Revert "arch_atomic : Introduce CONFIG_LIBC_ARCH_ATOMIC"
This reverts commit 81e7b13a05.
2024-11-13 10:45:12 +09:00
wangmingrong1
bf93c7840a gprof: move gprof function from sched to libbuiltin/libgcc
1. Enable interrupt gprof please config CONFIG_PROFILE_MINI
2. Enable instuction gprof please add compile opt "-pg" or config CONFIG_PROFILE_ALL

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-13 02:42:31 +08:00
Takuya Miyasita
81e7b13a05 arch_atomic : Introduce CONFIG_LIBC_ARCH_ATOMIC
Some armv7-m-based SoCs do not work with atomic instructions,
even though armv7-m supports them.

To avoid using atomic instructions generated by gcc,
CONFIG_LIBC_ARCH_ATOMIC is newly introduced with which
arch_atomic.c is linked explicitly.

However, the function names need to be changed to avoid
build errors, since the functions described in stdatomic.h
are gcc built-in and inlined when the code is compiled.

Signed-off-by: Takuya Miyasita <Takuya.Miyashita@sony.com>
2024-11-12 14:27:42 +09:00
guoshichao
6036a318f4 compiler: add __ARM_ARCH, __ARM_FEATURE_DSP macro definition in ghs
when we build mbedtls in vela with ghs compiler, the mbedtls need to
access __ARM_ARCH and __ARM_FEATURE_DSP, and to construct the inline asm
code based on these two macros.
With ghs compiler, these two macros are not defined, and will be
evaluated as 0 by default, and thus will using to wrong inline asm code,
in order to handle this issue, we need to add conversion between the ghs
and gcc with __ARM_ARCH, __ARM_FEATURE_DSP

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-11-11 22:18:05 +08:00
guoshichao
0679d45d5b nuttx/qemu: Fix funciton up_idle multiple definition
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-11-11 19:56:40 +08:00
guoshichao
a044e1896f arm_svcall: fix the naked_function function non-compatible issue
when build with greenhills_202354, the naked_function should only
contains the basic asm statements, so if the naked_function contains the
statements that using to accept params from C lang runtime, then build
error will reported:

error #101112: Only basic asm expressions are allowed for functions
with __attribute__((naked)): dispatch_syscall

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-11-11 19:56:13 +08:00
stbenn
cd479f6752 arch/stm32h5: Add ethernet hardware support files
This commit adds files in preperation of adding ethernet drivers for the STM32H563 and Nucleo-H563ZI board.
It also modifies the pinmap to include ethernet pins (and cleaned up leftover comments from L5 file), as well as
add those pins to the board.h for the nucleo-h563zi.

Files added:
  - arch/arm/src/stm32h5/hardware/stm32_ethernet.h
  - arch/arm/src/stm32h5/hardware/stm32_sbs.h
    - Not fully implemented, just register necessary for ethernet driver.
2024-11-10 01:11:10 +08:00
Kyle Wilson
19fc0628ae Update BOARD_USExxx naming, input clock selection, and setting of HSIDIV
The naming scheme in board.h changed from STM32H5_ to STM32_. As a result we needed to adjust the naming of the STM32H5_BOARD_USExxx variables in stm32h5xx_rcc.c. Also made changes to allow the enabling of all 3 of HSI, CSI, or HSE in stm32_stdclockconfig. Lastly, the HSIDIV bits in RCC_CR were not being cleared before being set. Added logic to clear these bits.

defined CSIRDY_TIMEOUT
2024-11-09 11:36:09 +01:00
Kyle Wilson
ad2db7a387 Fix Serial APB Clock Sources
The apbclock sources for lpuart1, usart6, usart10, and usart11 were set to the wrong PCLK (default).
2024-11-07 11:37:28 +08:00
stbenn
ca74d81a04 H5 Kconfig add ethernet, cleanup comments.
This is a combination of 2 commits:

H5 Kconfig ethernet options added.
  - This commit cleans up unecessary comments in the Kconfig and adds the the Ethernet/MAC menu.
    The menu is copied from the H7 menu, since the peripheral IP is identical.

Remove trailing whitespaces.

Update suggested mask
2024-11-07 09:55:01 +08:00
Kyle Wilson
400f2960e6 Added PLLxFRACN definitions. Updated board.h to use them. Updated board.h to set SYSCLK to 250 MHz properly.
PLL1FRACN was being set improperly. stm32h5xxx_rcc.c does not shift the value provided by board.h. So it was being set wrong. The defintions in stm32h5xxx_rcc.h shift the FRACN value and are now used by board.h. Also, board.h was not setting PLL1P properly. PLL1P can not have odd divisors. Therefore a value of 0 was invalid. Set it to a value of 1 (divide by 2), then adjust PLL1N to 31 and PLL1FRAC1 to 2048 to actually set SYSCLK to 250MHz.
2024-11-06 16:25:09 -03:00
stbenn
904b6ff85b H5 with NSH support for Nucleo-H563ZI.
Made fixes to issues from CI. Nxstyle and defconfig syntax.

This is a combination of 6 commits.

Adding STM32H5 arch files. With comments addressed.

Created stm32h5 directory to add support for the H5 chip, and used a Nucleo-H563ZI dev board during development. The goal was to get a working nutshell through the STLink connector on the board.

Remove board/docs changes for PR update.

Squash commits into one for PR guideline conformity.

trying to fix build issues

Fix format from review

Nucleo-H563ZI support for NSH.

Created stm32h5 directory to add support for the H5 chip, and used a Nucleo-H563ZI dev board during development. The goal was to get a working nutshell through the STLink connector on the board.

Fix switch default case placement.

NXstyle fixes

Renaming files

rename stm32h5_gpio.x files

rename h5 hsi48 files

Rename h5 idle file

rename stm32h5_irq.c

Rename some rcc functions and stm32h5_rcc.c

rename stm32h5_rcc.h

Rename stm32h5_pwr.x

lowputc renames

timerisr renames

uart renamed

rename serial file

rename start

Turn off the defines that enable DMA on serial

remove DMA Kconfig options

Remove H5 documentation. Will add in a future PR.

Fix styling and defconfig improper syntax.
2024-11-06 10:28:49 +08:00
parallels
2b110ab64e Adding STM32H5 arch files. With comments addressed.
Created stm32h5 directory to add support for the H5 chip, and used a Nucleo-H563ZI dev board during development. The goal was to get a working nutshell through the STLink connector on the board.

Remove board/docs changes for PR update.

Squash commits into one for PR guideline conformity.

trying to fix build issues

Fix format from review
2024-11-06 03:17:45 +08:00
wangmingrong1
6381685a8b toolchains: Compiler versioning adds --print-memory-usage
1. The "-print-memory-usage" parameter introduced in GNU Link version 2.26

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-06 01:57:38 +08:00
wangmingrong1
3e605c1f46 clang/cmake: Fix clang cmake can't find libgcc, align with makefile
makefile:
ifeq ($(CONFIG_BUILTIN_TOOLCHAIN),y)
  COMPILER_RT_LIB = $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)
  ifeq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
    ifeq ($(wildcard $(COMPILER_RT_LIB)),)
      # if "--print-libgcc-file-name" unable to find the correct libgcc PATH
      # then go ahead and try "--print-file-name"
      COMPILER_RT_LIB := $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name $(notdir $(COMPILER_RT_LIB))))
    endif
  endif
endif

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-04 22:39:40 +08:00
xuxin19
1bb01d40fd cmake(build):add the specified armclang compiler to the cmake Toolchain file
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-03 14:06:40 +08:00
YAMAMOTO Takashi
761ee81956 move readv/writev to the kernel
currently, nuttx implements readv/writev on the top of read/write.
while it might work for the simplest cases, it's broken by design.
for example, it's impossible to make it work correctly for files
which need to preserve data boundaries without allocating a single
contiguous buffer. (udp socket, some character devices, etc)

this change is a start of the migration to a better design.
that is, implement read/write on the top of readv/writev.

to avoid a single huge change, following things will NOT be done in
this commit:

* fix actual bugs caused by the original readv-based-on-read design.
  (cf. https://github.com/apache/nuttx/pull/12674)

* adapt filesystems/drivers to actually benefit from the new interface.
  (except a few trivial examples)

* eventually retire the old interface.

* retire read/write syscalls. implement them in libc instead.

* pread/pwrite/preadv/pwritev (except the introduction of struct uio,
  which is a preparation to back these variations with the new
  interface.)
2024-10-30 17:07:54 +08:00
wangmingrong1
e3d7d23618 gcov: Fix typographical errors
1. CONFIG_ARCH_COVERAGE has been replaced by CONFIG_SCHED_GCOV
2. Delete the SIM-specific GCOV_ALL configuration and change it to a universal configuration for all architectures

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-30 14:45:23 +08:00
cuiziwei
d42f16939e nuttx: Fix build warning with can't found xt-g++
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-29 22:27:58 +08:00
wangmingrong1
083f9d162e clang/ld.lld: clang17 and above support the option --print-memory-usage
1. cmake uses clang++ as a connector, and does not currently support:
	clang++: error: unknown argument: '-wl,--print-memory-usage'
	clang++: error: no input files

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-29 20:43:35 +08:00
chao an
e3689cbb2f CMake/preprocess: fix typo PREPROCES -> PREPROCESS
correct the marco define from PREPROCES to PREPROCESS

Signed-off-by: chao an <anchao@lixiang.com>
2024-10-29 17:41:01 +08:00
raiden00pl
716d898dda arch/arm/stm32/stm32_dumpgpio.c: fix print warnings
fix print warnings for stm32_dumpgpio.c
2024-10-29 02:23:36 +08:00
raiden00pl
7ebb8af454 arch/arm/stm32/Kconfig: fix Kconfig error
fix Kconfig error related to STM32_HAVE_HRTIM1_PLLCLK
2024-10-28 19:36:17 +08:00
wangmingrong1
e174d73cd9 clang:libclang_rt.builtins-xxx.a supports builtin
1. enable CONFIG_BUILTIN_COMPILER_RT  to built libclang_rt.builtins-xxx.a and no longer use the compiler's built-in
2. Modify clang version acquisition to get two decimal points
3. It has been ported to support four architectures: ARM, ARM64, RISCV, and x86_64, among which ARM has been validated

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-28 16:38:45 +08:00
Xiang Xiao
69100ef0e4 arch: Fix minor style issue
not real behaviour change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-28 09:24:55 +01:00
raiden00pl
b5e5cdd851 arch/arm/stm32h7: add workaround for Renode
Add an option to disable busy wait PWR_CSR1_ACTVOSRDY during boot
which doesn't work with Renode simulation
2024-10-26 20:49:49 +08:00
chao an
c6591c0f49 driver/serial: remove return value of up_putc()
modify the prototype of up_putc(): remove the return value

The architecture code does not care about the return value of up_putc(), so removing it saves two statements:

Before:                                                    After:
de4c: e52de004  push  {lr}    @ (str lr, [sp, #-4]!)    |  de4c: e52de004  push  {lr}    @ (str lr, [sp, #-4]!)
de50: e24dd014  sub sp, sp, #20                         |  de50: e24dd014  sub sp, sp, #20
de54: e58d0004  str r0, [sp, #4]                        |  de54: e58d0004  str r0, [sp, #4]
de58: e30030f8  movw  r3, #248  @ 0xf8                  |  de58: e30030f8  movw  r3, #248  @ 0xf8
de5c: e3423000  movt  r3, #8192 @ 0x2000                |  de5c: e3423000  movt  r3, #8192 @ 0x2000
de60: e58d300c  str r3, [sp, #12]                       |  de60: e58d300c  str r3, [sp, #12]
de64: e59d1004  ldr r1, [sp, #4]                        |  de64: e59d1004  ldr r1, [sp, #4]
de68: e59d000c  ldr r0, [sp, #12]                       |  de68: e59d000c  ldr r0, [sp, #12]
de6c: ebfffe66  bl  d80c <pl011_putc>                   |  de6c: ebfffe66  bl  d80c <pl011_putc>
de70: e59d3004  ldr r3, [sp, #4]                        |  de70: e28dd014  add sp, sp, #20
de74: e1a00003  mov r0, r3                              |  de74: e49df004  pop {pc}    @ (ldr pc, [sp], #4)
de78: e28dd014  add sp, sp, #20                         |
de7c: e49df004  pop {pc}    @ (ldr pc, [sp], #4)        |

Signed-off-by: chao an <anchao@lixiang.com>
2024-10-26 13:21:29 +08:00
raiden00pl
da1ff4cf77 arch/arm/stm32: convert error to warning when CCM is not enabled
User may set CONFIG_MM_REGIONS=1 on purpose to disable CCM.
This is a completely normal system config and should not be treated as error.

I found this problem trying to run Renode with stm32f4discovery/nsh but
Renode doesn't support CCM so we have to disable it
2024-10-26 11:02:19 +08:00
chao an
b28f87e3f0 arm/gicv3: replace this_cpu() to up_cpu_index()
If the core id needs to be included in the hardware register
calculation, up_cpu_index() should be used instead of this_cpu().

Signed-off-by: chao an <anchao@lixiang.com>
2024-10-25 14:27:34 +08:00
Jinliang Li
5fb0c44f38 arm/armv8-r: optimize generic timer initialization
1. Enable timer and irq finally to make sure timer callback was already
   registered. When the CPU resets, the values of some generic timer
   registers are undefined. Enabling the timer interrupt in advance may
   cause the timer to trigger early while the timer callback is not yet
   registered. This results in the timer ISR being executed, which masks
   the timer interrupt. Since the timer callback is not registered at
   this point, the timer interrupt is not unmasked, further causing the
   system scheduler to hang.
2. Remove timer mask for one-shot timer and that's in isr,
   irq/fiq is disabled. Masking generic timer is not necessary, and it
   may introduce risks, otherwise, mask/unmask must be pair in all
   situations.

Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
2024-10-25 13:17:08 +08:00
Jinliang Li
40bbe7f3e9 arm/armv8-r: init HSCTLR and HACTLR for EL2
1. init HSCTLR to enable i-cache/d-cache for EL2
2. init HACTLR to enable all access to implementation defined
   registers for EL1.
3. add dsb/isb before switch to EL1 from EL2

Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
2024-10-25 12:09:47 +08:00
chao an
ea4c4ef36a arm/armv8-r: fix unable to switch context in ISR context
Regression by:
| commit 35c8c80a00
| Author: ligd <liguiding1@xiaomi.com>
| Date:   Fri Jul 26 23:14:13 2024 +0800
|
| arch: change nxsched_suspend/resume_scheduler() called position

Signed-off-by: chao an <anchao@lixiang.com>
2024-10-25 09:47:37 +08:00
Tim Hardisty
517c66daf8 sam_sfc.c incorrect EFUSEIOC name used 2024-10-25 08:42:40 +08:00
wangmingrong1
f11b04fc61 kconfig: Add link parameters that can print remaining memory information
LD: nuttx
Memory region         Used Size  Region Size  %age Used
           flash:      284272 B       512 KB     54.22%
           sram1:       13296 B         2 MB      0.63%
           sram2:          0 GB         2 MB      0.00%
CP: nuttx.hex
CP: nuttx.bin

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-25 00:55:50 +08:00
wangmingrong1
d007193eef armv8m/clang.cmake: add armv8m clang config
Its makefile is implemented in arch/arm/src/armv8-m/Toolchain.defs as follows:
ifeq ($(CONFIG_ARM_TOOLCHAIN_CLANG),y)

  ifeq ($(CONFIG_ARCH_CORTEXM23),y)
    TOOLCHAIN_CLANG_CONFIG = armv8m.main_soft_nofp
  else ifeq ($(CONFIG_ARCH_CORTEXM33),y)
    ifeq ($(CONFIG_ARCH_FPU),y)
      TOOLCHAIN_CLANG_CONFIG = armv8m.main_hard_fp
    else
      TOOLCHAIN_CLANG_CONFIG = armv8m.main_soft_nofp
    endif
  else ifeq ($(CONFIG_ARCH_CORTEXM35P),y)
    ifeq ($(CONFIG_ARCH_FPU),y)
      TOOLCHAIN_CLANG_CONFIG = armv8m.main_hard_fp
    else
      TOOLCHAIN_CLANG_CONFIG = armv8m.main_soft_nofp
    endif
  else ifeq ($(CONFIG_ARCH_CORTEXM55),y)
    ifeq ($(CONFIG_ARCH_FPU),y)
      TOOLCHAIN_CLANG_CONFIG = armv8.1m.main_hard_fp
    else
      TOOLCHAIN_CLANG_CONFIG = armv8.1m.main_soft_nofp_nomve
    endif
  else ifeq ($(CONFIG_ARCH_CORTEXM85),y)
    ifeq ($(CONFIG_ARCH_FPU),y)
      TOOLCHAIN_CLANG_CONFIG = armv8.1m.main_hard_fp
    else
      TOOLCHAIN_CLANG_CONFIG = armv8.1m.main_soft_nofp_nomve
    endif
  endif

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-24 18:41:11 +08:00
Michal Lenc
d8ed88c8a6 samv7: fix QSPI build
Commit 313d6df7 caused the following build error:

CC:  fixedmath/lib_b16atan2.c chip/sam_qspi.c: In function 'qspi_memory':
chip/sam_qspi.c:1552:7: warning: implicit declaration of function 'IS_ALIGNED' [-Wimplicit-function-declaration]
 1552 |       IS_ALIGNED((uintptr_t)meminfo->buffer, 4) &&
      |       ^~~~~~~~~~
In file included from chip/sam_qspi.c:41:
chip/sam_qspi.c: In function 'qspi_alloc':
chip/sam_qspi.c:1591:21: warning: implicit declaration of function 'ALIGN_UP' [-Wimplicit-function-declaration]
 1591 |   return kmm_malloc(ALIGN_UP(buflen, 4));

This was caused by missing include of nuttx.h header defining ALIGN_UP
and IS_ALIGNED.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-10-24 18:00:05 +08:00
cuiziwei
12fd5ec472 nuttx: Add LIBSUPCXX_TOOLCHAIN to link the prebuilt library provide by toolchain.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-24 01:38:03 +08:00
Jinliang Li
52995452e5 arm/build: suppress LOAD RWX linker warning
Add --no-warn-rwx-segments in case of RAM boot mode to linker to
suppress the below warning:
"nuttx has a LOAD segment with RWX permissions"

Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
2024-10-23 19:38:31 +08:00
qinwei1
9b0fc1277b arm: add memory map for DDR region
Summary
  add memory map for DDR region

fix arm-v7a/knsh boot dataabort on arm_addrenv_utils.c first time memset
after arm_pgvaddr.

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2024-10-22 13:33:39 +08:00
cuiziwei
8e95f6800b fix GCCVER cmake define.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-21 18:03:23 +02: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
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
Xiang Xiao
24cb8c25ab bluetooth: Fix the incompatibility made by https://github.com/apache/nuttx/pull/14224
that pr requires chip turn on CONFIG_DRIVERS_BLUETOOTH to use bluetooth,
but not all defconig enable this option, so let's map bt_driver_register
to bt_netdev_register in header file in this case, and revert the unnessary
change in the related chip and board folders.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-18 09:05:54 +08:00
buxiasen
bc019cb913 arm/lc823450: use custom vectors to make smp_call work with exception_common
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-17 22:57:14 +08:00
buxiasen
15804c340a arm/sam4cm: use custom vectors to make smp_call work with exception_common
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-17 22:57:14 +08:00
buxiasen
d410eedfde arm/rp2040: use custom vectors to make smp_call work with exception_common
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-17 22:57:14 +08:00
buxiasen
9a73b28973 arm/cxd56: use chip specific vectors to allow smpcall update regs
When sig dispatch do up_schedule_sigaction, need to make a new frame to
run arm_sigdeliver. But the exception_direct cannot handle xcp.regs as
we are using c-function exception handler.
Need to use exception_common to handle SMP call.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-17 22:57:14 +08:00
buxiasen
4e2b77cb04 arch/arm: add support for chip to replace the default vector table
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-17 22:57:14 +08:00
chengkai
31605b6335 bluetooth: call bt_driver_register common interface
Signed-off-by: chengkai <chengkai@xiaomi.com>
2024-10-17 18:09:32 +08:00
Petro Karashchenko
2048715134 serial: remove 'TIOCSLINID'
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-10-17 09:08:58 +08:00
Petro Karashchenko
919242d8b9 arch/arm/samv7: fix warnings in rswdt
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-10-17 09:08:01 +08:00
Petro Karashchenko
beda2abe3b arch/arm/samv7: fix preprocessor logic for ethernet
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-10-17 09:08:01 +08:00
Xiang Xiao
c6aed84638 tools: Rename apps-or-nuttx-Make.defs to Make.defs
follow the same pattern as other Make.defs files

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-17 07:55:02 +08:00
yangsong8
8c13b8df1d syslog: convert \n to \r\n in syslog framework layer
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-10-17 02:29:51 +08:00
anjiahao
15fa55f234 mps3-an547:let ap build with pic,and use bootloader boot it
Implement PIC loading in armv8-m qemu,
for example: load address-independent AP ELF in the bootloader,
and the text segment in AP ELF is XIP,
no need to apply for memory and modify it.

Two config:

bootloader abbreviation bl:
  use romfs to load ap elf, use the boot command to parse and jump to ap

application abbreviation ap:
  run os test

We need to compile ap first, then compile bl.

compile step:
  ./tools/configure.sh mps3-an547:ap
  make -j20
  mkdir -p pic
  cp boot pic/.
  genromfs -a 128 -f ../romfs.img -d pic
  make distclean -j20
  ./tools/configure.sh mps3-an547:bl
  make -j20

run qemu:
  qemu-system-arm -M mps3-an547 -m 2G -nographic -kernel nuttx.bin \
    -gdb tcp::1127 -device loader,file=../romfs.img,addr=0x60000000

  nsh> boot /etc/boot
  ap> ostest

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 18:40:06 +08:00
anjiahao
c11a2fa450 arm-m:let vectors address align
According to the ARM architecture manual,
the address of vectors need alignment

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 18:40:06 +08:00
anjiahao
b81b16ba97 arm7/8-m:support all nuttx iamge build with pic
Need to start up a new to setup special registers use
`arm_pic_setupxcp`.

Note that CONFIG_BUILD_PIC compiles the entire NuttX image
as position-independent(PIC), enable CONFIG_PIC to load PIC
application code.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 18:40:06 +08:00
anjiahao
112b6fd9a5 modlib:support modlib can load PIC elf
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 18:40:06 +08:00
fanjiangang
b6a4e91ef0 armv8-r/cp15: fix the problem of op1 operand confusion in ICC_SGI1R
Reference:

https://developer.arm.com/documentation/100026/0103/Generic-Interrupt-Controller/GIC-programmers-model/CPU-Interface-Registers

              CRn   Op1    CRm    Op2
    ICC_SGI0R  -     2     c12     -
    ICC_SGI1R  -     0     c12     -

Signed-off-by: fanjiangang <fanjiangang@lixiang.com>
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-16 17:17:30 +08:00
wangmingrong1
bf70cd2bce bug/fix: Makefile expression error caused
expr: syntax error: unexpected argument "12"
expr: syntax error: unexpected argument "12"

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-16 15:35:04 +08:00
Peter Bee
8f77e3cfc4 select ARM_HAVE_MVE and ARCH_HAVE_FPU for mps platform
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2024-10-16 13:55:30 +08:00
wangming9
d9558a3583 arm/armv7-r: Correctly use CONFIG_ARMV7R_ASSOCIATIVITY_16WAY
Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-16 12:27:10 +08:00
Gao Jiawei
d5c44de14c add missing source file
Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
2024-10-16 08:04:13 +08:00
Kyle Wilson
df47241a2b STM32G4 Flash Driver
Added a flash driver for the STM32G4 series. The primary change here is
the addition of stm32g4xxx_flash.c. This file uses the STM32L4 flash
driver as a template. The primary difference is the accounting for dual
banks with different page sizes.

Fixed error while building b-g474e-dpow1/buckboost. It was possible (technically) to have page be used uninitialzied. Changing the if statement to default to using a flash_page_size == 2048 fixes this issue.
2024-10-15 18:11:38 -03:00
cuiziwei
9d9857acd2 Change the judgment of GCCVER version to greater equal.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-15 23:32:13 +08:00
Tim Hardisty
bb7dce11a2 SAMA5 fix compiler warning in sam_adc.c 2024-10-15 11:37:54 -03:00
zhangyuan29
57650d841e armv8-m: set fpscr when do exception_direct
In armv8m the FPSCR[18:16] LTPSIZE field must be set to 0b100 for
"Tail predication not applied" as it's reset value.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-10-15 22:16:09 +08:00
anjiahao
ef9640c696 armv7-a:adjust gdb register order
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-15 21:46:41 +08:00
wangming9
5b14fb75bc arm/fpu: FPU is supported when the TEE is enabled
Summary:
1. Support armv7-a armv7-r armv8-r
2. The NSACR is read-only in Non-secure PL1 and PL2 modes.
3. The NSACR is read/write in Secure PL1 modes.
4. When the NSACR.{CP11,CP10} bit is set to 1,
   Non-secure access to coprocessor 11,10 enable

Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-15 21:11:15 +08:00
wangming9
f465443f37 cpuinfo: Decouple the fetch cpuinfo from up_perf_getfreq
Summary:
Add the default CPU frequency configuration.

Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-15 21:11:15 +08:00
wangming9
6ee747a1e6 arm/goldfish: add memory map for DDR region
Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-15 21:01:47 +08:00
hujun5
49b9aa0f33 arm/riscv: remove redundant judgment
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 15:32:40 +08:00
xuxin19
696e1a3f70 cmake(fix warning):toolchain do not have parent scope
toolchain file variable is global scope
dont need set parent scope

clear warning:
CMake Warning (dev) at /github/workspace/sources/nuttx/arch/arm/src/cmake/gcc.cmake:69 (set):
  Cannot set "GCCVER": current scope has no parent.
Call Stack (most recent call first):
  /github/workspace/sources/nuttx/arch/arm/src/cmake/Toolchain.cmake:56 (include)
  /github/workspace/sources/nuttx/build/CMakeFiles/3.26.0/CMakeSystem.cmake:6 (include)
  /github/workspace/sources/nuttx/build/CMakeFiles/CMakeScratch/TryCompile-ZJVOZO/CMakeLists.txt:5 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-15 12:38:14 +08:00
wanggang26
aef584a804 shm:fix build error
nuttx/arch/arm/src/armv7-a/arm_addrenv_shm.c:77:(.text.up_shmat+0x2e):
undefined reference to `shminfo'

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 11:40:34 +08:00
wanggang26
7e5fb8450f coredump: add architecture-specific registers dump, including NVIC and MPU
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 11:40:05 +08:00
hujun5
d77cb8af70 sched: fix nxsched_process_delivered did not call hook
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 01:50:06 +08:00
hujun5
10659a8bc2 irq: irq_attach_wqueue replace irq_attach_thread
reason:
using a shared same priority queue can reduce memory consumption.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 01:12:14 +08:00
wanggang26
3fad764804 arch/armv7:fix a typo
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-15 01:06:59 +08:00
cuiziwei
7246533aeb Unify the definition of GCCVER and remove duplicate code.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-13 11:41:22 +08:00
xuxin19
7def0983f6 cmake:sync arm sub arch CMake scripts missing sources
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-13 02:25:06 +08:00
yangguangcai
80f2890c17 systick:when isr_handle is NULL will be crash.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-13 00:32:55 +08:00
wangmingrong1
b12bf1ef33 arm/cmake: fix cmake compile error
1. The -c parameter should not be added during the link phase, otherwise the link will fail.
2. If it is the clang compiler, its toolchain library should use --print-file-name to find it, otherwise an error will occur

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-12 20:37:43 +08:00
Jinliang Li
36c63705db armv8-r/gicv3: disable 64bits access gic 64bits registers
When neon is enabled, compiler may optimize 64bits access to vstr, that
will cause data aborts.
Split 64bits access to double 32bits access for GIC_IROUTER/GICR_TYPER,
just like linux.

Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-12 18:11:00 +08:00
xuxingliang
38858b6cc3 arch: set current regs firstly in undefinedinsn
Need to save the regs firstly in case syslog triggers another crash.
Otherwise we may loose the register contents for the first exception.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-12 14:19:36 +08:00
fanjiangang
d8b042126e arch/arm: fix the bug of armv8-r macro GET_MPIDR
should be core not cpu

Signed-off-by: fanjiangang <fanjiangang@lixiang.com>
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-12 14:00:32 +08:00
fanjiangang
044ee68e80 arm/armv8-r: add implements of arm_get_mpid()
Signed-off-by: fanjiangang <fanjiangang@lixiang.com>
Signed-off-by: chao an <anchao@lixiang.com>
2024-10-12 14:00:32 +08:00
hujun5
1ff49872a7 arch: There is no need to use sched_[un]lock
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-12 13:28:23 +08:00
hujun5
ef8d8ee627 rtc: There is no need to use sched_[un]lock
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-12 13:28:23 +08:00
anjiahao
e5f9b42ea0 binfmt/libelf:Remove libelf implementation [2/2]
this commit is part two, all logic move to modlib, so we can remove it.
and change all use defconfig

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-12 12:29:06 +08:00
Tim Hardisty
3027be72c3 Update sam_udphs.c 2024-10-12 09:51:19 +08:00
fangxinyong
55d7708fa0 boards/arm/qemu: enable kernel build for armv7a
See Documentation/platforms/arm/qemu/boards/qemu-armv7a/README.txt for details

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-10-12 09:28:45 +08:00
yanghuatao
323ee075be nuttx/qemu: Fix funciton up_idle multiple definition
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-10-12 09:28:45 +08:00
ligd
994e15710f goldfish: sync with qemu do rpmsg_syslog init at goldfish
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-11 22:42:34 +08:00
Bowen Wang
a1f3800a9d arm_gicv2_dump: optimize gic dump
1. Add config CONFIG_ARMV7A_GICv2_DUMP to control gic dump,
because irqinfo introduce too much other log;
2. Change the log api from irqinfo() to syslog(), syslog not
append the function name in the log, so the gic dump format
will not be destoried.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 19:56:41 +08:00
lipengfei28
631b551727 goldfish add gicv2m support
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-11 17:06:16 +08:00
Bowen Wang
313d6df787 include/nuttx.h: replace all the align macros to nuttx version
1. add IS_ALIGNED()  definitions for NuttX;
2. replace all the ALIGN_UP() and ALIGN_DOWN() to use common
   align implementation;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 16:55:43 +08:00
yinshengkai
211a56910a syslog: support syslog redirection to sched_note
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-11 01:30:11 +08:00
wangmingrong1
ec3c27df0d makefile/clang: Compare versions for upward compatibility
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-11 00:45:39 +08:00
yinshengkai
02eb280302 arch/perf: modify the return value of up_perf_gettime to clock_t
When using alarm_arch implementation, 64-bit time can be returned. Using unsign long will cause precision loss.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-10 23:17:14 +08:00
yinshengkai
eb8449cb0c sched/gprof: add gprof support
gprof can analyze code hot spots based on scheduled sampling.
After adding the "-pg" parameter when compiling, you can view the code call graph.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-10 18:46:51 +08:00
hujun5
e249dd2672 arch: support customized up_cpu_index() in AMP mode
Some app with same code runs on different cores in AMP mode,
need the physical core on which the function is called.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-10-10 02:38:40 +08:00
ligd
ff99745b22 arm-m: support zero interrupt back to game
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-10 01:01:17 +08:00