Commit Graph

37113 Commits

Author SHA1 Message Date
Joel Sherrill
a30ecc39cd arm/lpc32xx/include/bsp/lpc32xx.h: Add unused element in structure
This header file defines multiple empty structures which are
reported as errors by the test spstdc17 using GCC 15.  Added an element
named "unused" to each structure. The macro LPC32XX_FILL() was
checked to ensure it handles the modified structure correctly.

Closes #5295.
2025-07-07 10:38:17 -05:00
Sebastian Huber
93958bde18 libtests/malloc*: Disable compiler builtins
GCC 15 performs some optimizations based on compiler builtins which
break the tests.  Use -fno-builtin to disable the optimizations.
2025-07-06 22:54:22 -04:00
Sebastian Huber
eb4f544689 malloctest: Fix issue with use after free
Do not call realloc() with a previously freed pointer.  Perform a
successful reallocation.
2025-07-06 22:54:22 -04:00
Sebastian Huber
7215a3051a malloc04: Fix for BSPs with multiple memory areas
Some BSPs provide multiple memory areas.  Make them empty.
2025-07-06 22:54:22 -04:00
Joel Sherrill
b65e36e2f4 generic_or1k/clock/clockdrv.c: Add cast on ISR installation
Add cast on clock ISR handler.
2025-07-04 13:17:34 -05:00
Joel Sherrill
d53db6e8b2 spec/build/bsps/arm/lm3s69xx/tstlm3s3749.yml: Add tests that are too big
mdosfsfsrename, mdosfsfsrenameexisting, mdosfsfsrenamelongname,
mdosfsfsrenamemaxlinks, and mdosfsfsrmdirparent are recently
added tests.
2025-07-04 14:07:55 -04:00
Sunil-Hegde
a899cdd57d bsps/sparc: Remove set_vector() usage and implementation
Removed all uses and implementations of set_vector() function across ERC32,
LEON2, and LEON3 BSPs. Replaced with rtems_interrupt_handler_install() and
rtems_interrupt_entry_install().

- Added ERC32_Clear_and_unmask_interrupt() and LEON_Clear_and_unmask_interrupt()
  for unmasking logic previously in set_vector().
