Other Parts Discussed in Thread: MSP430FR6047
Tool/software: Code Composer Studio
The linker is giving me "undefined symbol" errors on most of the statements in the original post:
#include <msp430.h>
#include <driverlib.h>
#include <stdint.h>
void main(void) {
// WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
WDT_A_hold(WDT_A_BASE);
//P7.5 output
GPIO_setAsOutputPin(GPIO_PORT_P7,GPIO_PIN5);
/*
* Disable the GPIO power-on default high-impedance mode to activate
* previously configured port settings
*/
PMM_unlockLPM5();
while(1)
{
//toggle pins
GPIO_toggleOutputOnPin(GPIO_PORT_P7,GPIO_PIN5);
__delay_cycles(1000000);
}
}
Here are the linker errors:
Building target: "rioGpioBlink01.out"
Invoking: MSP430 Linker
"C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.6.LTS/bin/cl430" -vmspx --data_model=restricted --use_hw_mpy=F5 --advice:power=all --advice:hw_config=all --define=__MSP430FR6047__ --define=_MPU_ENABLE -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 -z -m"rioGpioBlink01.map" --heap_size=160 --stack_size=160 --cinit_hold_wdt=on -i"C:/ti/ccsv8/ccs_base/msp430/include" -i"C:/ti/ccsv8/ccs_base/lib" -i"C:/ti/ccsv8/ccs_base/msp430/lib/5xx_6xx_FRxx" -i"C:/ti/ccsv8/ccs_base/msp430/lib/FR59xx" -i"C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.6.LTS/lib" -i"C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.6.LTS/include" --priority --reread_libs --define=_MPU_ENABLE --diag_wrap=off --display_error_number --warn_sections --xml_link_info="rioGpioBlink01_linkInfo.xml" --use_hw_mpy=F5 --rom_model -o "rioGpioBlink01.out" "./blink.obj" "../lnk_msp430fr6047.cmd" -llibmpu_init.a -llibmath.a -llibc.a
<Linking>
warning #10420-D: For FRAM devices, at start up, the GPIO power-on default high-impedance mode needs to be disabled to activate previously configured port settings. This can be done by clearing the LOCKLPM5 bit in PM5CTL0 register.
undefined first referenced
symbol in file
--------- ----------------
GPIO_setAsOutputPin ./blink.obj
GPIO_toggleOutputOnPin ./blink.obj
PMM_unlockLPM5 ./blink.obj
WDT_A_hold ./blink.obj
To get the program to compile, I had to add a directory to the #include search path so it would find <driverlib.h>
C:\ti\msp\UltrasonicWaterFR604x_02_20_00_04\driverlib\MSP430FR5xx_6xx
${CCS_BASE_ROOT}/msp430/include
${PROJECT_ROOT}
${CG_TOOL_ROOT}/include
Apparently, now the linker isn't finding the correct version of driverlib.lib. Here's the library search path:
${CCS_BASE_ROOT}/msp430/include
${CCS_BASE_ROOT}/lib
${CCS_BASE_ROOT}/msp430/lib/5xx_6xx_FRxx
${CCS_BASE_ROOT}/msp430/lib/FR59xx
${CG_TOOL_ROOT}/lib
${CG_TOOL_ROOT}/include
I guess I'm not sure how the correct versions of the headers and libs were supposed to be installed. Is there a simple way to make sure the correct driverlib is installed and found by the linker?
Thanks!