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/DK-TM4C129X: tiva c series arm MCU

Part Number: DK-TM4C129X

Tool/software: TI-RTOS

hello :)

i am new with MCU 

and i am trying to find examples to download from the website.

i am working with TIVA-C TM4C129X Developement board

and with IAR embedded workbanch

can someone direct me from where do download this.

thanks.

  • Hi,

     Please refer to this Wiki link for IAR TI-RTOS support.

     If you are using CCS, you can import TI-RTOS examples from from CCS.

  • thanks for the reply. 

    i saw examples that didnt use TI RTOS.

    what is the differece between uisng it and TI stellaris for example?

    i have IAR 8.32.1 and i downloaded the examples foe the IAR IDE, when i try to run it, i get linking error. 

    "could not open file... driverlib.a"

    i didnt change anything and it didnt work. 

    any ideas how to resolve this issue?

  • Hi,

     First of all, if you are using the Tiva C series processor you should use the TivaWare library. The TivaWare can be downloaded from . The TivaWare libary contains the hardware peripheral drivers as well as examples, documentation, tools and many things else. The examples contained in the TivaWare are not TI-RTOS based. TI-RTOS is an real time operating system developed by TI. Many people can develop their application without the OS. It depends on your application needs. If you require TI_RTOS then the examples I showed you in my earlier reply are examples developed for the TI-RTOS. You can also reference them.

     For non-TIRTOS examples for IAR you can find the driverlib.a in the <TivaWare_Installation>/driverlib/ewarm/Exe/driverlib.a. I'm not familiar with IAR IDE. But in your IAR linker configuration/setup you will need to specify the driverlib.a as the library and the <TivaWare_Installation>/driverlib/ewarm/Exe as the searchpath. 

  • thanks again for the response. 

    i solved my linking problem. apparently the example uses project libraries inside the project and

    i have to run first driverlib and grlib in the example. they creat a driverlib,a  & glib.a files indise each Output folder of the sub project library.  only after that i need to run the main.c file.

    now i am facing a different issue. 

            1. in the example that i downloaded from the IDE everything works and  i am using interrupts. 

    i tried to write my own code.

    when i write the command: " ROM_IntMasterEnable() " (in order to enable interrupts in the cpu)

    i get an error : "  no definition for "ROM_IntMasterEnable" , but i did include the rom.h heather file with the definition. 

    what am i missing?

    2. i also tried to work with tiva peripheral driver library. when i tried to write the command : " IntMasterEnable()" i got the error: "no definition for CPUcpsie" 

    from looking in interrupt.c file, the function calls "CPUcpsie", the macro definition of CPUcpsie is in cpu.c file. 

    i included both files to the project. 

    i will add my code in the next message. 

    best regards, 

    Eliran.

  • my code:


    #include <stdio.h>
    #include <stdint.h>
    #include <stdbool.h>
    #include <stdint.h>
    #include "driverlib/rom.h"
    #include "driverlib/rom_map.h"
    #include "driverlib/sysctl.h"
    #include "driverlib/gpio.h"
    #include "driverlib/interrupt.h"
    #include "driverlib/cpu.h"
    #include "inc/hw_ints.h"
    #include "inc/hw_memmap.h"
    #include "inc/hw_nvic.h"
    #include "inc/hw_types.h"
    //#include "grlib/grlib.h"
    //#include "drivers/frame.h"
    //#include "drivers/kentec320x240x16_ssd2119.h"
    //#include "drivers/pinout.h"
    //#include "inc/tm4c129xnczad.h"


    /* 
    PN5= RED LED
    PQ4= BLUE LED
    PQ7= GREEN LED
    PN3= SW2
    */


    // PROTOTYPE FUNCTIONS

    void delay(unsigned int x);
    void INT_SW2(void);
    int main()
    {
     
      // set clock
      SysCtlClockFreqSet(SYSCTL_OSC_INT|SYSCTL_USE_PLL|SYSCTL_CFG_VCO_320,4000000);
     
     
      // ACTIVATE GPIO IN SYSTEM CONTROL
      SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);
      SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOQ);
     
      while(!SysCtlPeripheralReady(SYSCTL_PERIPH_GPION));
      while(!SysCtlPeripheralReady(SYSCTL_PERIPH_GPIOQ));
     
      GPIODirModeSet(GPIO_PORTN_BASE,GPIO_PIN_5,GPIO_DIR_MODE_OUT);
      GPIODirModeSet(GPIO_PORTQ_BASE,GPIO_PIN_4,GPIO_DIR_MODE_OUT);
      GPIODirModeSet(GPIO_PORTQ_BASE,GPIO_PIN_7,GPIO_DIR_MODE_OUT);
      GPIODirModeSet(GPIO_PORTN_BASE,GPIO_PIN_3,GPIO_DIR_MODE_IN);     // SW2 IS INPUT FOR INTERRUPT
     
      GPIOPadConfigSet(GPIO_PORTN_BASE,GPIO_PIN_5,GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD);
      GPIOPadConfigSet(GPIO_PORTN_BASE,GPIO_PIN_3,GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD);
      GPIOPadConfigSet(GPIO_PORTQ_BASE,GPIO_PIN_4,GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD);
      GPIOPadConfigSet(GPIO_PORTQ_BASE,GPIO_PIN_7,GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD);


      //GPIOIntRegister(GPIO_PORTN_BASE,INT_SW2);
     
      
        GPIOIntTypeSet(GPIO_PORTN_BASE,GPIO_PIN_3,GPIO_LOW_LEVEL);
         GPIOIntEnable(GPIO_PORTN_BASE,GPIO_INT_PIN_3);
     //////// PROBLEM HERE... IntMasterEnable();
     
            IntMasterEnable();      /////// the problem is here
       
       
       
      while(1)
      {
      GPIOPinWrite(GPIO_PORTN_BASE,GPIO_PIN_5,GPIO_PIN_5);
      delay(300000);
      GPIOPinWrite(GPIO_PORTN_BASE,GPIO_PIN_5,0);
      delay(300000);
      GPIOPinWrite(GPIO_PORTQ_BASE,GPIO_PIN_4,GPIO_PIN_4);
      delay(300000);
      GPIOPinWrite(GPIO_PORTQ_BASE,GPIO_PIN_4,0);
      }
      return 0;
    }

    void delay(unsigned int x)
    {
      volatile unsigned int i=0;
      for(i;i<x;i++);
      for(i;i<x;i++);
      for(i;i<x;i++);
    }

     
     
      void INT_SW2(void)
      {
        GPIOIntClear(GPIO_PORTN_BASE,GPIO_INT_PIN_3);
      }

    picture:

  • Hi,
    I use your code as is and didn't have any compilation error. I'm not sure what the problem is. Are you using the examples provided from the IAR IDE? There are TivaWare examples that are built for IAR. Why don't you give these examples a try?

    Do you have a launchPad? Are you running the examples on the TM4C129 launchPad?

    Another suggestion is that you can use the CCS IDE which is free of license.  This is a TI tool and we will be able to support you better. For IAR questions, I will suggest you contact IAR for support. 

  • ok. 

    i found the problem. 

    in the project options if i choose: c/c++ compiler->Preprocessor->Defined symbols

    i copied from the working project three defines:

    1-ewarm 

    2- PART_TM4C129XNCZAD

    3- TARGET_IS_SNOWFLAKE_RA0

    maybe the linker could not find some libraries or defines that were inside the project.

    this is really IAR definition issue.

    thank you very much for the help. 

    best regards,

    Eliran.