Commit Graph

408 Commits

Author SHA1 Message Date
Joel Sherrill
af86ade836 cpukit/sapi/src/rbheap.c: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Jeremy Lorelli
d8ba01ec52 cpukit: Raise internal error if we cannot open stdin with fileno 0
If someone manages to open a file before rtems_libio_post_driver is run,
open() may allocate a file number other than 0 for stdin. This leads to
a silent failure of the logic in rtems_libio_post_driver, and confusing
behavior because your BSP behaves as if it doesn't have a console.

Instead of failing silently, raise an internal error if open() succeeds
but gives us an unexpected file number for stdin.
2025-09-20 08:57:16 +10:00
Joel Sherrill
9d81cacf25 cpukit/sapi: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
4c9e41b060 cpukit/sapi/src/exinit.c: Address warning on all ARM builds
The block of embedded assembly language which creates a section
to add auto-loading of the Python pretty printing scripts was
getting this warning on all ARM BSPs.

/tmp/ccMGaqij.s: Assembler messages:
/tmp/ccMGaqij.s:19: missing merge / string entity size, 1 assumed

This was because the @ symbol is a comment on ARM. Changing to
a % as suggested on the binutils mailing list resolved the problem.
2025-08-06 15:33:15 +00:00
Chris Johns
a1c3d4ba8e version: Add the release label interfaces
- Mark the VC key interfaces as deprecated in doxygen

Updates #5037
2024-10-30 22:40:15 +00:00
the-m3chanic
e13236123c cpukit/sapi/src: fixed grammar mistake in comment in exinit.c 2024-08-05 21:29:58 +00:00
the-m3chanic
362deb38dc cpukit/sapi/src: removed macro, made asm() global at file scope and changed python script being loaded 2024-08-05 21:29:58 +00:00
the-m3chanic
fad8219a4e cpukit/sapi/src: added DEFINE_GDB_PY macro to exinit.c to embed gdb-inline section 2024-08-05 21:29:58 +00:00
Sebastian Huber
bdbda6a75f score: Remove ISR_LOCK_DEFINE()
Use ISR_LOCK_NEEDS_OBJECT to determine if a lock object is needed.

Update #4957 and #5038.
2024-06-21 08:10:27 +02:00
Kinsey Moore
e7cb79c39d cpukit: Remove unused includes 2023-10-13 19:02:15 -05:00
Sebastian Huber
aca1724c4c build: Optionally use a VERSION file
Define the RTEMS version in the wscript.  Optionally use a VERSION file
to change the default values of the wscript.  Allow the command line
option --rtems-version to override __RTEMS_MAJOR__.  Remove support for
command line configurable options (--rtems-option).

Rename internal define RTEMS_VERSION_VC_KEY to
RTEMS_VERSION_CONTROL_KEY.
2023-08-02 07:27:51 +02:00
Sebastian Huber
58840ffbb0 rtems: Add files to Doxygen groups
Provide basic Doxygen comments.

Update #3706.
Update #3707.
2023-07-26 07:18:29 +02:00
Sebastian Huber
bcef89f236 Update company name
The embedded brains GmbH & Co. KG is the legal successor of embedded
brains GmbH.
2023-05-20 11:05:26 +02:00
Sebastian Huber
64fbeaa0d1 score: INTERNAL_ERROR_IDLE_THREAD_STACK_TOO_SMALL
Ensure that the IDLE storage allocator did allocate a suffiently large area.

Update #3835.
Update #4524.
2022-10-14 10:48:23 +02:00
Sebastian Huber
45ee958552 config: Add CONFIGURE_IDLE_TASK_STORAGE_SIZE
By default, allocate the IDLE task storage areas from the RTEMS Workspace.
This avoids having to estimate the thread-local storage size in the default
configuration.

Add the application configuration option CONFIGURE_IDLE_TASK_STORAGE_SIZE to
request a static allocation of the task storage area for IDLE tasks.

