Whats allowed in the Init() task

Gedare Bloom gedare at rtems.org
Fri Mar 1 15:40:50 UTC 2013


On Fri, Mar 1, 2013 at 9:07 AM, Matthew J Fletcher <amimjf at gmail.com> wrote:
> Hi,
>
> Do rtems applications normally create a new task straight away in Init() ? i
> ask because i seem to get stuck with no threads being scheduled after the
> first Clock_isr.
>
By the time Init gets executed the entire application stack should be
set up and multithreading/interrupts should work fine. Init can either
create new tasks, or execute the workload directly.

> So after boot_card() completes rtems context switches into Init(), there i
> setup my 10ms tick ISR which calls rtems_clock_tick(). But the original
> thread Init() never gets scheduled again after the first call to
> rtems_clock_tick(). I've used JTAG to place breakpoints and i can see the
> code in Init() is not being run.
>
I don't understand what you mean about Init setting up the clock tick.
The ISR for clock handling should be installed during rtems
initialization when the clock driver is installed. Have you
successfully executed the "hello" sample on your board? If so the next
one to test is ticker, which should give you an idea of whether the
clock tick + context switch is working.

-Gedare

> I can see the ISR is being called and the interrupt acknowledged due to
> breakpoints there.
>
> Interestingly although i am using the arm-rtemseabi4.11-gdb 'info threads'
> only shows the current context of the ISR not the Init() thread, that might
> be a different issue though.
>
>
> regards
> ---
> Matthew J Fletcher
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
>



More information about the users mailing list