This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am using MSP430FR6989. With Code Composer V6.1.1. How can I get the MSPMATHLIB to work. I have followed instructions from SLAU499 to ADD "MSPMATHLIB_CCS_msp430_5xx_6xx_FRxx_small_code_small_dada.lib" into Project Explorer and replace <math.h> with "msp430_math.h".
But "msp430_math.h" is not found by the linker.
Where Can I find the user guide of MSPMATLIB?
Thanks
Code Composer user guide section 2.1.3 instructs:
To enable MSPMathlib: Add libmath.a under Project → Properties → Build → MSP430 Linker → File
Search Path in the "Include library file or command file as input (--library, -l)" field. Important: Put
libmath.a before other libraries that may be listed here.
Within MSP430Linker there is no Search Path that allow us to inlude library command.
Inside MSP430 Linker window : We see configuration, command, and command-line pattern, and Summary Of flags set.
Where do I include libmath.a
Please help
Hi Wing,
Please expand the drop down menu to see the option for File Search Path. Once you have opened File Search Path you should be able to add libmath.a to the section "Include library file or command file as input (--library, -l)." Please make sure that you move libmath.a above all other libraries listed here.
Below are some screenshots:
I have to add #include<math.h> to the main C source code to get line 11 to compiler correctly.
I am not sure whether math.h is the correct file to include.
Thanks for your help.
include <stdio.h>
#include <msp430FR6989.h>
#include <math.h>
/*
* hello.c
*/
float result;
int main(void) {
PM5CTL0 &=~LOCKLPM5;
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
result = exp(1);// seem working but not sure whether this is from MSPMATLIB
printf("Hello World!\n");//This is working
printf("float %f\n",result);//No value has printed out
printf("float exp %e\n",result);//No value has printed out
printf("float %g\n",result);//No value has printed out
printf("float exp %G\n",result);//No value has printed out
printf(" integer %d\n",(int)result);//Correct. 2 was printed
return 0;
}
//display show at console
Hello World!
float
float exp
float
float exp
integer 2
**Attention** This is a public forum