Pumpkin, Inc.

Pumpkin User Forums

OSTimer()

For issues specific to TI's MSP430 line of ultra-low-power microcontrollers, including compilers (e.g. Quadravox AQ430), IDEs (e.g. IAR Embedded Workbench) and development tools (e.g. TI MSP-FET430 Flash Emulation Tool).

OSTimer()

Postby FatKid » Tue Jul 19, 2005 8:29 am

Hello,
I am new to Salvo and am working on a project that I inherited. I am using Rowley IDE but the code was originally done in some other IDE. I am trying to build the project but keep getting an error for only certain OS calls. Specifically:

__low_power_mode_3();
__low_power_mode_off_on_exit();
OSTimer();

I get undefined symbol for all three calls. However, I think I have included salvo lib libsfcs430-a.hza correctly. I am using the shareware version of salvo. Is there anyway that the shareware version does not contain this function call or am I way off and have some other issues?

Sorry if this is a stupid question..

Thanks,

FK

FK
FatKid
 
Posts: 9
Joined: Thu Jul 14, 2005 11:00 pm
Location: West Chester,Ohio, United States

Re: OSTimer()

Postby aek » Tue Jul 19, 2005 8:39 am

There are no stupid questions ...

Dunno about your OSTimer() problem -- OSTimer() is in the -a library, so your problem is elswhere with that one.

The other LPM-mode calls are likely to be in the wrong syntax for the Rowley tools (they're not Salvo calls) -- I usually grep the include files (probably in430.h) that come with the compiler to see what the syntax is ...

If you're not getting undefined symbols for, say, OSInit() and OSSched(), then you've probably linked the library correctly. Are you sure you're not just getting a warning from a lack of a function declaration on OSTimer()? Make sure you

code:
#include "salvo.h"

at the start of your module.

BTW, this presentation has examples of how to manage low-power mode and interrupts with Salvo: http://www.pumpkininc.com/content/doc/press/Pumpkin_MSP430ATC2004.pdf

See page 38.

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: OSTimer()

Postby FatKid » Tue Jul 19, 2005 10:00 am

Thank you very much for the quick reply and for clearing that up for me. I forgot to tell you I am new to the Rowley C compiler and new to the MSP430 along with new to SALVO.

I have a new question I am hoping you could help me with. I commented out the two LPM calls and then tried to build it again. This time it does not give an undefined symbol error for OSTimer() but for 'OSTimerTicks' which I believe is some type of global variable for Salvo. However, I have no idea what to do to fix the problem.

Thank you very much for you help,

FK

FK
FatKid
 
Posts: 9
Joined: Thu Jul 14, 2005 11:00 pm
Location: West Chester,Ohio, United States

Re: OSTimer()

Postby aek » Tue Jul 19, 2005 10:27 am

It would help if you would post the exact error messages, complete as part of the Rowley Build Results window.

There is an OStimerTicks (note capitalization) -- wrong case will cause errors.

As an aside, _all_ of Salvo's global objects are in salvomem.c, which you must ad to your project (see our various docs). All of the services (like OSTimer()) are in the libraries. A -a library will have everything in it but the ability to wait on timeouts.

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: OSTimer()

Postby FatKid » Tue Jul 19, 2005 10:51 am

Sorry, Here is the exact output from a build:


Rebuild solution — 762 ms — 1 error
Rebuilding “EL_FIRMWARE” in configuration “Debug” — 1 error
Compiling main.c
Assembling crt0.asm
Compiling mem.c
Linking EL_FIRMWARE.hzx — 1 error
undefined symbol '_OStimerTicks'
Build failed


It then highlights OSTimer(); when it refers to '_OStimerTicks"


//***************************************************
// Interrupt Handlers
//************ Timer A0 ISR *************************
//#pragma vector=TIMERA0_VECTOR
void Timer_A (void) __interrupt[TIMERA0_VECTOR]
{
OSTimer(); // Tick RTOS timer

// __low_power_mode_off_on_exit(); // Stay awake, RTOS will return to sleep when nothing to do
}


Thanks again for your help, let me know if you have any other questions,

FK

FK
FatKid
 
Posts: 9
Joined: Thu Jul 14, 2005 11:00 pm
Location: West Chester,Ohio, United States

Re: OSTimer()

Postby aek » Tue Jul 19, 2005 10:52 am

OK, I think what is happening is that your salvocfg.h is incorrect for what you are trying to do -- can you post it here?

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: OSTimer()

Postby FatKid » Tue Jul 19, 2005 11:07 am

#define OSUSE_LIBRARY FALSE
#define OSBYTES_OF_DELAYS 2
#define OSENABLE_IDLING_HOOK TRUE
#define OSENABLE_BINARY_SEMAPHORES TRUE
#define OSEVENTS 3
#define OSTASKS 5

I apologize if it comes out to be something this simple, like I said earlier, I inherited the project and it was compiled before so I was hoping that this file would not be an issue.

Thanks again,

FK

FK
FatKid
 
Posts: 9
Joined: Thu Jul 14, 2005 11:00 pm
Location: West Chester,Ohio, United States

Re: OSTimer()

Postby aek » Tue Jul 19, 2005 11:54 am

Yes, that's the problem.

You are using a library. Configuration options for library builds are different from configuration options for source-code builds because of the fact that a library is precompiled. See the User Manual for the ones you can use with a library build. Also see the Salvo Compiler Reference manual for Rowley.

You mentioned that you inherited the project. Does your company have an up-to-date license to Salvo Pro? If so, you'll need to contact us to change the registration info.

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: OSTimer()

Postby FatKid » Wed Jul 20, 2005 7:37 am

Thank you! You solved all my problems. I will look into the Salvo license. I inherited this project from a sub-contractor. So they had Salvo pro. I am using Salvo freeware right now but I am sure we are going to purchase Pro very soon.

Thanks again for your help,

Fk

FK
FatKid
 
Posts: 9
Joined: Thu Jul 14, 2005 11:00 pm
Location: West Chester,Ohio, United States


Return to TI's MSP430

Who is online

Users browsing this forum: No registered users and 2 guests

cron