Commit graph

23571 commits

Author SHA1 Message Date
simbit18
047a40917c Cmake: Implement CMake build of Tiva arch
added TI/Stellaris Tiva

CMake added tm4c1294-launchpad and tm4c123g-launchpad board

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-04-19 08:53:18 -03:00
Filipe Cavalcanti
b8e9bc3313 arch/xtensa: fix build errors related to data types on ESP32|S2|S3
Fix format specifier macros after compiler type changes.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-18 09:32:58 +08:00
Filipe Cavalcanti
0715c584b7 arch/xtensa: use compiler's definition of uint32 and int32
Modify types.h and inttypes.h to use the correct _int32_t and _uint32_t types.
Type is now defined according to recent compiler versions.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-18 09:32:58 +08:00
Tiago Medicci Serrano
c566cf51a2 risc-v/esp32c3: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
2bbafcacc1 xtensa/esp32s3: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
31b6cdac6d xtensa/esp32s2: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
7a3e67d59a xtensa/esp32: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Filipe Cavalcanti
55fbf93c9c arch/risc-v: ADC support for ESP32-C3|C6|H2
Add common source for ADC that supports ESP32-C3|C6|H2.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-17 13:56:40 +08:00
Filipe Cavalcanti
99099a1a9d arch/xtensa: ADC support on ESP32|S2|S3
Add common ADC source for ESP32|S2|S3.
Remove legacy ADC from ESP32S3.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-17 13:56:40 +08:00
Carlos Sanchez
d976c66edf net: use bps units for bitrate in SocketCAN interfaces.
This makes units compatible with what Linux uses for SocketCAN bitrate
and allows representing usual Single Wire Can (SAE J2411) usual bitrates
of 33333 and 83333 bps.

Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
2025-04-16 11:07:27 -03:00
simbit18
7af6b8c63d arch/arm/src/armv6-m/CMakeLists.txt: fix undefined reference to `up_show_cpuinfo'
Aligned Cmakefile with Make.defs PR #10132

fix

FAILED: nuttx
C:\WINDOWS\system32\cmd.exe /C "cd . && D:\nx20250410\tools\gcc-arm-none-eabi\bin\arm-none-eabi-gcc.exe  --specs=nosys.specs   -Wl,--print-memory-usage -Wl,--entry=__start -nostdlib -Wl,--gc-sections -Wl,--cref -Wl,-Map=nuttx.map @CMakeFiles\nuttx.rsp -o nuttx && cd ."
D:/nx20250410/tools/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: fs/libfs.a(fs_procfscpuinfo.c.obj): in function `cpuinfo_read':
D:/rp2040/nuttx/fs/procfs/fs_procfscpuinfo.c:160:(.text.cpuinfo_read+0xa): undefined reference to `up_show_cpuinfo'

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-04-16 21:25:55 +08:00
Tiago Medicci Serrano
0cec2bd662 arch/risc-v/espressif: Bump common source version
This commit bumps common source version for RISC-V-based Espressif
SoCs on NuttX. Specifically, this solves an issue regarding SPI
flash frequency selection on ESP32-C6.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-16 21:25:38 +08:00
Tyler Bennett
1f53575192 arch/arm/stm32h5: GPDMA Hardware files
Add the hardware register definition file for the GPDMA peripheral.
This is necessary to support implementing dma driver in the future.

Also adds skeleton arch dma header that includes the hardware file.

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
2025-04-16 21:16:24 +08:00
Carlos Sanchez
8f1d670a83 arch/arm/src/stm32h7: unassigned ret variable in SIOCSCANBITRATE.
This problem was introduced in https://github.com/apache/nuttx/pull/16199

Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
2025-04-16 18:11:33 +08:00
Tyler Bennett
1b08c1d522 arch/arm/stm32h5: organize peripheral Kconfig selection
Added menus for usart, I2C, and SPI selection to make the peripheral selection submenu easier to navigate.

Added DMA1 and DMA2 selection options.

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
2025-04-16 10:08:45 +08:00
anjiahao
28ad852a6c arch/xtensa:add crt0 to initialize environment
we use crt0 inside of start hook in pr https://github.com/apache/nuttx/pull/16154, so xtensa also need add it.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-04-16 01:24:57 +08:00
Mathieu David
7281d91fbc Support ethernet without MDIO & MDC lines 2025-04-16 01:22:24 +08:00
Serg Podtynnyi
8ac09bcf3d arch/arm/rp23xx: Fix IRQ prioritize
Fixes the reg addresses that were copied from armv6 rp2040 to the actual
armv8 spec

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-04-16 01:19:43 +08:00
Serg Podtynnyi
5ddc67b129 arch/arm/rp23xx: Fix PWM registers access
Fix offset alignment and correct the PWM enable register name

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-04-15 17:02:37 +08:00
Julian Oes
96fef53ee9 stm32h7: enable Ethernet for STM32H7X7XX 2025-04-15 15:14:09 +08:00
Joshua Lange
9643ee78aa arch/arm/stm32h5: Fix i2c compiler warnings.
Add missing break statements to i2c driver to avoid complaints from compiler.

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
2025-04-15 10:56:23 +08:00
Joshua Lange
1c4ac3dfe7 arch/arm/stm32h5: copy bss and initialized data before configuring any hardware
Some hardware configurations require bss and data initialization before being called.

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>

Fix nxstyle errors
2025-04-15 10:56:01 +08:00
Joshua Lange
3d848810b7 arch/arm/stm32h5: Add USART6 serial driver config.
Adds Kconfig options to select UART6 for the STM32H5, and updates the architecture files accordingly.

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
2025-04-15 10:55:30 +08:00
Joshua Lange
78f35c836c arch/arm/stm32h5: Fix ADC internal channel configuration.
Properly configure internal channels on STM32H5 ADC when selected

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
2025-04-15 10:54:33 +08:00
Carlos Sanchez
dd53c34722 net/netdev: Change SIOCSCANBITRATE to require interface down.
Previously, SIOCSCANBITRATE brought the iterface up to ensure changes
where immediately applied. This was confusing, see
https://lists.apache.org/thread/g8d0m6yp7noywhroby5br4hxt3r4og2c
Now SIOCSCANBITRATE fails is interface is up.
All existing SocketCAN drivers updated.

Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
2025-04-15 01:59:57 +08:00
stbenn
3abdec8af1 arch/arm/stm32h5: implement flash driver for progmem
H5 implementation of functions defined in include/nuttx/progmem.h.
The driver supports a subset of the flash peripheral functions.
  - Assumes non-secure memory accesses. Does not check for memory protection mechanisms.

References implementation in arch/arm/src/stm32h7/stm32h743xx_flash.c
2025-04-11 11:20:19 -03:00
simbit18
97155ae09d [nxstyle] fix Relative files path
fix Relative file path does not match actual file.
2025-04-11 20:59:33 +08:00
Tiago Medicci Serrano
d7dabc90f6 arch/risc-v/espressif: Disable esptool's stubs for ESP32-C3
This commit disables the esptool's stubs when flashing ESP32-C3
(`CONFIG_ESPRESSIF_ESPTOOLPY_NO_STUB=y`) if the serial/JTAG console
is enabled (`CONFIG_ESPRESSIF_USBSERIAL=y`).

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-11 16:20:13 +08:00
Tiago Medicci Serrano
d69f349787 arch/risc-v/espressif: Fix bug with usbconsole and DEBUG_FEATURES
This commit fixes a bug on the `usbconsole` defconfigs for
Espressif's RISC-V SoCs when the serial/JTAG is used and the
Kconfig macro `DEBUG_FEATURES` is enabled. This config enables the
`showprogress` macro during start-up. Previously, `riscv_lowputc`
function was used by this macro, but it is not suitable for the
serial/JTAG console. Instead, use the `esp_rom_printf` function
that is suitable for both serial/JTAG and UART consoles.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-11 16:20:13 +08:00
Jukka Laitinen
1645f4ac10 arch/mpfs/usb: Align usb_ctrlreq_s properly to 32-bit boundary
The alignment of the ctrlreq was correct by luck, and was broken
when the spinlock was added to the structure. In non-smp configurations
spinlock_t is currently 8-bits, causing wrong alignment of the
ctrlreq structure.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-04-11 16:19:37 +08:00
stbenn
1e8977c079 arch/arm/stm32h5: DTS Hardware Files
Add hardware register definitions for the digital temperature sensor (DTS) peripheral on the STM32H5.
2025-04-11 15:58:20 +08:00
chao an
52482219c8 libc/elf: rename modlib to libelf
Renaming "modlib" to "libelf" is more in line with the implementation content,
which makes it easier for individual developers to understand the capabilities of this module.

CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-04-11 09:43:22 +08:00
Ville Juven
6707715916 arch/risc-v: PANIC() on system call crash
If a process causes a fatal error when it's running a system call, the
whole system should crash as the crash originated from the kernel.

Do this by running the PANIC() branch, if task is in syscall.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-04-10 22:36:02 +08:00
zhangshoukui
69597ec486 arch/sim: Add i2s setup and shutdown interface
This interface is required if you want to open an i2c node directly on the sim
https://github.com/apache/nuttx/pull/12848/commits/12b4340b009d55f30508b1ebb1da1c4faec674a7

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-04-10 18:10:54 +08:00
anjiahao
c9a150781c arch/arm64: remove unrecognized command-line option
aarch64-none-elf-gcc: error: unrecognized command-line option '-mlong-calls'

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-04-09 23:07:29 +08:00
anjiahao
3411e5c6db arm:elf module need long call aviod jump addr over length
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-04-09 23:07:29 +08:00
anjiahao
422c43949a binfmt:use crt0 inside of starthook
test:
1.use mps3-an547 build helloxx as module and run it
2.use qemu-armv7a:knsh test kernel build helloxx and run it

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-04-09 23:07:29 +08:00
anjiahao
297a1cb1fe armv7a:need initialize constructor and destructor on crt0
The C++ constructor and destructor need to be executed in crt0

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-04-09 23:07:29 +08:00
Tiago Medicci Serrano
05e63e31c4 arch/xtensa/espressif: Fix ESP32-S2 SPI flash frequency selection
This commit fixes the SPI flash frequency selection for ESP32-S2,
enabling the Kconfig macros to be selected when ESP32-S2 SoC is
enabled. Please note that this was recently changed to make it
compatible with already existing SPI flash Kconfig macros for ESP32
and ESP32-S3 and it introduced this regression for ESP32-S2.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-09 14:00:08 +08:00
Eren Terzioglu
8a835dd545 arch/xtensa: Remove legacy I2S implementation for esp32[-|-s2|s3]
Remove legacy I2S implementation without breaking defconfigs for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-04-08 22:53:58 +08:00
Eren Terzioglu
97ff8906e4 arch/esp[s2|s3]: Update common layer version
Update common layer version of Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-04-08 22:53:58 +08:00
Eren Terzioglu
873a6319bb arch/esp32[s2|s3]: Add common I2S arch layer support
Add common I2S arch layer support for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-04-08 22:53:58 +08:00
Eren Terzioglu
fd4914b953 arch/xtensa/esp32[s3]: Add more dma functions
Add dma function to use peripheral more efficiently

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-04-08 22:53:58 +08:00
chenxiaoyi
b3567fe964 xtensa/esp32s2: enable sysclk and deassert reset signal for uart1
The uart1 is found be in reset state, and the sysclk is not enabled
for it.

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2025-04-08 22:44:59 +08:00
Tiago Medicci Serrano
622355b5c3 arch/xtensa/esp32s3: Fix bug regarding SPI flash operation mode
SPI flash operation modes - Dual Output (dout), Dual I/O (dio),
Quad Output (qout), Quad I/O (qio) and Octal (opi) were not being
properly selected. This commit fixes this behavior and the device
is now able to boot and initialize the proper SPI flash mode.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-08 14:44:38 +08:00
raiden00pl
5d66f2c973 arch/stm32f0l0g0: add support for IWDG and WWDG
add IWDG and WWDG support for stm32f0l0g0.

ported from arch/stm32.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-04-07 23:28:47 +08:00
liujp
32c5667d5d Optimize double buffering implementation
optimize the implemented dual buffer support to avoid compilation errors on other development boards.

Signed-off-by: liujp <liujp@xiaomi.com>
2025-04-07 16:28:30 +08:00
liujp
e421e2c9e5 arch/arm/stm32h7: add support for STM32H750B
modify the compilation configuration of stm32h7, add compilation options for stm32h750.

Signed-off-by: liujp <liujp@xiaomi.com>
2025-04-07 16:28:30 +08:00
Kye Morton
a8b862396e arch/arm: Add CMakeLists for the stm32l4 architecture.
boards/arm: Add CMakeLists for the nucleo-l476rg.

Adds CMakeLists files for the STM32L4 architectures
and one of the development boards. Files are adapted
from the similar STM32F7 boards, but built to reflect
the existing Make.defs.

Signed-off-by: Kye Morton <pryre.dev@outlook.com>
2025-04-07 12:10:40 +08:00
raiden00pl
57d1dee7e1 arch/arm: add stm32c0 support
add stm32c0 support

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-04-05 11:23:40 -03:00