- Deleted set_vector() definitions and implementations in each BSP.
- Updated related obj.yml files.
- Replaced set_vector() with rtems_interrupt_catch() in shared/gnatcommon.c.
2025-07-04 09:52:35 +05:30
Joel Sherrill
3e1a73d634 spec/build/bsps/arm/lpc24xx/tstlpc23xx.yml: Add tests that are too big
mdosfsfsrename, mdosfsfsrenameexisting, mdosfsfsrenamelongname,
mdosfsfsrenamemaxlinks, and mdosfsfsrmdirparent are recently
added tests.
2025-07-03 21:28:45 -04:00
Joel Sherrill
0f505c2b2b spec/*/bsps/aarch64/*ilp32*: Add -Wno-deprecated
Without -Wno-deprecated, every file compiled gives a warning
for the ilp32 being deprecated.
2025-07-03 18:40:06 -05:00
Kinsey Moore
18982404db bsps: Remove stale test configurations
Files ending in .tcfg are old tester configurations that are no longer
relevant since this configuration has been migrated to spec/../tst*.yml.
2025-07-03 18:21:50 -04:00
Joel Sherrill
b66436e1d9 cpukit/acinclude.m4: Removed
A remnant of the autoconf/automake build system. Remove.
2025-07-03 15:03:11 -05:00
Joel Sherrill
925405f3ad spec/build/cpukit/optsmp.yml: Update list of SMP BSPs
The list formerly included the erc32 and pc386 varants which do not
support multi-core. Added the pc386 variants which include the
support necessary for multi-core.
2025-07-03 09:32:14 -05:00
Christian Mauderer
b629e6afbc bsps/stm32u5: Keep clock if running from OSPI
If the clock is changed during boot, the memory becomes inaccessible and
the system can't continue to run from OSPI.
2025-07-02 23:41:01 -04:00
Matt Joyce
d735d4459c bsps/stm32u5-grisp-nano: New BSP
This BSP supports a custom STM32U5 based board. It uses a similar
structure like the existing STM32H7 BSP and therefore should be well
adaptable to other boards.

Co-authored-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
2025-07-02 23:41:01 -04:00
Matt Joyce
03aedc0539 stm32u5/bsp: Modify HAL and LL Drivers for RTEMS
Modify HAL and LL Drivers to work with RTEMS initialization.

Co-authored-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
2025-07-02 23:41:01 -04:00
Matt Joyce
0d2a001764 stm32u5/bsp: Import HAL and LL Drivers
This imports new files from the STM32U5xx HAL support library
version 1.5.0. It is available as a git repository at:

https://github.com/STMicroelectronics/stm32u5xx-hal-driver
2025-07-02 23:41:01 -04:00
Matt Joyce
af4fd0b70b rtems/score/armv7m.h: Edit NVIC struct definition.
Adjust ARMV7M_NVIC structure definition to account for changes
introduced to ARMV8M NVIC.
2025-07-02 23:41:01 -04:00
Matt Joyce
104aea035d cpukit/arm.h: Add ARMV8_M Definitions
Some fixes where necessary to not handle ARMv8M identical to (for
example) ARMv8A. ARMv8M is more similar to ARMv7M.

Co-authored-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
2025-07-02 23:41:01 -04:00
Matt Joyce
f095049c7c bsps/arm/include: Add include to core_cm33.h CMSIS
Include armv7m_cachel1.h in core_cm33.h file to allow access to
cache functions.

Co-authored-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
2025-07-02 23:41:01 -04:00
Matt Joyce
8f56c7a2d4 bsps/arm/include: Silence warning in CMSIS file
Avoid a warning about missing void.

Co-authored-by: Christian Mauderer <christian.mauderer@embedded-brains.de>
2025-07-02 23:41:01 -04:00
Matt Joyce
d6de06569f bsps/arm/include: Add CMSIS files for ARMV8M
Files are imported from https://github.com/ARM-software/CMSIS_5 revision
55b19837f5703e418ca37894d5745b1dc05e4c91

Like already checked in RTEMS commit
6b2318acef, the project still don't have a
NOTICE file.
2025-07-02 23:41:01 -04:00
Matteo Concas
19f12d2dca cpu/riscv: Add Smdbltrp extension compatibility
If the Double Trap Extension is implemented, the
MDT bit of the mstatus (or mstatush in RV32)
register will be set when a trap is to be taken.

The MIE (Machine Interrupt Enable) bit can only
be set to 1 if the MDT bit is zero.

Thus, we need to clear MDT first if we want to
enable interrupts when dispatching a thread.

MDT is also cleared in register a1 before
restoring the interrupt frame as writing 1 to MDT
will cause MIE to be set to 0. In RV64 this
happens regardless of the value written to MIE in
the same write.

In RV32, MDT is in the mstatush so we do not need
to clear during restore as this register is not
restored.

With this change all 60 SMP tests pass (compared
to 20/60 before the fix). The tests have been run
on hardware using two RV64 CPUs that implement
the double trap extension.

Update #5274
2025-07-01 16:53:36 -05:00
Sepehr Ganji
20850e7e73 libfs/fatfs: Add rtems-README file
The rtems-README file contains the process for
importing the source, and the hash and changelog
of the current version.
2025-07-01 12:00:56 -06:00
Sepehr Ganji
328189f15f libfs/fatfs: Import FatFS
This adds the FatFS source code version R0.15b (Jun 21, 2025) to libfs.
The code is imported from https://elm-chan.org/fsw/ff/archives.html.
2025-07-01 12:00:56 -06:00
Bhavya Shah
e618b20215 imfs/imfs_statvfs: Added the statvfs functionality to IMFS module
- Modified the psximfs01 test to validate the functionality
- Modified the IMFS_fs_info_t keeping the jnode counter
- Added imfs_statvfs.c which sets the statvfs struct fields for imfs
2025-07-01 09:16:31 -05:00
Kinsey Moore
21b5d7c4e8 cpukit/atomic: Deprecate ATOMIC_VAR_INIT
ATOMIC_VAR_INIT has been deprecated in GCC 15. This updates the usage to
be equivalent to the pre-deprecation implementation.

Closes #5285
2025-07-01 02:35:07 +00:00
Jeremy Lorelli
9cfe726b0d bsps/beatnik: Use standard C99 designated initializers 2025-06-30 16:25:03 -05:00
Jeremy Lorelli
4b05acde6f bsps/mvme3100: Use standard C99 designated initializers 2025-06-30 16:25:03 -05:00
Jeremy Lorelli
2483cf035b bsps/i386: Fix incorrect size specifier on instruction
This was causing an assembler warning.
2025-06-30 09:43:07 -07:00
Kinsey Moore
c26259ee2e bsps/shared/serial/pl011: Avoid unnecessary reads
Avoid reading from the pl011 data register unnecessarily. There is no
need to preserve the contents of this register as it is not normal
memory. This unnecessary read causes console spam when running under the
Xen hypervisor when the read FIFO is empty since the read is not
expected.
2025-06-26 23:29:24 +00:00
Matteo Concas
5e0a68d3ab bsps/noelv: Fix using console in polled mode
Before, the console driver needed
`BSP_CONSOLE_USE_INTERRUPTS` to be defined or it
would not build. The intent was to use polled
mode if the macro was equal to zero.

This change makes it so interrupt mode is used if
the macro is defined and polled mode is used if
the macro is not defined.
2025-06-26 02:40:05 +00:00
huangshuhua
af8c087fb0 cpukit/aio_misc:Add error handling for calloc failure 2025-06-26 02:37:47 +00:00
Matteo Concas
ae361faeba bsps/sparc/leon3: Fix GPTIMER timer index logic
The old logic would lead to an error when
multiprocessing was enabled and
`LEON3_GPTIMER_BASE` was defined due to
`leon3_timer_core_index` being undefined.

The new logic fixes this and keeps the same
intent:
 - If multiprocessing is not enabled, the timer
   index is 0
 - If multiprocessing is enabled and
   `LEON3_GPTIMER_BASE` is defined, the timer
   index is twice the CPU boot index
 - If multiprocessing is enabled and
   `LEON3_GPTIMER_BASE` is not defined, we
   fallback to the old logic using the GPTIMER
   core index.

Close #5258
2025-06-26 02:32:39 +00:00
Chris Johns
df1d85c0f8 cpukit/libio: Support close with IOP references held
- Provide an option for a file system to support close wtih
  references held. This can happen in more complex file systems
  and file descriptor handling with more complete reference
  handling implementations where an fd can hold other fds and
  close can be call on any fd and succeed.

- Fix open IOP leaks in the error paths.

- Provide better definition of the IOP flags to help clarify
  the code.

Fixes #5201
2025-06-26 00:53:51 +00:00
ShaunakKDatar
fb1d9c8aca bsp/aarch64/raspberrypi: Add I2C Support
- Implements polling-based I2C communication.
- Supports three independent I2C master controllers.
- Adds support for 10-bit addressing mode.
2025-06-25 23:42:14 +05:30
Aaron Nyholm
b00a9d9993 bsp/include/jffs2_flashdev: Added CPP guards
Closes #5280
2025-06-25 04:08:55 +00:00
Joel Sherrill
1b4f88baa3 mips/rbtx4938/include/bsp/irq.h: Fix redefinition of TX4938_IRQ_ACLCPMC
See the issue for a discussion and a link to CPU manual.

Closes #5278.
2025-06-24 20:34:37 +00:00
Joel Sherrill
fc0542fa7a bsps/powerpc/*/include/bsp.h: Remove stray semi-colon
The gen5200, gen83xx, and tqm8xx BSP families have multiple variants
which produced the same stray semi-colon warning from GCC 15 for
using LINKER_SYMBOLS() with a semi-colon at the end of the line.

