Opened on 06/24/19 at 11:05:36
Closed on 07/08/19 at 05:39:57
#3761 closed defect (invalid)
RTEMS Object creation failed when using RTEMS with LEON3 BSP.
Reported by: | Ashritha | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | admin | Version: | |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
I am building dual core using LEON3 IP cores provided with GRLIB library in Cobham Gaisler website.
The RTEMS 5 version is also provided in the same website.
I have instantiated 2 LEON3 IP cores. Enabled SMP.
Created a simple rtems C program of creating a task. But task creation is failing with Statius code - RTEMS_INVALID_ADDRESS
In my makefile I have used -qbsp=leon3_smp switch.
Change History (7)
comment:1 Changed on 06/24/19 at 11:26:21 by Joel Sherrill
comment:2 follow-up: 3 Changed on 06/25/19 at 03:50:29 by Ashritha
Thank You for the reply. I have gone through the link you have provided and I am aware of it from C User documentation of RTEMS.
However in what case does ID parameter be NULL, When I am very much declaring it? I have taken the code from the example application(1.37) provided in the RTEMS C User Documentation. Its as follows :
#include <rtems.h>
#include <bsp.h>
#define CONFIGURE_MAXIMUM_PROCESSORS 2
#define CONFIGURE_SMP_APPLICATION TRUE
#define CONFIGURE_SCHEDULER_PRIORITY_SMP TRUE
rtems_task Init(
rtems_task_argument ignored
)
{
rtems_id id;
status = rtems_task_create(
rtems_build_name( 'T', 'A', ch, ' ' ),
1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_NO_PREEMPT,
RTEMS_FLOATING_POINT,
&id
);
if (status!=RTEMS_SUCCESSFUL) {
if (status = RTEMS_INVALID_ADDRESS)
printf("TASK CREATION : RTEMS_INVALID_ADDRESS ERROR \n");
}
}
comment:3 Changed on 06/27/19 at 07:14:08 by Sebastian Huber
Replying to Ashritha:
[...]
if (status = RTEMS_INVALID_ADDRESS)
printf("TASK CREATION : RTEMS_INVALID_ADDRESS ERROR \n");
[...]
You should turn on and pay attention to compiler warnings to avoid bugs like this. Here you assign the value RTEMS_INVALID_ADDRESS to status.
comment:4 Changed on 07/06/19 at 09:25:55 by Ashritha
Thank You for bringing out the mistake in the program. However after I set it correct, task creation is still failing. But now it is showing RTEMS_UNSATISFIED error.
Does it mean the stack size defined by RTEMS_MINIMUM_STACK_SIZE is not available really or should we based on the application redefine the MINIMUM_STACK_SIZE ?
comment:5 Changed on 07/06/19 at 13:54:52 by Joel Sherrill
If that's your entire configuration, you forgot to configure any application tasks. Look at any of the examples.
comment:6 Changed on 07/08/19 at 05:38:46 by Sebastian Huber
Please have a look at the API documentation:
https://docs.rtems.org/branches/master/c-user/task_manager.html#rtems-task-create
RTEMS_UNSATISFIED non-preemption mode not supported on SMP system
You should update to the latest RTEMS master, if you want to use the SMP support.
comment:7 Changed on 07/08/19 at 05:39:57 by Sebastian Huber
Resolution: | → invalid |
---|---|
Status: | new → closed |
The right error status is returned for this application error.
You will have to provide your task create call. But this error is documented as meaning the I'd parameter is NULL.https://docs.rtems.org/releases/rtemsdocs-4.6.2/share/rtems/html/c_user/c_user00065.html