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.

CCS/TM4C123GH6PM: Help please: Error #10234-D: unresolved symbols, and Error #10010: errors encountered during linking

Part Number: TM4C123GH6PM

Tool/software: Code Composer Studio

Hello, I would appreciate a solution to the following problem:

I have just loaded and updated CCS 7 (Version: 7.1.0.00016 ) on my PC#2 (Win 7), and trying to run the program inserted in this post that is running on another PC#1 (Win 7) of mine running CCS 6.

I do not currently have access to PC#1 as I am currently remote.

I added the main.c file directly into a new Project from the functioning version of this code on PC#1.

When I build the new Project on PC#2 I am receiving the following two errors:

1. Error #10234-D: unresolved symbols

2. Error #10010: errors encountered during linking

BTW, "blinky" loads and runs on my LaunchPad (TM4C123GXL).

Thanks!

Error descriptions:

Properties:

Code

The API's are not highlighting. Possibly I am not referencing the API source library correctly, or at all, or I am using the incorrect compiler, or?

Also, I have removed reference ROM_ to the API's, which was functioning on  my other PC (Win 7) running CCS 6.

* Optocoupler driver (4N25) for N-Channel MOSFET (IRF630) power supply.

 * See schematic: N-channel MOSFET with optocoupler

 * This code uses PWM Module 1 Generator 0 and Generator 3

 * PWM Module 1 Generator 0: M1PWM0, GPIO pin PD0. PWMGenConfigure using PWM_GEN_MODE_DOWN
 	In count down mode, it will count from a value down to zero,
	and then reset to the preset value.
	This will produce left-aligned PWM signals
	(that is the rising edge of the two PWM signals
	produced by the generator will occur at the same time).

 * PWM Module 1 Generator 3: M1PWM6, GPIO pin PF2. PWMGenConfigure using PWM_GEN_MODE_UP_DOWN
 	 In count up/down mode, it will count up from zero to the preset value, count back down to zero,
 	 and then repeat the process. This will produce center-aligned PWM signals
 	 (that is, the middle of the high/low period of the PWM
 	 signals produced by the generator will occur at the same time).*/


#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "driverlib/debug.h"
#include "driverlib/pwm.h"
#include "driverlib/pin_map.h"
#include "inc/hw_gpio.h"  // Not required for this program
//#include "driverlib/rom.h"

