Pumpkin, Inc.

Pumpkin User Forums

SB-24: Salvo: Local Auto Vars with Microchip MPLAB-C18 and IAR PIC18C

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

SB-24: Salvo: Local Auto Vars with Microchip MPLAB-C18 and IAR PIC18C

Postby Salvo Tech Support » Fri Feb 06, 2004 7:58 am

Applies To

Salvo for PICmicro(R) MCUs distributions and Microchip MPLAB-C18 and IAR PIC18C users.

Description of Problem

The use of local auto vars (normally allowed if persistence between context switches is not required) causes runtime problems in Salvo tasks.

Normally, the use of local auto vars in a Salvo task is permitted, so long as the values of the auto vars are not expected or required to persist across context switches. However, the Salvo context switchers for these two compilers do not handle the presence of local auto vars properly, and this leads to stack corruption.

Suggested Workaround

Use only static local variables in Salvo tasks when using either the Microchip MPLAB-C18 or IAR PIC18C compilers.

Fixed In

Salvo documentation will be updated to reflect this issue. At a later date, these context switchers may be updated to permit the use of local auto variables between Salvo context switches.

------------------
--------
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

Return to Service Bulletins

Who is online

Users browsing this forum: No registered users and 0 guests

cron