Pumpkin, Inc.

Pumpkin User Forums

Linking Salvo Lite to CrossWorks

If you're having difficulty installing Salvo, post it here.

Linking Salvo Lite to CrossWorks

Postby asen5519 » Wed Feb 24, 2010 2:51 pm

I recently purchased Rowley's CrossWorks for use with Salvo Lite (I will be upgrading to Salvo Pro soon). I have successfully download and installed Salvo, however I am having trouble using Salvo. I started trying to write programs and immediately noticed that the statement "#include <salvo.h>" didn't work. As a result I took the following steps:

In CrossWorks I changed the user include directories to include:
i. C:\Pumpkin\Salvo\inc\
ii. C:\Pumpkin\Salvo\Example\MSP430\MSP430x1xx\TI MSP-TS430PM64\Tut\Tut5\Rowley Associates CrossWorks for MSP430 1.x\Lite\
iii. <Path to my project>

I also had to create a salvocfg.h file in my current directory with the following parameters (and include it in my CrossWorks project):
#define OSUSE_LIBRARY TRUE
#define OSLIBRARY_TYPE OSF
#define OSLIBRARY_CONFIG OST
#define OSTASKS 2
#define OSEVENTS 4
#define OSEVENT_FLAGS 0
#define OSMESSAGE_QUEUES 1

Then I added in the :\Pumpkin\Salvo\Src\salvomem file to the project and then added the C:\Pumpkin\Salvo\lib\RA430-v1\libsalvofra430-t.hza library file.

Once I had added all of these things, then I could compile the very basic Salvo code:
#include <__cross_studio_io.h>
#include <salvo.h>
void
main(void)
{
OSInit();
while(1) {
OSSched();
}
}


So everything is happy and peachy. I play around with Salvo, I get a couple of tasks scheduled and working. Then I try to setup a new program using the aforementioned process. Apparently, I did something the first time I went through this process that isn't listed above because now my code compiles, but the OSSched() doesn't schedule a single task. The program runs, but it stays in an infinite loop. I know the code is correct, because it works in the first project I created. But I can't create a new project.

#include <__cross_studio_io.h>
#include <salvo.h>

#define BINSEM_UPDATE_PORT_P OSECBP(1)
int counter;

void TaskA( void )
{
for (;;) {
debug_printf("Task A\n");
counter++;
if (counter == 5) {
counter = 0;
OSSignalBinSem(BINSEM_UPDATE_PORT_P);
}
OS_Yield();
}
}
void TaskB( void )
{
for (;;) {
OS_WaitBinSem(BINSEM_UPDATE_PORT_P,
OSNO_TIMEOUT);
debug_printf("Task B\n");
}
}
int main( void )
{
debug_printf("Started\n");
OSInit();
OSCreateTask(TaskA, OSTCBP(1), 10);
OSCreateTask(TaskB, OSTCBP(2), 10);
OSCreateBinSem(BINSEM_UPDATE_PORT_P, 0);
counter = 0;
for (;;)
OSSched();
}

Basically I'm asking if you can think of any reason why the code would compile but OSSched() would never call either tasks. Thanks
asen5519
 
Posts: 1
Joined: Mon Feb 22, 2010 2:20 pm

Re: Linking Salvo Lite to CrossWorks

Postby aek » Mon Mar 01, 2010 9:57 pm

There are some incompatible optimizations with the Rowley toolset ... Register Allocation should be set to None -- that could be the issue. The rest of your code looks fine ...
-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron