Error in creating timer

manish jain manish8886 at gmail.com
Sun Apr 7 20:32:10 UTC 2013


Thanks Joel..
It is working now but while I used clock driver with timer I didn't get any
compiler error..

Manish


On Sun, Apr 7, 2013 at 4:18 PM, Joel Sherrill <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<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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20130407/a24d7c90/attachment-0001.html>


More information about the users mailing list