Error in creating timer

Joel Sherrill joel.sherrill at OARcorp.com
Sun Apr 7 22:18:52 UTC 2013


On 04/07/2013 03:32 PM, manish jain wrote:
> Thanks Joel..
> It is working now but while I used clock driver with timer I didn't 
> get any compiler error..
>
I am glad to know that worked.

I have a patch in my tree so next time someone will get a compile error.
You can only specify one of need clock, need timer, or do not need clock.
There were checks for having 0 defined but not > 1.

--joel
> Manish
>
>
> On Sun, Apr 7, 2013 at 4:18 PM, Joel Sherrill 
> <joel.sherrill at oarcorp.com <mailto:joel.sherrill at oarcorp.com>> wrote:
>
>     On 04/07/2013 03:05 PM, manish jain wrote:
>
>         Hi,
>         I am just running a small Init task in which I am creating a
>         "timer". But the status returned by the "rtems_timer_create"
>         function is "RTEMS_TOO_MANY ". I think, this status is
>         referring to a maximum numbers of objects already allocated.
>         But in my task I am just creating one timer. Do I need to
>         preconfigure before using the timer? For now I am using
>         following macros:
>
>         #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
>         #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
>         #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
>
>         Can someone tell me what I might be missing? I am currently
>         running my task on sparc sis simulator.
>
>     You can't configure the timer and clock driver at the same time.
>     This should have resulted in a compile time error. On most BSPs,
>     these use the same hardware so it is considered a general error.
>     Besides, the timer driver is for a "benchmark timer" used by
>     the RTEMS Timing Test Suites -- and they assume no clock tick.
>
>     I don't know why your initialization task needs floating point but
>     that is your application's requirement.
>
>     If you are creating a Classic API timer via the rtems_timer_create()
>     method, then you need to configure the system to account for
>     how many instances of Classic API Timers you need.  Something
>     like this:
>
>
>     #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
>     #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
>     #define CONFIGURE_MAXIMUM_TIMERS 1
>
>     If you need more than one timer, then up that number.
>
>     If you want standard in, out and error to work (e.g. printf()), then
>     you should also have:
>
>     #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
>
>     I just posted a re-write of the Configuring a System chapter in the
>     Users Guide. Everything you should need to know is in it and
>     hopefully better presented than the current version.
>
>     http://www.rtems.org/ftp/pub/rtems/people/joel/config-v1.pdf.bz2
>
>     The current version is terse where the new version includes
>     more information in a more structured fashion.  :)
>
>         Manish
>
>
>
>     -- 
>     Joel Sherrill, Ph.D.             Director of Research& Development
>     joel.sherrill at OARcorp.com        On-Line Applications Research
>     Ask me about RTEMS: a free RTOS  Huntsville AL 35806
>     Support Available (256) 722-9985 <tel:%28256%29%20722-9985>
>
>


-- 
Joel Sherrill, Ph.D.             Director of Research& Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35806
Support Available               (256) 722-9985

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20130407/8204a424/attachment-0001.html>


More information about the users mailing list