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.

RTOS Project Build Problem with TM4C123G Launch Pad

Other Parts Discussed in Thread: SYSBIOS, TM4C123GH6PM, EK-TM4C123GXL

Hi All,

 I was working on a RTOS project with TM4C123G Launch Pad.The project is Blinking an LED.Below is the code for the project;

When i initialy tried to build the project the errors were about the missing include files xdc/std.h, ti/sysbios/BIOS.h and xdc/cfg/global.h.After manually giving the paths for these files now there is another error as ;


#1965 cannot open source file "ti/targets/select.h" main.c /RTOS_1 line 86, external location: C:\ti\xdctools_3_25_03_72\packages\xdc\std.h C/C++ Problem

 

But the weird thing is there is no source file "ti/targets/select.h" as menitoned on line 86.

What am i doing wrong can some one help on this issue?

 

Thanks in advance

Kutlu

 

//----------------------------------------
// BIOS header files
//----------------------------------------
#include <xdc/std.h> //mandatory - have to include first, for BIOS types
#include <ti/sysbios/BIOS.h> //mandatory - if you call APIs like BIOS_start()
#include <xdc/cfg/global.h> //header file for statically defined objects/handles
#include <xdc/runtime/Log.h> //used for Log_info() calls


//------------------------------------------
// TivaWare Header Files
//------------------------------------------
#include <stdint.h>
#include <stdbool.h>

#include "inc/hw_types.h"
#include "inc/hw_memmap.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "inc/hw_ints.h"
#include "driverlib/interrupt.h"
#include "driverlib/timer.h"
#include <time.h>


//----------------------------------------
// Prototypes
//----------------------------------------
void hardware_init(void);
void ledToggle(void);
void delay(void);


//---------------------------------------
// Globals
//---------------------------------------
volatile int16_t i16ToggleCount = 0;


//---------------------------------------------------------------------------
// main()
//---------------------------------------------------------------------------
void main(void)
{

hardware_init(); // init hardware via Xware

BIOS_start();

}


//---------------------------------------------------------------------------
// hardware_init()
//
// inits GPIO pins for toggling the LED
//---------------------------------------------------------------------------
void hardware_init(void)
{
//Set CPU Clock to 40MHz. 400MHz PLL/2 = 200 DIV 5 = 40MHz
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);

// ADD Tiva-C GPIO setup - enables port, sets pins 1-3 (RGB) pins for output
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3);

// Turn on the LED
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, 4);

}


//---------------------------------------------------------------------------
// ledToggle()
//
// toggles LED on Tiva-C LaunchPad
//---------------------------------------------------------------------------
void ledToggle(void)
{
// LED values - 2=RED, 4=BLUE, 8=GREEN
if(GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_2))
{
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, 0);
}
else
{
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2, 4);
}

delay(); // create a delay of ~1/2sec

i16ToggleCount += 1; // keep track of #toggles

Log_info1("LED TOGGLED [%u] TIMES",i16ToggleCount);

}

