Re: Static allocation

2021-09-28 Thread Sebastian Huber
On 28/09/2021 21:39, Joel Sherrill wrote: Sebastian is there any guidance in the Classic API or Users Guide about static systems? Not yet, but it is on my TODO list. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phon

Re: Static allocation

2021-09-28 Thread Joel Sherrill
On Tue, Sep 28, 2021 at 11:21 AM Петр Борисенко wrote: > > > By wanting static allocation only, you need to use the special task and > queue create APIs for that and avoid services which do dynamic allocation > > Are we talking about some existing API? Can you provide a link for > documentation

Re: [EXTERNAL] rtems_semaphore routines on SMP systems

2021-09-28 Thread Johnson, Andrew N.
On Sep 28, 2021, at 5:02 AM, Sebastian Huber mailto:sebastian.hu...@embedded-brains.de>> wrote: On 28/09/2021 11:46, Heinz Junkes wrote: Unfortunately we found out that EPICS uses the mutex handling also in the interrupt context and this leads to core-dumps in RTEMS :-( Yes, using any kind of

Re: [EXTERNAL] rtems_semaphore routines on SMP systems

2021-09-28 Thread Sebastian Huber
On 28/09/2021 17:11, Johnson, Andrew N. wrote: sc = rtems_semaphore_create (rtems_build_name ('B', c3, c2, c1),     initialState,     RTEMS_FIFO | RTEMS_SIMPLE_BINARY_SEMAPHORE |         RTEMS_NO_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL, 0,     &sid); We will want to use the

Re: Static allocation

2021-09-28 Thread Петр Борисенко
> By wanting static allocation only, you need to use the special task and queue create APIs for that and avoid services which do dynamic allocation Are we talking about some existing API? Can you provide a link for documentation? On Tue, Sep 28, 2021, 6:33 PM Joel Sherrill wrote: > > > > On Tu

Re: [EXTERNAL] rtems_semaphore routines on SMP systems

2021-09-28 Thread Sebastian Huber
On 28/09/2021 12:24, Heinz Junkes wrote: in EPICS osdMutex the semaphore is created like this: sc = rtems_semaphore_create (rtems_build_name ('M', c3, c2, c1), 1, RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL, 0,

Re: [EXTERNAL] rtems_semaphore routines on SMP systems

2021-09-28 Thread Heinz Junkes
Yes, Andrew is absolutely right. I unfortunately got the two things mutex vs. event mixed up in the rush. Sorry for that. Viele Grüße Heinz > On 28. Sep 2021, at 17:11, Johnson, Andrew N. wrote: > > On Sep 28, 2021, at 5:02 AM, Sebastian Huber > wrote: >> >> On 28/09/2021 11:46, Heinz Ju

Re: Static allocation

2021-09-28 Thread Joel Sherrill
On Tue, Sep 28, 2021, 10:05 AM Петр Борисенко wrote: > Seems pretty obvious, but I mean kernel. When I define a queue or a task, > will it compile statically or it will get memory from heap during the > initialization? @Sebastian Huber > mentioned > that it depends on using of UNLIMITED_OBJECTS

Re: Static allocation

2021-09-28 Thread Петр Борисенко
Seems pretty obvious, but I mean kernel. When I define a queue or a task, will it compile statically or it will get memory from heap during the initialization? @Sebastian Huber mentioned that it depends on using of UNLIMITED_OBJECTS configuration option. On Tue, Sep 28, 2021, 5:26 PM Joel Sherril

Re: Static allocation

2021-09-28 Thread Joel Sherrill
On Tue, Sep 28, 2021, 6:43 AM Петр Борисенко wrote: > Hello! > Is it possible to compile Rtems statically and disable memory allocation > routines and heap? > No. You have to restrict your application use of APIs and services to those which do not use dynamic allocation. --joel > _

Re: Statically allocated build

2021-09-28 Thread Sebastian Huber
On 28/09/2021 13:56, Петр Борисенко wrote> Oh, I got it. Does FS enabled by default and I am supposed to disable it during the build process? You need these configuration options: #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0 #define CONFIGURE_DISABLE_NEWLIB_REENTRANCY #define CONFIGURE_APPLI

Re: Statically allocated build

2021-09-28 Thread Петр Борисенко
Oh, I got it. Does FS enabled by default and I am supposed to disable it during the build process? On Tue, Sep 28, 2021, 2:52 PM Петр Борисенко wrote: > No. there is no filesystem. > The application is build upon the stm32f4 bsp, and linker script's kept > unchanged. > > > On Tue, Sep 28, 2021,

Re: Statically allocated build

2021-09-28 Thread Петр Борисенко
No. there is no filesystem. The application is build upon the stm32f4 bsp, and linker script's kept unchanged. On Tue, Sep 28, 2021, 8:28 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > Hello, > > On 24/09/2021 20:08, Петр Борисенко wrote: > > Hello everyone! > > I am current

Static allocation

2021-09-28 Thread Петр Борисенко
Hello! Is it possible to compile Rtems statically and disable memory allocation routines and heap? ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users

Re: [EXTERNAL] rtems_semaphore routines on SMP systems

2021-09-28 Thread Heinz Junkes
Hallo Sebastian, in EPICS osdMutex the semaphore is created like this: sc = rtems_semaphore_create (rtems_build_name ('M', c3, c2, c1), 1, RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL, 0, &sid); if (sc != R

Re: [EXTERNAL] rtems_semaphore routines on SMP systems

2021-09-28 Thread Sebastian Huber
On 28/09/2021 11:46, Heinz Junkes wrote: Unfortunately we found out that EPICS uses the mutex handling also in the interrupt context and this leads to core-dumps in RTEMS :-( Yes, using any kind of mutexes in interrupt context is undefined behaviour. Mutexes may only be used from threads. W