int main( void )
{


	// Set-up System Clock (SYSCLK) and PWM Clock (PWMCLK)

    SysCtlClockSet( SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ ); // SYSCLK set to 20 MHz (referred to as "ticks")
    											// TM4C123x_ROM USER’S GUIDE page 199/348
												// TM4C123GH6PM RevE DataSheet, Register 8: Run-Mode Clock Configuration (RCC), offset 0x060
    												// SYSCTL_OSC_MAIN = OSCSRC (Oscillator Source), MOSC (Main oscillator), page 257 / 1409
    												// SYSCTL_XTAL_16MHZ = XTAL (Crystal Value), page 256/1409
    												// SYSCTL_SYSDIV_10 = SYSDIV (System Clock Divisor), page 254/1409
    												// SYSCTL_USE_PLL = USEPWMDIV (Enable PWM Clock Divisor), page 255/1409

    // Set-up PWM Clock (PWMCLK)

    SysCtlPWMClockSet( SYSCTL_PWMDIV_64 ); // Sets the PWM clock by dividing the 20.0 MHz (ticks) SYSCLK by 64 = PWM clock 312.5 KHz [312,500 Hz] (PWMCLK)
    											// TM4C123x_ROM USER’S GUIDE page 217/348
    											// TM4C123GH6PM RevE DataSheet, Register 8: Run-Mode Clock Configuration (RCC), offset 0x060
    											// SYSCTL_PWMDIV_64 = PWMDIV, page 255/1409

    // Enable PWM module 1, Generator 0 to output on GPIO Port D, pin 0, and Generator 3 to output on GPIO Port F, pin 2

    SysCtlPeripheralEnable( SYSCTL_PERIPH_PWM1 ); // Enable the PWM peripheral PWM module 1

    SysCtlPeripheralEnable( SYSCTL_PERIPH_GPIOD ); // Enable GPIO: Port D

    SysCtlPeripheralEnable( SYSCTL_PERIPH_GPIOF ); // Enable GPIO: Port F


/*-----Configure PWM module 1, Generator 0, PWM 1 to output a defined frequency and pulse duty cycle on GPIO GPIO Port D, Pin PD0 M1PWM0 */


    GPIOPinTypePWM( GPIO_PORTD_BASE, GPIO_PIN_0 ); // Configures Port D, Pin 0 for use by the PWM peripheral.
    												//The program loads but will not run on the TM4C123G_LaunchPad when it is a ROM_ API
    												// The program loads and runs on the TM4C123G_LaunchPad when it is a 2.1.3.156 Driver Library API


    GPIOPinConfigure( GPIO_PD0_M1PWM0 ); // Configures the alternate function of Port D, Pin 0 to PWM output
    										 // TM4C123GH6PM Microcontroller Data Sheet-SPMS376E, 23.4 GPIO Pins and Alternate Functions, p1351


    PWMGenConfigure( PWM1_BASE, PWM_GEN_0, PWM_GEN_MODE_DOWN ); // Configures a PWM Module 1, Generator 0. In MODE_DOWN, counts from the PWM generator's Period (load) down to zero,
    																// and then reset to the preset PWM generator's Period (load) value.
    																// Tiva C Series TM4C123x ROM USER’S GUIDE, PWM, 15.2.1.5 ROM_PWMGenConfigure, page 157.
    																// TM4C123GH6PM Microcontroller Data Sheet-SPMS376E, 20.3.2 PWM Timer, p1234 & Figure 20-3. PWM Count-Down Mode, p1235

    PWMGenPeriodSet( PWM1_BASE, PWM_GEN_0, 5208 );  // Sets the PWM Generator 0's Period (load) value. This is the frequency of the square wave.
    													// The Period (load) value is defined as the number of PWM clock ticks between zero pulse signals on the generator block.
    													// PWMCLK frequency [ticks per second (Hz)] = 62,500 ticks per second
    													// PWM Period = (1/f) =  0.0000032 Seconds per tick
    													// Desired frequency [f] = number of Hz
    													// Desired period = (1/f) = Seconds per period
    													// Ticks per desired period = Seconds per period / Seconds per tick
    													// 60 Hz = 5208 ticks

    //ROM_PWMDeadBandEnable(PWM1_BASE, PWM_GEN_0, 1000, 1000);  // Enable the dead-band generation on the PWM0 output signal as a percentage of the PWMGenPeriodSet ticks
    													// % of PWMGenPeriodSet ticks =

    PWMPulseWidthSet( PWM1_BASE, PWM_OUT_0,  ( PWMGenPeriodGet(PWM1_BASE, PWM_GEN_0) / 4) ); // Sets the PWM Generator 0 pulse width output by using PWMGenPeriodGet to get the period previously set.
    																							 // Set Duty Cycle: In this case PWM generator's period is divided the by 10 to get 10% duty cycle.


    PWMOutputState( PWM1_BASE, PWM_OUT_0_BIT, true ); // Enables the output of PWM Module 1, Generator 0



    PWMGenEnable( PWM1_BASE, PWM_GEN_0 );  // Enables the timer/counter for a PWM Module 1, Generator 0

    GPIOPadConfigSet(GPIO_PORTD_BASE, GPIO_PIN_0, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD);    // Enable GPIO Port D Pad and Pins 0 for 8 MA output


/*----- Configure PWM module 1, Generator 3, PWM 1 to output a defined frequency and pulse duty cycle on GPIO Port F, Pin PF2 M1PWM6 --------*/


    GPIOPinTypePWM( GPIO_PORTF_BASE, GPIO_PIN_2 ); // Configures Port F, Pin 2 for use by the PWM peripheral
    												//The program loads but will not run on the TM4C123G_LaunchPad when it is a ROM_ API
    												// The program loads and runs on the TM4C123G_LaunchPad when it is a 2.1.3.156 Driver Library API


    GPIOPinConfigure( GPIO_PF2_M1PWM6 ); // Configures the alternate function of Port F, Pin 0 to PWM output
    										 // TM4C123GH6PM Microcontroller Data Sheet-SPMS376E, 23.4 GPIO Pins and Alternate Functions, p1351

    PWMGenConfigure( PWM1_BASE, PWM_GEN_3, PWM_GEN_MODE_UP_DOWN ); // Configures a PWM Module 1, Generator 2. In MODE_UP_DOWN, counts from the PWM generator's Period (load) down to zero,
    																	/*In count up/down mode, it will count up from zero to the preset value,
    																	count back down to zero, and then repeat the process.
    																	This will produce center-aligned PWM signals
    																	(that is, the middle of the high/low period of the PWM
    																	signals produced by the generator will occur at the same time).*/
    																// Tiva C Series TM4C123x ROM USER’S GUIDE, PWM, 15.2.1.5 ROM_PWMGenConfigure, page 157
    																// TM4C123GH6PM Microcontroller Data Sheet-SPMS376E, 20.3.2 PWM Timer, p1234 & Figure 20-4. PWM Count-Up/Down Mode, p1235


    PWMGenPeriodSet( PWM1_BASE, PWM_GEN_3, 5208 );  // Sets the PWM Generator 0's Period (load) value. This is the frequency of the square wave.
    													// The Period (load) value is defined as the number of PWM clock ticks between zero pulse signals on the generator block.
    													// PWMCLK frequency [ticks per second (Hz)] = 62,500 ticks per second
    													// PWM Period = (1/f) =  0.0000032 Seconds per tick
    													// Desired frequency [f] = number of Hz
    													// Desired period = (1/f) = Seconds per period
    													// Ticks per desired period = Seconds per period / Seconds per tick
    													// 60 Hz = 5208 ticks

    PWMDeadBandEnable(PWM1_BASE, PWM_GEN_3, 200, 200);  // Enable the dead-band generation on the PWM0 output signal as a percentage of the PWMGenPeriodSet ticks
    													// % of PWMGenPeriodSet ticks =

    PWMPulseWidthSet( PWM1_BASE, PWM_OUT_6,  ( PWMGenPeriodGet(PWM1_BASE, PWM_GEN_3) / 4 ) ); // Sets the PWM Generator 0 pulse width output (Duty Cycle) by using PWMGenPeriodGet to get the period previously set.
    																							 // In this case PWM generator's period is divided the by 10 to get 10% duty cycle.

 //ROM_PWMOutputInvert(PWM1_BASE, PWM_OUT_0_BIT, true);   // Inverts the output of PWM Module 1, Generator 0, Bit 1
 //(This function is not needed as a PWM's Generators two outputs are mutually inverted)

    PWMOutputState( PWM1_BASE, PWM_OUT_6_BIT, true ); // Enables the output of PWM Module 1, Generator 2, PWM 4

    PWMGenEnable( PWM1_BASE, PWM_GEN_3 );  // Enables the timer/counter for a PWM Module 1, Generator 0

    GPIOPadConfigSet(GPIO_PORTF_BASE, GPIO_PIN_2, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD);    // Enable GPIO Port F Pad and Pin 0 for 8 MA output


    while( 1 ) {
        ;
    }
}

  • Robert,

    Do you have TivaWare installed? The project is making use of driverlib which comes as part of TivaWare. I can see from your include options that there is a reference to a tivaware installation. Is that the path where it is installed? Did you also update the linker search path to point to this location? In the project options under ARM Linker -> File Search path there should be an entry at the top for driverlib.

    Regards,
    John
  • Hi John,

    Thanks for your prompt reply, that did it!
    Your good and clear answer is greatly appreciated.

    My intent is to setup projects such that they are easily moved between my tow PC's.
    I am working on understanding how to configure the development environment, and how to appropriately use Path and Build Variables. I am reading over the documentation, there's a lot of it and it's complex.
    Your suggestions will be appreciated.

    Thanks again, Bob
  • Bob,

    There are some guidelines on making portable projects here:

    processors.wiki.ti.com/.../Portable_Projects

    Personally I would likely put tivaware and the project in source control in a structure something like this

    \
    \tivaware
    \project1
    \project2

    This way you can have the project(s) reference tivaware with a relative path. Alternatively tivaware could be installed anywhere and you could just have a variable that stores the location and then each user can define that variable in their workspace.

    Regards,
    John
  • Hi John,

    Thanks again for guidance you have provided me, it’s been very helpful. I’m learning a lot.

    I have a few more questions if you will indulge me. Yesterday I spent a considerable amount of time working with the Portable Projects document, carefully following, and re-following, the information starting with the section “Portable Projects in CCSv5” as recommended in the section “Portable Projects in CCSv6”.  By the way, I have installed and using a fully updated version of CCSv7.

    My goal is to have CCSv7 configured on my two PC’s such that I can easily work on the same projects on either machine in either location.  I spend half my time in Vancouver, BC and the other half in a city south of Seattle.  I have development “labs” at both locations.  The “labs” are quite modest, a good Agilent scope, differential probe, logic analyzer, meters and various PCB construction tools. I am designing and building the hardware also.  I have a second generation prototype running, a photo inserted below. 

    Now, finally down to the questions:

    1. For some reason I am having a difficult time understanding and using Path Variables and Build Variables.  I am missing the point somehow; please review the following comments and their questions.

    2. Per the Portable Projects section “In CCSv6.1.x, the interface is further improved such that the variable can be set in one place at the workspace level and it will automatically be propagated as both Path variable and Build variable for all projects in the workspace.”

    2.1.   Is this true for CCSv7?

    2.2.   When I follow the above documentation to make any version of TIVAWARE a workspace level variable it does not propagate and does not appear in the Includes folder of a project.

    2.2.1.In order to do so I must use the following path: “project name”>Properties>CCS Build>Include Options and add the path in the top section. Is this the only method to do so?  If not, how is it done?

    3. I attempted to do the same with the driverlib.lib file.  The only way I could have it accessible to the project is to use the following path: “project name”>Properties>CCS Build>ARM Linker>File Search Path and add the path in the top section. Is this the only method to do so?  If not, how is it done?

    4. Once the TIVAWARE (I tried both 1.1 and 2.1.4.178), and driverlib.lib were accessible to the project I copied the main.c file into the project. Using the debugger it built and loaded into the target (EK-TM4C123GL). However, when I clicked the green “Resume” button the EXIT.C v16.9.3 file opens, and the code does not start to run on the target. I searched the Forum, but did not find a way to solve this problem.

    4.1 When I either press the reset button on the target board or click the red “Terminate” button the code runs.  How do I resolve this issue?  It did not do this when I was using my CSSv6 install with the same main.c; I must have something not configured correctly?

    If you have the time I will greatly appreciate you guidance with resolving the above issues.

    Thanks again, Bob

    Project photo: MOSFET_Optoisolator HV-Low Current Power Supply

  • Sorry for the slow reply.  I have been having trouble logging into E2E today.

    In the Eclipse framework that we use build variables and resource path variables are different entities.  However we have found that when you want one you also want the other so in CCSv6.1.3 and later (including 7.x) if you setup one it creates the other automatically.

    Resource Path variables are for when you have source files outside of your project directory.  You can use a variable as part of the path. Build variables are used by the build tools when building, typically within the include path options.

    The variables themselves don’t show up automatically in the include paths.  You need to add the paths that you want directly.  Often the variable is part of the path like ${Tivaware}/include for the compiler include path and ${Tivaware}/lib for the linker include path.  The variable itself is just a string and not necessarily a full path.

    For driverlib you would want to have it setup something like the way libc.a is in this project.  The name of the library is in the top box and then its location is in the bottom one.  In this case its location is ${CG_TOOL_ROOT}/lib

    I may need to pull in some help for the other question on running.  If exit.c is opening that implies that the program has run to the exit label.

    Regards,

    John

  • Hi John,

    Thanks for your very helpful guidance.

    I haven't had any lab time since Friday night, as my wife has a very full social calendar planned for us this weekend. So it's not likely that I will be able to sneak in any lab time until Monday evening.  I'm anxious to work on the File Search path procedure you have provided. 

    Also, I'm looking forward to your comments about exit.c.

    Thanks again, Bob

  • Robert Samuel said:
    Also, I'm looking forward to your comments about exit.c.

    The exit function will be called if main() returns. Do you still have the empty while loop at the end of main function as shown in your first post?

    [With a SYS/BIOS or TI-RTOS program exit will also be called if the SYS/BIOS Kernel detects an error, but your code looks to just be using TivaWare so doesn't apply]