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.

compile error

Other Parts Discussed in Thread: EK-LM3S9D92

Hi

I installed Stellarisware on a computer and imported the blinky project in CCS and managed to compile and run on the EKS-LM3S9D92 with ICDI.

Now I need to work on a different computer so i copied the project folder and imported it in CCS on that computer. I get the following error when i try to build it.

gmake: *** No rule to make target `../blinky_ccs.cmd', needed by `blinky.out'.
gmake: *** No rule to make target `../blinky.c', needed by `blinky.obj'. 
gmake: *** No rule to make target `../startup_ccs.c', needed by `startup_ccs.obj'. 

How should I resolve this?

Thanks

  • Hi Enyu,

    what steps did you take to migrate the project?

    Chances are you need to add/check/correct your include paths and variables.  Please have a look at the below two wikis and keep us informed whether they help

    http://processors.wiki.ti.com/index.php/Include_paths_and_options

    http://processors.wiki.ti.com/index.php/Portable_Projects

    Best Regards,
    Lisa

  • Hi Lisa,

    Stellarisware is installed in the 1st computer in C:/StellarisWare/ and I have imported the example application from C:/StellarisWare/boards/ek-lm3s9d92/blinky to my workspace. CCS automatically copied the files to my workspace and everything ran well.

    On the second computer, I did not install Stellarisware. Instead, I copied C:/StellarisWare/ from the 1st computer to the 2nd computer. And then i did the same thing, importing  U:/StellarisWare/boards/ek-lm3s9d92/blinky into the workspace. This time it could not compile.

    The version of CCS in the 1st computer is 5.2.1. The version of CCS in the 2nd computer is 5.1.1. 

  • Hi Enyu,

    I suspect your problems could be from the older/mixed versions being used.   If possible I would recommend making sure each PC has a clean fresh installation (no update) of the latest version of CCS (v5.3) and Stellarisware.

    At the very least I think pc 2 has the problem due to the old version.

    Best REgards,
    Lisa

  • Hi Lisa,

    yea i gave up working on pc2.

    Right now i have another problem, I have created a new project for LM3S9D92, added "C:/Stellaris" in the includes, and also the "${SW_ROOT}/driverlib/ccs-cm3/Debug/driverlib-cm3.lib" in the library, where SW_ROOT is variable with value = "C:/Stellaris".

    I copied the code from the pwmgen example which has the necessary #include "....h"

    When it compiles, i get identifiers undefined and warnings of functions declared implicitly. Like as if the includes did not work.

    What else could i have missed out here?

    Thanks

    Enyu

  • Hi Enyu,

    can you please post the exact error/console output.

    Best Regards,

    Lisa

  • **** Build of configuration Debug for project MotorControl ****

    C:\ti\ccsv5\utils\bin\gmake -k main.obj
    'Building file: ../main.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/tms470_4.9.5/bin/cl470" -mv7M3 --code_state=16 --abi=eabi -me -g --include_path="C:/ti/ccsv5/tools/compiler/tms470_4.9.5/include" --include_path="C:/StellarisWare" --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="main.pp"  "../main.c"
    "../main.c", line 41: warning #225-D: function declared implicitly

    >> Compilation failure
    "../main.c", line 43: warning #225-D: function declared implicitly
    "../main.c", line 46: warning #225-D: function declared implicitly
    "../main.c", line 47: error #20: identifier "GPIO_PA0_U0RX" is undefined
    "../main.c", line 48: error #20: identifier "GPIO_PA1_U0TX" is undefined
    "../main.c", line 49: warning #225-D: function declared implicitly
    "../main.c", line 61: error #20: identifier "GPIO_PD0_PWM0" is undefined
    "../main.c", line 62: error #20: identifier "GPIO_PD1_PWM1" is undefined
    "../main.c", line 63: warning #225-D: function declared implicitly
    "../main.c", line 66: warning #225-D: function declared implicitly
    "../main.c", line 69: warning #225-D: function declared implicitly
    "../main.c", line 71: warning #225-D: function declared implicitly
    "../main.c", line 74: warning #225-D: function declared implicitly
    "../main.c", line 78: warning #225-D: function declared implicitly
    "../main.c", line 81: warning #225-D: function declared implicitly
    4 errors detected in the compilation of "../main.c".
    gmake: *** [main.obj] Error 1

    **** Build Finished ****

    and here is the code:


    #include "inc/lm3s9d92.h"
    #include "inc/hw_ints.h"
    #include "inc/hw_memmap.h"
    #include "inc/hw_types.h"
    #include "driverlib/debug.h"
    #include "driverlib/gpio.h"
    #include "driverlib/interrupt.h"
    #include "driverlib/pin_map.h"
    #include "driverlib/pwm.h"
    #include "driverlib/rom.h"
    #include "driverlib/sysctl.h"
    #include "utils/uartstdio.h"
    #include "driverlib/uart.h"


    void init(void);

    void main(void) {
        init();
        while(1);
    }

    void init(){
        unsigned long ulPeriod;

        // Set the clocking to run directly from the crystal.
        ROM_SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
                           SYSCTL_XTAL_16MHZ);
        ROM_SysCtlPWMClockSet(SYSCTL_PWMDIV_1);

        // Initialize the UART.
        ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
        GPIOPinConfigure(GPIO_PA0_U0RX);
        GPIOPinConfigure(GPIO_PA1_U0TX);
        ROM_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
        UARTStdioInit(0);

        // Tell the user what is happening.
        UARTprintf("\033[2JGenerating PWM on PD0 and PD1\n");

        // Enable the peripherals used by this example.
        ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_PWM0);
        ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);

        // Set GPIO D0 and D1 as PWM pins.  They are used to output the PWM0 and
        // PWM1 signals.
        GPIOPinConfigure(GPIO_PD0_PWM0);
        GPIOPinConfigure(GPIO_PD1_PWM1);
        ROM_GPIOPinTypePWM(GPIO_PORTD_BASE, GPIO_PIN_0 | GPIO_PIN_1);

        // Compute the PWM period based on the system clock.
        ulPeriod = ROM_SysCtlClockGet() / 440;

        // Set the PWM period to 440 (A) Hz.
        ROM_PWMGenConfigure(PWM0_BASE, PWM_GEN_0,
                            PWM_GEN_MODE_UP_DOWN | PWM_GEN_MODE_NO_SYNC);
        ROM_PWMGenPeriodSet(PWM0_BASE, PWM_GEN_0, ulPeriod);

        // Set PWM0 to a duty cycle of 25% and PWM1 to a duty cycle of 75%.
        ROM_PWMPulseWidthSet(PWM0_BASE, PWM_OUT_0, ulPeriod / 4);
        ROM_PWMPulseWidthSet(PWM0_BASE, PWM_OUT_1, (ulPeriod * 3) / 4);

        // Enable the PWM0 and PWM1 output signals.
        ROM_PWMOutputState(PWM0_BASE, PWM_OUT_0_BIT | PWM_OUT_1_BIT, true);

        // Enable the PWM generator.
        ROM_PWMGenEnable(PWM0_BASE, PWM_GEN_0);
    }

  • Hi Enyu,

    please check the include option in your compiler options as per this wiki I previously sent.

    http://processors.wiki.ti.com/index.php/Include_paths_and_options

    The paths to any header and source files you have copied into/created etc in your project should be there.

    Best Regards,
    Lisa

  • The following are the settings that I have set and it is exactly the same as from the example code:

  • Opps the images did not appear on the previous post

  • Hi Enyu,

    a couple things.   You seem very much to be on the correct path but perhaps there are still some items missing.

    I only noticed two things at a first look

    - there are two path variables pointing to C:/StellarisWare

    - you might want to add the path the library in the file search path screen.  It is missing from the bottom portion

    Best Regards,
    Lisa

  • Hi Lisa,

    I tried making the changes you suggested and I still get the same errors.

    Enyu

  • Hi Enyu,

    I suspect you are still missing at least one required library in your project.  GPIO for example ... notice those functions are not defined.

    Unfortunately, Stellarisware comes from the Stellaris team and they would much better know what is dependant on what.

    I really also would recommend

    1 - using the latest version of CCS

    2 - starting with an unmodified example to see the dependancies and setup

    Best Regards,

    Lisa

  • Hi Lisa,

    The problem is solved, its actually the predefined symbols under advanced options.

    Thanks for your help anyway.

    Enyu

  • Hi Enyu,

    ok, great, very glad to hear.   Thanks for the update and patience.   I understand that using some of these example suites should be somewhat better documented.

    All the best with development.

    Best Regards,
    Lisa