Can't install user extensions? - SOLVED

Robert S. Grimes rsg at alum.mit.edu
Fri Aug 3 16:10:20 UTC 2007


Update - I did figure out how to build the tests, though I'm not sure it
was the correct way.  Anyway, sp07 works, so it was must be in my
configuration.  Well, maybe...

Stepping into RTEMS, I see _Extension_Allocate is calling
_Objects_Allocate, which fails early on.  Specifically, it fails on the
"if (information-size == 0 )" test - hopefully the comment means
something to the more knowledgeable folks?

     41    Objects_Control *_Objects_Allocate(
     42      Objects_Information *information
     43    )
-    44    {
     45      Objects_Control *the_object;
     46   
     47      /*
     48       *  If the application is using the optional manager stubs and
     49       *  still attempts to create the object, the information block
     50       *  should be all zeroed out because it is in the BSS.  So
let's
     51       *  check that code for this manager is even present.
     52       */
-    53      if ( information->size == 0 )
     54        return NULL;

Well, this comment gave me a clue - a missing manager?!  In my Makefile,
I had this:

    MANAGERS=io event message semaphore

Seeing as it isn't clear to me which one is missing, I changed it to this

    MANAGER=all

Now it works!

Anyone have any strong reasons for not just sticking with 'all'?  (I
have *lots* of memory).  If so, where is there a convenient list of the
managers, their names, and how to determine which ones to include?  I'm
sure it's all there somewhere, but is it tied together anywhere?

Thanks,
-Bob

Robert S. Grimes wrote:
> Hi,
>
> Trying to create user extensions, but get error 5 "too many".  I have
> this defined before confdefs.h
>
>     #define CONFIGURE_MAXIMUM_USER_EXTENSIONS   10
>
> I started with 1 or 2, but still no luck
>
> My code looks like this:
>
>       rtems_name name_;
>       rtems_id   id_;
>       rtems_extensions_table extTable;
>
>       extTable.thread_begin   = taskBegin;
>       extTable.thread_create  = taskCreate;
>       extTable.thread_delete  = taskDelete;
>       extTable.thread_exitted = taskExitted;
>       extTable.thread_restart = taskRestart;
>       extTable.thread_start   = taskStart;
>       extTable.thread_switch  = taskSwitch;
>       extTable.fatal          = userFatalError;
>
>       name_ = rtems_build_name('R', 'M', 'o', 'n');
>       rtems_status_code status = rtems_extension_create(name_,
>     &extTable, &id_);
>
>
> The call to rtems_extension_create fails, again with the "too many"
> error.  By the way, this is being called from the user's Init function.
>
> I step into the rtems call, but quickly get lost
>
> I see no significant (and relevant) difference between my code and the
> sp07 test program.  What I'm doing seems identical.  A search of the
> Wiki and mailing list archives turned up nothing relevant.  Any ideas?
>
> As an aside, I can't figure out how the tests are created.  The
> README.configure suggests using --enable-tests, which I did, and "do a
> 'make test'  to build the full test suite', but make complains that
> 'test' is not a valid target.  So I can't report wheter the sp07 test
> program works or not...
>
> Thanks!
> -Bob
>
>
>   



More information about the users mailing list