Pumpkin, Inc.

Pumpkin User Forums

Mixing libraries and source on a project

If you're having difficulty with Salvo's configuration options, post it here.

Mixing libraries and source on a project

Postby Eduardo Robles » Tue Feb 05, 2002 7:54 am

Hi,

Now I am running on the "real" Full Salvo version

In an already running project that involves the control of servo motors I started to add some Salvo spice on it for additional functionalities, and notice that the OSInit()interacts oddly with initial parameters of the servos, producing a funny but unwanted jitter when starting up.

I think that I can experiment with some config parameters like OSCLEAR_GLOBALS or OSENABLE_IDLE_TASK, but I am not sure if I can continue using the library (I like their compactness and convenience), and compile just init.c before the library to be able to use the above mentioned config parameters.

This would be about the same as I already do with mem.c to manage saving some memory by defining the number of tasks and events.

So, the same priciple applies?

Regards,

Eduardo

Eduardo Robles
 
Posts: 14
Joined: Mon Jun 18, 2001 11:00 pm
Location: Sao Paulo, SP, Brazil

Re: Mixing libraries and source on a project

Postby Eduardo Robles » Tue Feb 05, 2002 8:28 am

Just another question on the same topic.

Why is the OSInit() service using a few bytes on my bank0 memory space? isn't it supposed to use bank 1 only?

Regards,

Eduardo

Eduardo Robles
 
Posts: 14
Joined: Mon Jun 18, 2001 11:00 pm
Location: Sao Paulo, SP, Brazil

Re: Mixing libraries and source on a project

Postby Salvo Tech Support » Tue Feb 05, 2002 8:33 am

Hello Eduardo.

The short answer to your question is that one cannot / should not mix Salvo source code and Salvo libraries together in one project (except for mem.c, which contains no functions, just variables).

The reason for this is the complex interrelation between the source code modules and the configuration options. Odds are that if you include one or more source files and change a configuration option, you may fail to include all of the source files that are affected, and therefore you will be linking to modules in the library that don't match the configuration option's you've specified.

If you are encountering a particular problem with OSInit(), please consult the Service Bulletins (there was, as I recall, at least one issue involving OSinit), or consider creating a project using only source code, and then set your configuration options accordingly.

Please note that v2.2.1's OSInit() has some shortcomings. It initializes tcbs and ecbs where it's not really necessary (they're initialized when tasks and events are created, anyway), and it enables interrupts if the idle task is enabled, etc. I suspect this interrupt enabling might be the root of your problem. You may be able to fix your problem using a source code build with OSENABLE_IDLE_TASK set to FALSE.


OSInit()'s shortcomings have been addressed in the upcoming v3.0 release.

------------------
--------
Salvo Technical Support
Please request all tech support through the Forums.

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am

Re: Mixing libraries and source on a project

Postby Salvo Tech Support » Tue Feb 05, 2002 10:52 am

Hi Eduardo.

quote:
Why is the OSInit() service using a few bytes on my bank0 memory space? isn't it supposed to use bank 1 only?

That's probably OSInit()'s local (auto) variables. They will be overlayed with the auto variables of other functions. All auto variables and parameters are in bank 0 with PICC and PICC-18.

------------------
--------
Salvo Technical Support
Please request all tech support through the Forums.

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am

Re: Mixing libraries and source on a project

Postby tbims23822 » Wed Jul 08, 2009 12:15 am

www.drop-shopping.com is a premium website for cheap air jordans shoes and other more really nike air jordan shoes.We have varity of cheap air jordan shoes available for wholesale.Cheap China wholesale shoes including cheap Nike shoes and cheap jordan shoes,nike sneakers,nike sneakers discount,air jordan sneakers,air force sneakers.We supply nike sneakers,jordan sneakers,air jordan sneakers,air force sneakers wholesale.You can buy very cheap jordans shoes including cheap women shoes,cheap nike shoes,cheap running shoes from us.
tbims23822
 


Return to Configuration

Who is online

Users browsing this forum: No registered users and 1 guest

cron