Small doubt in RTEMS testsuite codes

Sebastian Huber sebastian.huber at embedded-brains.de
Tue May 12 08:05:20 UTC 2020


On 12/05/2020 09:48, Richi Dubey wrote:

> Heyy Everyone,
>
> When I am opening testsuites/sptests/sp01/init.c , I can see the
> following function definition:
>
> rtems_task Init(  rtems_task_argument argument )
>
> and when I open testsuites/sptests/sp01/task1.c ( which is
> compiled(linked) together with init.c in the makefile in build of
> bsp), I can see the following function:
>
> rtems_task Task_1_through_3(  rtems_task_argument index).
>
> Can someone please tell me how do the sp01 testsuite run without a int
> main? If Init() is the start point then where does it gets it argument
> 'argument' from?

You may have a look at:

https://docs.rtems.org/branches/master/c-user/initialization.html

https://docs.rtems.org/branches/master/c-user/config/index.html

I think your question is not really well answered by our current 
documentation set. While you read the documentation please always try to 
improve it. I you think something is missing or could be better 
explained, then just send patches.

Independent of the documentation you should set up a test environment 
with GDB support. You can set a break point to Init(). This points you 
to the code which determines the argument value.



More information about the devel mailing list