Tool/software: Code Composer Studio
Hello everyone,
I'm working on scrolling text on my msp430fr6989 launchpad. It's returning an error these errors:
#10010 null: errors encountered during linking; "LCD_2.out" not built LCD_2 C/C++ Problem
<a href="processors.wiki.ti.com/.../10234"> null: unresolved symbols remain LCD_2 C/C++ Problem
gmake: *** [all] Error 2 LCD C/C++ Problem
gmake[1]: *** [LCD.out] Error 1 LCD C/C++ Problem
unresolved symbol mode, first referenced in ./main.obj LCD C/C++ Problem
These 5 errors doesn't point to any lines on code or neither they can be seen on header files I'm using. When I try to debug anyway it returns me an error of :
Encountered a problem loading file: C:\....\CCSWorkspace\LCD\Debug\LCD.out
The file missing is should be a Pspice model file.
I've attached my code files which are not much different than Outofthebox code examples. Just changed it's Initialization part according to my understanding. Thank you.
#include "msp430.h" #include "hal_LCD.h" #include <string.h> /* Clears memories to all 6 digits on the LCD*/ void clearLCD() { LCDMEM[pos1] = LCDBMEM[pos1] = 0; LCDMEM[pos1+1] = LCDBMEM[pos1+1] = 0; LCDMEM[pos2] = LCDBMEM[pos2] = 0; LCDMEM[pos2+1] = LCDBMEM[pos2+1] = 0; LCDMEM[pos3] = LCDBMEM[pos3] = 0; LCDMEM[pos3+1] = LCDBMEM[pos3+1] = 0; LCDMEM[pos4] = LCDBMEM[pos4] = 0; LCDMEM[pos4+1] = LCDBMEM[pos4+1] = 0; LCDMEM[pos5] = LCDBMEM[pos5] = 0; LCDMEM[pos5+1] = LCDBMEM[pos5+1] = 0; LCDMEM[pos6] = LCDBMEM[pos6] = 0; LCDMEM[pos6+1] = LCDBMEM[pos6+1] = 0; LCDM14 = LCDBM14 = 0x00; LCDM18 = LCDBM18 = 0x00; LCDM3 = LCDBM3 = 0x00; } // LCD memory map for numeric digits const char digit[10][2] = { {0xFC, 0x28}, /* "0" LCD segments a+b+c+d+e+f+k+q */ {0x60, 0x20}, /* "1" */ {0xDB, 0x00}, /* "2" */ {0xF3, 0x00}, /* "3" */ {0x67, 0x00}, /* "4" */ {0xB7, 0x00}, /* "5" */ {0xBF, 0x00}, /* "6" */ {0xE4, 0x00}, /* "7" */ {0xFF, 0x00}, /* "8" */ {0xF7, 0x00} /* "9" */ }; // LCD memory map for uppercase letters const char alphabetBig[26][2] = { {0xEF, 0x00}, /* "A" LCD segments a+b+c+e+f+g+m */ {0xF1, 0x50}, /* "B" */ {0x9C, 0x00}, /* "C" */ {0xF0, 0x50}, /* "D" */ {0x9F, 0x00}, /* "E" */ {0x8F, 0x00}, /* "F" */ {0xBD, 0x00}, /* "G" */ {0x6F, 0x00}, /* "H" */ {0x90, 0x50}, /* "I" */ {0x78, 0x00}, /* "J" */ {0x0E, 0x22}, /* "K" */ {0x1C, 0x00}, /* "L" */ {0x6C, 0xA0}, /* "M" */ {0x6C, 0x82}, /* "N" */ {0xFC, 0x00}, /* "O" */ {0xCF, 0x00}, /* "P" */ {0xFC, 0x02}, /* "Q" */ {0xCF, 0x02}, /* "R" */ {0xB7, 0x00}, /* "S" */ {0x80, 0x50}, /* "T" */ {0x7C, 0x00}, /* "U" */ {0x0C, 0x28}, /* "V" */ {0x6C, 0x0A}, /* "W" */ {0x00, 0xAA}, /* "X" */ {0x00, 0xB0}, /* "Y" */ {0x90, 0x28} /* "Z" */ }; void displayscrollText(char *msg) { { int length; int oldmode = mode; int i; int s = 5; length = strlen(msg); char buffer[6] = " "; for (i=0; i<length+7; i++) { if (mode != oldmode) break; int t; for (t=0; t<6; t++) buffer[t] = ' '; int j; for (j=0; j<length; j++) { if (((s+j) >= 0) && ((s+j) < 6)) buffer[s+j] = msg[j]; } s--; showChar(buffer[0], pos1); showChar(buffer[1], pos2); showChar(buffer[2], pos3); showChar(buffer[3], pos4); showChar(buffer[4], pos5); showChar(buffer[5], pos6); __delay_cycles(200000); } } } void Init_LCD() { PJSEL0 = BIT4 | BIT5; // For LFXT // Initialize LCD segments 0 - 21; 26 - 43 LCDCPCTL0 = 0xFFFF; LCDCPCTL1 = 0xFC3F; LCDCPCTL2 = 0x0FFF; // Disable the GPIO power-on default high-impedance mode // to activate previously configured port settings PM5CTL0 &= ~LOCKLPM5; // Configure LFXT 32kHz crystal CSCTL0_H = CSKEY >> 8; // Unlock CS registers CSCTL4 &= ~LFXTOFF; // Enable LFXT do { CSCTL5 &= ~LFXTOFFG; // Clear LFXT fault flag SFRIFG1 &= ~OFIFG; }while (SFRIFG1 & OFIFG); // Test oscillator fault flag CSCTL0_H = 0; // Lock CS registers // Initialize LCD_C // ACLK, Divider = 1, Pre-divider = 16; 4-pin MUX LCDCCTL0 = LCDDIV__1 | LCDPRE__16 | LCD4MUX | LCDLP; // VLCD generated internally, // V2-V4 generated internally, v5 to ground // Set VLCD voltage to 2.60v // Enable charge pump and select internal reference for it LCDCVCTL = VLCD_1 | VLCDREF_0 | LCDCPEN; LCDCCPCTL = LCDCPCLKSYNC; // Clock synchronization enabled LCDCMEMCTL = LCDCLRM; // Clear LCD memory //Turn LCD on LCDCCTL0 |= LCDON; } void showChar(unsigned int c, unsigned int position) { if (c == ' ') { // Display space LCDMEM[position] = 0; LCDMEM[position+1] = 0; } else if (c >= '0' && c <= '9') { // Display digit LCDMEM[position] = digit[c-48][0]; LCDMEM[position+1] = digit[c-48][1]; } else if (c >= 'A' && c <= 'Z') { // Display alphabet LCDMEM[position] = alphabetBig[c-65][0]; LCDMEM[position+1] = alphabetBig[c-65][1]; } else { // Turn all segments on if character is not a space, digit, or uppercase letter LCDMEM[position] = 0xFF; LCDMEM[position+1] = 0xFF; } } void main() { WDTCTL = WDTPW | WDTHOLD; // Stop WDT Init_LCD(); displayscrollText("I AM A LEGEND"); __delay_cycles(50000); }