//---------------------------------------------------------------------------
// delay()
//
// Creates a 500ms delay via TivaWare fxn
//---------------------------------------------------------------------------
void delay(void)
{
SysCtlDelay(5000000); // creates ~500ms delay - TivaWare fxn

}

  • Kutlu ZUNGUR said:

    #1965 cannot open source file "ti/targets/select.h" main.c /RTOS_1 line 86, external location: C:\ti\xdctools_3_25_03_72\packages\xdc\std.h C/C++ Problem

    But the weird thing is there is no source file "ti/targets/select.h" as menitoned on line 86.

    What am i doing wrong can some one help on this issue?

    The file std.h includes <ti/targets/select.h> at line 86. Are you saying that you do not have a file named select.h in your installation at all? The file would be in the folder C:\ti\xdctools_3_25_03_72\packages\ti\targets. I don't have that exact version of XDCtools installed, but I checked in my version 3.25.04.88 and it is there.

    Do you have that path being passed to the --xdcpath option?
    Can you copy and paste the complete otuput of the build console to a text file and attach it here?

  • Dear AartiG;

    Below is the console output of CCS.This time before the buid process i removed al the paths that i have given manually before.

    This time the error is different.

    **** Build of configuration Debug for project RTOS_1 ****

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
    making ../src/sysbios.aem4f ...
    gmake[1]: Nothing to be done for `all'.
    'Building file: ../app.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_25_03_72/xs" --xdcpath="C:/ti/bios_6_35_04_50/packages;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4F -p ti.platforms.stellaris:TM4C123GH6PM -r release -c "C:/ti/ccsv5/tools/compiler/arm_5.1.1" --compileOptions "-g --optimize_with_debug""..app.cfg""../app.cfg"
    xdc.tools.configuro: missing input config script
    Usage: xs xdc.tools.configuro [--help]
    [-v | -q]
    [-@ optionsfile]
    [-o outdir]
    [-b config_bld | -c codegen_dir | --cb]
    [-t target] [-p platform[:instance]] [-r profile]
    [-Dname=value]
    [-w | -x regexp]
    [--rtsName pkg_name]
    [--cfgArgs args_string]
    [--linkTemplate linker_template]
    [--pkg] [--generationOnly]
    [--compileOptions compile_options_string]
    [--oc compiler.opt] [--ol linker.cmd]
    infile.cfg
    'Finished building: ../app.cfg'
    ' '
    'Building file: ../main.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" -g --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile --preproc_dependency="main.pp" --cmd_file="./configPkg/compiler.opt" "../main.c"
    >> ERROR: Cannot open command file './configPkg/compiler.opt': No such file or directory
    "../main.c", line 11: fatal error #1965: cannot open source file "xdc/std.h"
    1 catastrophic error detected in the compilation of "../main.c".

    Compilation terminated.
    >> Compilation failure
    gmake: *** [main.obj] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

  • I thnk this question can be more quickly and better answered by the folks in the TI-RTOS forum, therefore I will move this thread to that forum.

  • Hi Kutlu,

    Which version of TI-RTOS are you using?

    Which version of CCS are you using?

    Can you right click on your project and select "build options"?  Under the build options:

    • which version of XDC Tools do you have selected?
    • which version of TI-RTOS is selected?

    After you've checked the above ...

    Can you please try the following:

    1. In CCS, create a new workspace (File -> switch workspace -> other)
    2. Open CCS resource explorer.  It may already be open automatically in your new workspace, but if not then (View -> TI Resource Explorer)
    3. Use the Resource Explorer to import a fresh version of the example:
      1. Select "Examples"
      2. Navigate to TI-RTOS -> ARM -> Tiva C Series -> Tiva TM4C123GH6PM -> EK-TM4C123GXL LaunchPad -> Watchdog Examples -> Watchdog
      3. Select "import the example project into CCS"
      4. build the example

    After the above steps, does the Watchdog example build?

    If so, I think you should check the Watchdog's build settings against your (problematic) project's build settings.

    For example, look at the compiler and linker include paths, pre-defined symbols, other settings in the Watchdog's build settings.

    If you see anything that the Watchdog example has, but your project does not, then try to add those settings into your project.

    Steve

  • Hi Steve,

    I have re installed TI RTOS in C/ti folder. I have created a new RTOS project with empty.min.c project file given in the examples and succeeded to build this project and blink the LED on the TM4C123GXL Launchpad.

    Below is the xdc path given under Build--> xdc tools

    xdcpath="C:/ti/tirtos_1_21_00_09/packages;C:/ti/tirtos_1_21_00_09/products/bios_6_37_00_20/packages;C:/ti/tirtos_1_21_00_09/products/ipc_3_10_01_11/packages;C:/ti/tirtos_1_21_00_09/products/ndk_2_23_01_01/packages;C:/ti/tirtos_1_21_00_09/products/uia_1_04_00_06/packages;C:/ti/ccsv5/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4F -p ti.platforms.tiva:TM4C123GH6PM -r release -c "C:/ti/ccsv5/tools/compiler/arm_5.1.1"

    I am using CCS V5 and xdc tools is 3.25.3.72. RTOS is 1.21.0.09;

    Anyway as i said i did not have bıid problem after re installing RTOS in the ti folder.

    However this time a have another issue with the TI Resource explorer.I tride to download the watchdog example from the Resource Explorer but it seems the window is no active.I get the attached screen shot whenever i open an example project whatever the project type is.

    Thanks,Kutlu

  • Kutlu,

    Kutlu ZUNGUR said:
    However this time a have another issue with the TI Resource explorer.I tride to download the watchdog example from the Resource Explorer but it seems the window is no active.I get the attached screen shot whenever i open an example project whatever the project type is.

    Can you open a new forum post for this?

    Also, I think you may have forgotten to attach the screen shot.

    Steve