Pumpkin, Inc.

Pumpkin User Forums

SB-9: Salvo: Reducing Library RAM Usage

Service Bulletins -- outlining known problems and how to handle them -- are posted here.

SB-9: Salvo: Reducing Library RAM Usage

Postby Salvo Tech Support » Tue Aug 07, 2001 8:17 am

Applies To

Salvo v2.2.1 and earlier.

Description of Problem

Reducing library RAM usage, as outlined in the Libraries chapter of the Salvo User Manual, leads to run-time problems with user variables located in the same RAM bank as the Salvo variables. Specifically, if the user reduces the number of tasks and/or events and places additional variables in RAM Bank 1, these variables may be overwritten by a call to OSInit().

The problem lies in the libraries' OSInit(), which has been compiled to initialize a predetermined number of tcbs and ecbs. Changing OSTASKS and OSEVENTS has no effect on OSInit() – it still initializes the tcbs and ecbs, even though the memory usage reported by the compiler suggests that those RAM locations are unused. Moreover, libraries that support the built-in idle task also overwrite the tcb with taskID OSTASKS with task information for the idle task.

Also, setting OSEVENT_FLAGS to 0 has no effect on RAM usage.

Suggested Workaround

All users should change

code:
#if OSENABLE_EVENT__FLAGS
#if OSEVENT_FLAGS == 0
#undef OSEVENT_FLAGS
#define OSEVENT_FLAGS 1
#endif
#endif

in salvo.h to

code:
#if OSENABLE_EVENT_FLAGS
#if OSEVENT_FLAGS == 0
etc.

For freeware library users, there is no suggested workaround for the problems with OSinit().

For standard library users, include init.c, initecb.c and inittcb.c as nodes in your project, before the library you're using.

Fixed In

Salvo v3.0.0.

[This message has been edited by Salvo Tech Support (edited January 13, 2002).]

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

Return to Service Bulletins

Who is online

Users browsing this forum: No registered users and 0 guests