Page 1 of 1

SB-25: Salvo: Runtime Problems with IAR MSP430 V2 & V3

PostPosted: Mon May 10, 2004 11:08 am
by Salvo Tech Support
Applies To

Salvo for TI's MSP430 and IAR MSP430 V2 & V3 users.

Description of Problem

Salvo tasks containing functions with large parameter lists show immediate runtime problems.

An error in the Salvo context switcher results in stack problems when the compiler uses the stack to push additional parameters when calling a function with a large parameter list.

Tasks affected by this issue will increment the stack pointer at the end of the infinite loop of the task -- this can be seen by reviewing the assembly listing of the task.

Suggested Workaround

Salvo Pro users can fix the context switcher by replacing the code in salvosrcportiar430.s43 at line 167:

bis.w	R14,0(R12)

bic.w	#0xFF00,0(R12)
bis.w R14,0(R12)

Until an updated context switcher is available to Salvo Lite and LE users, they must avoid generating code that creates this situation. One way to do this is to use a two-level call to move the function with a large parameter list out of the task. Use a function with no parameters to call the function with multiple parameters.

Fixed In

The next major Salvo for TI's MSP430 release.

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

[This message has been edited by Salvo Tech Support (edited May 10, 2004).]