Update #3835.
Update #4524.
2022-10-14 10:48:23 +02:00
Sebastian Huber
1ab93ba480 score: INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED
Add the INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED fatal error in case the
creation of an idle thread fails.  This may happen due to a failing create
extension provided by the application.
2022-10-14 10:48:22 +02:00
Joel Sherrill
255fe433fd cpukit/: Scripted embedded brains header file clean up
Updates #4625.
2022-03-10 08:43:49 +01:00
Joel Sherrill
bd2e898c9e sapi/src/*.c: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Sebastian Huber
4969af4102 rtems: Add RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT
Add RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT as the fatal source for
spurious interrupts.  Use the interrupt vector number of the spurious
interrupt for the fatal code.

Update #3269.
2021-07-26 07:54:25 +02:00
Sebastian Huber
fad01e6cf9 score: Add PER_CPU_DATA_NEED_INITIALIZATION()
Make the initialization of the per-CPU data optional.

Change license to BSD-2-Clause according to file history and
re-licensing agreement.

Update #3053.
2021-06-10 15:55:47 +02:00
Sebastian Huber
2b32146400 Remove superfluous <rtems/score/wkspace.h> includes 2021-04-20 19:18:23 +02:00
Sebastian Huber
bc6ffc3be8 Add system initialization step for target hash
Update #4267.
2021-02-26 09:10:09 +01:00
Sebastian Huber
d8bfa5a9bc rtems: Add rtems_get_build_label()
Update #4269.
2021-02-25 16:16:16 +01:00
Sebastian Huber
d138a7906a config: Adjust stack allocator initialization
Use the right system initialization step for the stack allocator
initialization.  Do the stack allocator initialization before the
workspace initialization so that _Memory_Allocate() can be used to get
memory for the allocator.
2021-02-24 13:32:35 +01:00
Sebastian Huber
0b263b0eb7 score: Remove _Objects_Open()
Use the type safe _Objects_Open_u32() instead.  Return the object
identifier to enforce a common usage pattern.
2021-02-24 09:22:36 +01:00
Sebastian Huber
3272dcb364 Update copyright notice to 2021 2021-01-27 09:41:07 +01:00
Sebastian Huber
c734e8660f cpucounter: Increase conversion accuracy
The maximum frequency is UINT32_MAX.  Converted to a uint64_t variable
it can be shifted by 32.  The addition does not overflow since bin_per_s
- 1 is UINT32_MAX.
2021-01-26 15:29:36 +01:00
Sebastian Huber
3db9c820e5 sapi: Canonicalize @defgroup and @file comments
Adjust group identifier and names to be in line with a common pattern.
Use common phrases for the group and file brief descriptions.

Update #3706.
2020-12-02 07:45:53 +01:00
Sebastian Huber
e07088d9ba rtems: Canonicalize implementation Doxygen groups
Rename Classic API top-level group from Classic to RTEMSImplClassic.
Use RTEMSImplClassic as a prefix for the subgroups.  Change the group
names to be in line with the API group names.  Use common phrases for
the group brief descriptions.

Update #3706.
2020-12-02 07:45:53 +01:00
Sebastian Huber
b1a8be45b0 rtems: Simplify includes in version.c 2020-12-02 07:45:53 +01:00
Sebastian Huber
3732c93182 posix: Delete unused _POSIX_Fatal_error() 2020-12-02 07:45:52 +01:00
Sebastian Huber
657e30c135 config: CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE
In order to better support applications which use the new
rtems_task_construct() directive add the
CONFIGURE_INIT_TASK_CONSTURCT_STORAGE_SIZE configuration option.  If
this option is specified, then the Classic API initialization task is
constructed with rtems_task_construct().

Update #4181.
2020-11-26 11:10:22 +01:00
Sebastian Huber
5353ea89d7 rtems: Move from <rtems.h> to <rtems/config.h>
Move configuration related declarations and definitions to
<rtems/config.h>.  The goal is to make <rtems.h> an include only header
file.
2020-09-18 18:55:09 +02:00
Sebastian Huber
c312f3110e CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE
Add this application configuration option.  This configuration option can be
used to reserve space for the dynamic linking of modules with thread-local
storage objects.

Add RTEMS_TASK_STORAGE_ALIGNMENT to define the minium alignment of a
thread-local storage size.

Update #4074.
2020-09-17 17:42:25 +02:00
Sebastian Huber
c7e30854f2 rtems: Add _RTEMS_Name_to_id()
Simplify object name to identifier directives.  Using
_RTEMS_Name_to_id() to implement the directives enables a tail call
optimization.

Change license to BSD-2-Clause according to file history.

Update #3053.
2020-08-31 16:19:57 +02:00
Sebastian Huber
90390118c0 rtems: Move declartion of _RTEMS_version
Close #3978.
2020-07-14 07:25:45 +02:00
Sebastian Huber
3ce3cdfc5b score: Update _Copyright_Notice
Add the _Copyright_Notice to a special linker set to prevent a garbage
collection of this item.
2020-05-06 08:02:15 +02:00
Sebastian Huber
d30a352d4c rtems: Deprecate _Copyright_Notice
Close #3973.
2020-05-06 08:01:57 +02:00
Sebastian Huber
1af8e45bb7 rtems: Add rtems_get_copyright_notice()
Update #3973.
2020-05-06 07:47:34 +02:00
Sebastian Huber
34b098edc5 rtems: Deprecate use of _RTEMS_version
Close #3970.
2020-05-06 07:39:10 +02:00
Sebastian Huber
cfe8f7a9b7 doxygen: Switch @brief and @ingroup
This order change fixes the Latex documentation build via Doxygen.
2020-04-28 09:04:00 +02:00
Sebastian Huber
3d73642d9e sapi: Add param check to rtems_extension_create()
Check that the extensions table is not NULL.  Change format.

Update #3953.
2020-04-17 19:51:11 +02:00
Sebastian Huber
80cf60efec Canonicalize config.h include
Use the following variant which was already used by most source files:

  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif
2020-04-16 07:30:00 +02:00
Sebastian Huber
c36fae22fe config: Initialize IO drivers on demand 2020-02-26 08:23:28 +01:00
Sebastian Huber
ba74ebde74 libio: Add POSIX user environment pointer to TCB
The IO library used a POSIX key to store an optional POSIX user
environment pointer.  This pulled in the POSIX keys support in every
application configuration.  Add a user environment pointer to the thread
control block (TCB) instead.  Applications which do not need the POSIX
user environment will just get an overhead of one pointer per thread.

Close #3882.
2020-02-25 07:18:26 +01:00
Sebastian Huber
8ecbc3826e sysinit: Add RTEMS_SYSINIT_ZERO_MEMORY
Use a dedicate system initialization step to zero the memory used for
the workspace and C program heap.

This avoids dead code in case CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY is
not configured.
2020-02-06 15:19:35 +01:00
Sebastian Huber
e44ae805f7 config: Add CONFIGURE_VERBOSE_SYSTEM_INITIALIZATION
Update #3861.
2020-02-04 06:24:26 +01:00
Sebastian Huber
c344e5828c Use RTEMS_SYSINIT_ORDER_LAST_BUT_5
Use RTEMS_SYSINIT_ORDER_LAST_BUT_5 instead of RTEMS_SYSINIT_ORDER_LAST
to allow applications and support functions to place system
initialization handlers behind the standard handlers.

Update #3838.
2020-02-04 06:06:42 +01:00
Sebastian Huber
eea21eaca1 bsps: Rework work area initialization
The work area initialization was done by the BSP through
bsp_work_area_initialize(). This approach predated the system
initialization through the system initialization linker set. The
workspace and C program heap were unconditionally initialized.  The aim
is to support RTEMS application configurations which do not need the
workspace and C program heap.  In these configurations, the workspace
and C prgram heap should not get initialized.

Change all bsp_work_area_initialize() to implement _Memory_Get()
instead.  Move the dirty memory, sbrk(), per-CPU data, workspace, and
malloc() heap initialization into separate system initialization steps.
This makes it also easier to test the individual initialization steps.

This change adds a dependency to _Heap_Extend() to all BSPs.  This
dependency will be removed in a follow up change.

Update #3838.
2020-02-04 06:06:41 +01:00
sebastian.huber
3859cd63af rtems-5: Improve heap fatal error information
Update #3806.
2019-11-05 07:29:00 +01:00