Adds an interrupt-driven SPI bus driver for the STM32F4 SPI
peripheral implementing the RTEMS spi_bus API (dev/spi/spi.h).
The STM32F4 SPI has no hardware FIFO - the data register holds
a single byte - so the driver handles one byte per TXE/RXNE
interrupt pair. This is a hardware constraint, not an
implementation choice. DMA support can be added in a future
version.
Supports 8-bit full-duplex master mode, SPI modes 0-3 (all
CPOL/CPHA combinations), MSB/LSB-first, and automatic baud-rate
prescaler selection. Chip select is left to the application
via GPIO.
New files:
- stm32f4xxxx_spi.h: register definitions (RM0090 section 28.5)
- stm32f4-spi.h: public driver interface
- spi.c: driver implementation
stm32f4.h updated with STM32F4_SPI1/2/3 peripheral accessors.
SPI base addresses per RM0090 table 1: SPI1 on APB2 at
0x40013000, SPI2 and SPI3 on APB1 at 0x40003800 and 0x40003C00.
Verified to compile cleanly for arm/stm32f4 and
arm/realview_pbx_a9_qemu with GCC 15.2.0.
Tests using the bld.cc() and bld.cxx() rules do not profit from the
automatic compiler dependency generation provided by the gccdeps.py waf
plugin.
Add "cpukit/include/rtems/score/cpuopts.h" as a hard-coded dependency to
these tests to account for configuration changes. This fixes linker
errors, for example if the configuration changed the RTEMS_SMP option.
Close#5482.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Move the upstream FatFs sources from cpukit/libfs/src/fatfs to
contrib/fatfs.Keep the RTEMS integration layer (rtems-fatfs-*.c and
rtems-diskio.c) in libfs. Introduce a wrapper header under rtems/fatfs
and update internal sources to use it.
Update the build specification to reference the new location without
introducing global include paths.
Fixes#5433
The previous addition of s-mode support avoided touching the PLIC
registers and only allowed limited use of software interrupts for SMP
IPIs. This enables the PLIC in s-mode mapping the registers with the MMU
and unifying some aspects of the m-mode and s-mode implementations.
Updates #3337
- Changed the interrupt attributes so extended vectors
report can_raise as false.
- Changed the bsp_interrupt_raise to return
RTEMS_UNSATISFIED for extended vectors 16-31.
- BSP-specific validation for gr712rc and gr740
were added to exercised the extended vectors, and
check that the right interrupt handler is called.
Updates #4846.
Include contrib/riscv-opcodes/encoding.h from riscv-utility.h and
remove outdated contents from riscv-utility.h
This will allow the include guards to work properly for users (or HAL code)
that also use the encoding.h file, while still allowing us to provide
additional customization or extension of encoding.h macros.
This commit adds support for a stand alone SJA1000 CAN controller. This
is classical CAN only capable controller, so no FD support here. The
driver's implementation is similar to CTU CAN FD, thus interrupt handler
triggers a semaphore in main worker thread that takes care of handling
interrupts and receiving and sending messages.
The controller utilizes its one TX buffer for sending messages with
abort function available if higher priority message is present in
the software queue.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Co-authored-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
This adds a BSP for the ESP32-C3 with external flash. This BSP can use
the USB serial interface or UART0 as the debug console and supports
interrups along with the SYSTIMER clock source.
This adds a callback early in the RISC-V startup process that allows a
BSP to copy linker sections in situations where they may not be
automatically mapped.
The content may end up in documentation sources, for this CC-BY-SA-4.0
is required.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This build places all code and data into the on-chip
internal SRAM. Even though this limits the application
size and has not much use for final applications
deployment, this configuration is important during
development because the guaranteed Flash write/erase
cycle count is limited to 1000 if a 15-year data retention
guarantee is required.
The load to SRAM is much faster as well.
Signed-off-by: Pavel Pisa <ppisa@pikron.com>
Query the GCC build key and check it against the required value.
There are dependencies between the RTEMS sources and external interfaces
provided by Newlib and GCC. For example, POSIX API interfaces may
change due to POSIX standard updates. The GCC build key is used to
provide an indication that the present tools meet the requirements of
the RTEMS sources.
Add the GCC_BUILD_KEY_POLICY build option to define the checking policy.
The GCC build key policy defines how the build key of the present
compiler is checked against the required build key. While the policy is
"ERROR", if the GCC build key has not the expected value, then the build
configuration process produces a fatal error. While the policy is
"WARNING", if the GCC build key has not the expected value, then the
build configuration process produces a warning message. While the
policy is "IGNORE", the GCC build key is not checked at all. The
default policy is "WARNING".
Close#5521.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Move -ffunction-sections and -fdata-sections into new SECTION_FLAGS
option to prevent breakage when users override OPTIMIZATION_FLAGS.
Also added documentation for user's to override the flags.
Fixes stack checker undefined reference when OPTIMIZATION_FLAGS=-g.
Also added a copyright field for valid license.
Fixes#5497
Enable the imported SBI in the build for riscv/riscv.
Other riscv BSPs would need to add the entry for optincludes
in addition to adding objsbi to their grp.
Updates #3337
Apply mandatory 2-space indentation for YAML arrays in
spec/build/testsuites/sptests/grp.yml to satisfy the RTEMS CI
formatting checks.
No functional change.
Signed-off-by: Karthikey Kadati <karthikey3608@gmail.com>
These changes eliminate the year 2100 as a limit for TOD. The new
limit is the year 4096. This limit is not due to any RTEMS limitation
but just before the year 4183 when the rounding error in the length
of the year adds up to an entire day. See
https://de.wikipedia.org/wiki/Schaltjahr for details.
There are still limits on Classic APIs which use the 32-bit rtems_interval
type. This corresponds to the Score Watchdog_Interval type. This impacts
delays, timeouts, and Classic API "after" timers.
Closes#5143
Co-authored-by: Joel Sherrill <joel@rtems.org>
Co-authored-by: Gedare Bloom <gedare@rtems.org>