Hi, I am working with a few functions from the math.h library but I am unable to see the results of the functions when i debug.
The functions and variables compile and load, but in CCS while debugging I cannot see the variables in the variables tab and when i add them to the watch window they They appear to compile and load, but the variables that the type is unknown and the identifier is not found.
What do i need to do to see the results of these functions.
Here's the code.
#include <msp430.h>
#include <math.h>
// *************************************************************************************************
// Prototypes section
void math_func(void);
int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
math_func();
//float p = exp(0);
//float c = acos(0.5);
P1DIR |= 0x01; // Set P1.0 to output direction
for (;;)
{
volatile unsigned int i; // volatile to prevent optimization
P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR
i = 10000; // SW Delay
do i--;
while (i != 0);
}
}
#pragma CODE_SECTION(math_func, ".data")
void math_func(void)
{
float volt;
double p = exp(0);
double c = acos(0.5);
volt = (float) (512*0.0034799); // = 1.781733...
volt = volt * 1000;// => volt = 1781
}