Closes #5277.
2025-06-24 20:25:08 +00:00
Joel Sherrill
8937b04a70 testsuites/sptests/sp06/task2.c: Eliminate old-style prototypes
GCC 15 is noisy about these. They have been deprecated since C90
but still lurk.

Updates #5275
2025-06-24 20:23:34 +00:00
Joel Sherrill
6b0d16f7dd testsuites/benchmarks/dhrystone/*: Eliminate old-style prototypes
GCC 15 is noisy about these. They have been deprecated since C90
but still lurk.

Updates #5275
2025-06-24 20:23:34 +00:00
Joel Sherrill
28cef0e987 bsps/.../motorola_powerpc/bootloader/zlib.c: Fix old-style prototypes
This zlib source is a hacked down version just for the decompression
phase for the bootloader used by this family of BSPs. The proper
fix is to redo the hackery with a new version of zlib. But that
is risky so this is just addressing the warnings.

Updates #5276
2025-06-24 20:22:26 +00:00
Shaunak Datar
d4755476bc bsp/aarch64/raspberrypi4: Add PWM peripheral support
This commit adds support for the PWM peripheral on the aarch64/raspberrypi BSP.
2025-06-20 20:53:28 +05:30
Joel Sherrill
0ab6c7bc58 zlib/: Update to 1.3.1
This is necessary to compile cleanly with GCC 15 which discourages
use of old-style prototypes.

Closes #5263
2025-06-19 23:57:32 +00:00
Joel Sherrill
6876262a44 bsps/mips/hurricane/clock/ckinit.c: Address type mismatch
GCC 14 generates an error for the wrong signature function being
passed in. The underlying type was a void * so adjusting the
signature of the ISR handler was not an option. Added cast.

Closes #5272
2025-06-19 23:37:39 +00:00
Joel Sherrill
734208a49b bsp/shared/atomics: New directory
Provide missing GCC atomics helpers as part of BSPs where GCC
does not know how to provide it since the CPU's ISA has no
atomic instructions. The implementation provided in
bsps/shared/atomics/__atomic_test_and_set.c should work
on any single core CPU.

The BSPs that need thie function tend to have older cores. This
is the list of BSPs:

arm - csb336, csb337, csb637, edb7312, gumstix, kit637_v6, lpc24xx_ea,
  lpc24xx_ncs_ram, lpc24xx_ncs_rom_ext, lpc24xx_ncs_rom_int,
  lpc24xx_plx800_ram, lpc24xx_plx800_rom_int, lpc32xx_mzx,
  lpc32xx_mzx_stage_1, lpc32xx_mzx_stage_2, lpc32xx_phycore,
  rtl22xx, rtl22xx_t, smdk2410
m68k - av5282, mcf5329
mips - jmr3904
moxie - moxiesim
nios2 - nios2_iss
riscv - grv32i, grv32im, niosvc10lp, noel32im, rv32i, rv32im,
sparc - ut699
2025-06-19 23:30:57 +00:00
Joel Sherrill
4106647891 bsps/arm/*: Add linker args to specify __sync_synchronize variant
GCCC 14 introduced a linking warning about not knowing which
__sync_synchronize implementation to use. The BSPs impacted
are updated in this commit. The suggested correction is to
use -specs to pick up a GCC specific specs file which changes
__sync_synchronize to the desired implementation
__sync_synchronize_MECHANISM. Using this solution ties
the code to GCC 14+ since the spec files are not in GCC 13.
This solution maps __sync_synchronize to a RTEMS specific
__sync_synchronize implementation which avoids using of a
GCC extension and requiring GCC 14+,

Closes #5268
2025-06-19 22:58:18 +00:00
Shaunak Datar
1c9e91d25b bsp/aarch64/raspberrypi: Fix the formatting for raspberrypi.h
Change the formatting of the include/bsp/raspberrypi.h file to comply
with the RTEMS formatting guideline. No functional changes are made.
2025-06-19 22:47:57 +00:00
Kinsey Moore
a0957ef636 cpukit/libdebugger: Prevent hang on memory access
When memory is accessed by the remote debugging client, the access is
sandboxed with setjmp/longjmp and appropriate exception handlers to
prevent the attempted access from causing a failure of the debugger or
otherwise altering execution. The existing implementation works as
expected when the context executing the memory access and the exception
context resulting from a failed access do not share a stack.

In the case of AArch64, a failed access when the debugger is already in
exception context causes a re-entry into exception context where the
machine state is pushed onto the same stack that was in use where the
exception occurred. When setjmp is called inside a stack frame and the
exception occurs outside that stack frame, the stack frame is unwound
before the exception occurs and the exception entry overwrites the area
previously occupied by the stack frame housing the setjmp and corrupting
the link register that is stored there. After restoration of state using
longjmp(), this corrupted link register information is loaded from the
stack frame and undesired behavior occurs.

In the instance of this bug that was encountered, the corrupted link
register contained an unaligned pointer which caused an unending cascade
of prefetch abort exceptions presenting as a hard hang.
2025-06-18 13:37:53 -05:00
Joel Sherrill
7eb39e3e8d bsps/powerpc/*/include/tm27.h: Use formatter suggestions
Applied suggested formatting changes to the following files which
were modified for technical reasons in the previous commit.

    bsps/powerpc/gen5200/include/tm27.h
    bsps/powerpc/mvme5500/include/tm27.h
    bsps/powerpc/psim/include/tm27.h
2025-06-11 14:19:06 -05:00
Joel Sherrill
0f99dd5d25 bsps/powerpc/*/include/tm27.h: Correct IRQ installation structure
The gen5200, mvme5500, and psim BSP families had an implementation of
tm27.h which used stub functions with casts as null handlers to fill
in the IRQ structure. The IRQ structure as also missing a field. The
change was to use a set of appropriately signatured stub functions
and correct the structure initialization.

This code likely has produced warnings for a long time but with
GCC 14, these warnings turned into errors.

Closes #5266
2025-06-11 13:11:27 -05:00