The sin function works just fine. When I add the pow function in, the compiler gives me the following errors
errors encountered during linking; “Project010MathFunctions.out” not built
placement fails for object “.text”,
placement fails for object “.text”, size 0xa2e (page 0). Available ranges: FLASH size: 0x7e0 unused: 0x7b6 max hole: 0x7b6
// Written on CCS 4.x
//*****************************************************************************
#include “msp430g2211.h”
#include “float.h”
#include “math.h”
volatile float fTest = 0;
volatile double dTest = (45 * 3.1415926 / 180);
volatile double dResult1;
volatile double dResult2;
volatile double a = 2;
volatile double b = 2;
const unsigned int ctest = 100;
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Hold watchdog timer.
// Port setups.
// Port 1 P1.3 is already wired to a SMD switch SW2.
P1DIR = 0xFF - BIT3; // Pins to be outputs
P1IE = BIT3;
P1OUT = 0;
// GIE must be enabled to allow any ISR to work. Can also be set by
// the command _enable_interrupts(void) and intrinsics.h must be included
_BIS_SR(GIE); // interrupt
for(;
{
}
}
// Interrupt service routine for Port 1
#pragma vector = PORT1_VECTOR
__interrupt void Port_1(void)
{
_BIC_SR(GIE); // Dis-allow interrupts
P1IFG = 0;
dResult1 = sin(dTest);
dResult2 = pow(a,b);
_BIS_SR(GIE); // interrupt
}