> Yes, this is a Newbie question. I'm trying to
compile in Crossworks
> the RTC library written for the IAR compiler in TI doc SLAA290.
>
> http://focus.ti.com/lit/an/slaa290/slaa290.pdf
>
> I've got a main.c file containing the code from page 2 of the
> document with appropriate changes for Crossworks shown below.
Perhaps you should ask at the CrossWorks Help Desk? As an evaluator or
licensed user you could ask there. Of course, that would mean you needed to
be one of those things. :-)
Your translation is incorrect in many ways.
--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
I've got a main.c file containing the code from page 2 of the
document with appropriate changes for Crossworks shown below.
#include
#include "RTC.h"
void main ( void )
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
setTime( 0x12, 0, 0, 0); // initialize time to 12:00:00 AM
P1DIR |= 0x01; // Set P1.0 to output direction
CCR0 = 32768-1;
TACTL = TASSEL_1+MC_1; // ACLK, upmode
CCTL0 |= CCIE; // enable CCRO interrupt
_EINT();
while( 1 )
{
LPM3; // enter LPM3, clock will be updated
P1OUT ^= 0x01; // do any other needed items in loop
_NOP(); // set breakpoint here to see 1 second int.
}
}
void Timer_A0(void)__interrupt[TIMERA0_VECTOR]
{
incrementSeconds();
LPM3_EXIT;
}
I've had to changed some of the assembly to the corrent format for
Crossworks, but I'm missing something because I keep getting the
error "undefined symbol '_incrementSeconds'" from Crossworks.
I changed this:
;Variables
MODULE RTC
PUBLIC TI_second
PUBLIC TI_minute
PUBLIC TI_hour
PUBLIC TI_PM
;Functions
PUBLIC incrementSeconds
PUBLIC incrementMinutes
PUBLIC incrementHours
PUBLIC get24Hour
;Variables
;MODULE RTC
PUBLIC TI_second
PUBLIC TI_minute
PUBLIC TI_hour
PUBLIC TI_PM
;Functions
PUBLIC incrementSeconds
PUBLIC incrementMinutes
PUBLIC incrementHours
PUBLIC get24Hour