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/TM4C1294NCPDT: ADDING NEW PERIPHERAL IN TI RTOS

Part Number: TM4C1294NCPDT

Tool/software: TI-RTOS

Respected sir,

 I am trying to add new peripheral QEI in ti-rtos. I have modified and added the following files

1. board.h

2.EK_TM4C1294.h

3.EK_TM4C1294.c

4.drivers/QEI.h

5.drivers/QEI.c

6.drivers/qei/QEITiva.c

7.drivers/qei/QEITiva.h

But still i am getting errors like identifiers not defined. So please tell me which more files i have to modify or add.

Also if  there are any critical changes which are not easily detectable please share and what is the location of BOARD.c file???

regards,

digvijay

  • Hi,

    Can you attach a copy of your build output? Please attach and don't copy and paste into a thread. This allows us to maintain the threads easier.

    Thanks,
    Todd
  • Debug.zip

    CONSOLE.txt
    **** Build of configuration Debug for project uartecho_TivaTM4C1294NCPDT ****
    
    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
    'Building file: ../uartecho.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_30_01_25_core/xs" --xdcpath="C:/ti/tirtos_tivac_2_00_01_23/packages;C:/ti/tirtos_tivac_2_00_01_23/products/bios_6_40_01_15/packages;C:/ti/tirtos_tivac_2_00_01_23/products/ndk_2_23_01_01/packages;C:/ti/tirtos_tivac_2_00_01_23/products/uia_2_00_00_28/packages;C:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4F -p ti.platforms.tiva:TM4C1294NCPDT -r release -c "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS" "../uartecho.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring uartecho.xem4f from package/cfg/uartecho_pem4f.cfg ...
    generating custom ti.sysbios library makefile ... 
    Starting build of library sources ...
    making D:/RTOS-PROJECTS/WORKSPACE/uartecho_TivaTM4C1294NCPDT/src/sysbios/sysbios.aem4f ...
    gmake[1]: Entering directory `D:/RTOS-PROJECTS/WORKSPACE/uartecho_TivaTM4C1294NCPDT/src/sysbios'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/RTOS-PROJECTS/WORKSPACE/uartecho_TivaTM4C1294NCPDT/src/sysbios'
    Build of libraries done.
    clem4f package/cfg/uartecho_pem4f.c ...
    'Finished building: ../uartecho.cfg'
    ' '
    'Building file: ../EK_TM4C1294XL.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/ti/tirtos_tivac_2_00_01_23/products/TivaWare_C_Series-2.1.0.12573c" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=ccs --define=TIVAWARE --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="EK_TM4C1294XL.d" --cmd_file="configPkg/compiler.opt" "../EK_TM4C1294XL.c"
    
    >> Compilation failure
    subdir_rules.mk:7: recipe for target 'EK_TM4C1294XL.obj' failed
    "C:/ti/tirtos_tivac_2_00_01_23/packages/ti/drivers/qei/QEITiva.h", line 65: error #20: identifier "QEI_FxnTable" is undefined
    "C:/ti/tirtos_tivac_2_00_01_23/packages/ti/drivers/qei/QEITiva.h", line 105: error #20: identifier "QEI_CAPTURE_Mode" is undefined
    "C:/ti/tirtos_tivac_2_00_01_23/packages/ti/drivers/qei/QEITiva.h", line 107: error #20: identifier "QEI_RESET_Mode" is undefined
    "C:/ti/tirtos_tivac_2_00_01_23/packages/ti/drivers/qei/QEITiva.h", line 108: error #20: identifier "QEI_SIGNAL_Mode" is undefined
    "C:/ti/tirtos_tivac_2_00_01_23/packages/ti/drivers/qei/QEITiva.h", line 109: error #20: identifier "QEI_SWAP_Mode" is undefined
    "C:/ti/tirtos_tivac_2_00_01_23/packages/ti/drivers/qei/QEITiva.h", line 110: error #20: identifier "QEI_VEL_DIV" is undefined
    "../EK_TM4C1294XL.c", line 561: error #20: identifier "QEI_Config" is undefined
    "../EK_TM4C1294XL.c", line 591: warning #225-D: function "QEI_init" declared implicitly
    7 errors detected in the compilation of "../EK_TM4C1294XL.c".
    gmake: *** [EK_TM4C1294XL.obj] Error 1
    'Building file: ../uartecho.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/ti/tirtos_tivac_2_00_01_23/products/TivaWare_C_Series-2.1.0.12573c" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=ccs --define=TIVAWARE --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="uartecho.d" --cmd_file="configPkg/compiler.opt" "../uartecho.c"
    
    >> Compilation failure
    subdir_rules.mk:14: recipe for target 'uartecho.obj' failed
    "../uartecho.c", line 97: error #20: identifier "QEI_Handle" is undefined
    "../uartecho.c", line 98: error #20: identifier "QEI_Params" is undefined
    "../uartecho.c", line 102: warning #225-D: function "QEI_Params_init" declared implicitly
    "../uartecho.c", line 103: error #20: identifier "QEI_CAPTURE_A_B" is undefined
    "../uartecho.c", line 104: error #20: identifier "QEI_NO_RESET" is undefined
    "../uartecho.c", line 105: error #20: identifier "QEI_QUADRATURE" is undefined
    "../uartecho.c", line 106: error #20: identifier "QEI_NO_SWAP" is undefined
    "../uartecho.c", line 107: error #20: identifier "QEI_VELDV_1" is undefined
    "../uartecho.c", line 110: warning #225-D: function "QEI_open" declared implicitly
    "../uartecho.c", line 126: warning #225-D: function "QEI_read" declared implicitly
    "../uartecho.c", line 99: warning #179-D: variable "echoPrompt" was declared but never referenced
    7 errors detected in the compilation of "../uartecho.c".
    gmake: *** [uartecho.obj] Error 1
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****
    

  • Respected sir,
    I am trying to modify uartecho_TivaTM4C1294NCPDT example. I also added QEI.xdc, QEI.xml, QEI.xs. I have attached debug folder, console and problem tab to the previous reply.
  • Hi digvijay,
    I don't see the board file (EK_TM4C1294XL.c) in the .zip file you attached. Can you please send us the board file where you have add QEI?
    Thanks,
    Janet
  • Respected sir/madam,

     I have solved the previous problem but i am getting another problem. I have attached console output and related files. And please give me step wise procedure of adding new peripheral in TI-RTOS. I am not able to figure out which files to edit or add.New folder.zip

  • Hi Digvijay,

    You need to add the QEI module to ti/dirivers/package.xdc, and add the appropriate code for QEI to ti/tirtos/TIRTOS.xs.  You need to then rebuild tirtos (instructions are in the TI-RTOS User's Guide section on building TI-RTOS for CCS).

    Then add to your application .cfg file:

        xdc.useModule('ti.drivers.QEI');

    If you can upgrade to a newer version of TIRTOS, we have removed all the driver xdc modules.  The modules were only there for ROV support for the drivers, which didn't turn out to be that helpful, so we removed them.  If you upgrade, you would just need the QEI header and source files.

    Best regards,

    Janet

  • Hi Digvijay,

    I forgot to send you the TI-RTOS download page in my previous post.  Here it is:

    Best regards,

    Janet

  • respected sir/madam,
    I rebuild ti-rtos but it is not solving the problem. Same error is coming.
  • Hi Digvijay,

    By "Same error is coming", I assume you mean the one in the .zip file you posted earlier:

    From this error, it looks like either QEI has not been added to ti/drivers/package.xdc, or you have not rebuilt the drivers.  Here is what ti/drivers/package.xdc should look like:

    package ti.drivers [1,0,0] {
        module EMAC;
        module SDSPI;
        module I2C;
        module USBMSCHFatFs;
        module GPIO;
        module QEI;
        module UART;
        module SPI;
        module WiFi;
        module Watchdog;
    };

    Here is how you can rebuild the drivers:

    1. Edit the tirtos_tivac_2_00_01_23/tirtos.mak file to set the DEFAULT_INSTALLATION_DIR.  This should be set to your CCS installation directory.  If TIRTOS is not installed in the save directory as CCS, you will also need to edit the TIRTOS_INSTALLATION_DIR variable.

    2. Clean the drivers

        - gmake -f tirtos.mak clean-drivers

    3.  Build the drivers

        - gmake -f tirtos.mak drivers

    Best regards,

    Janet

  • Respected sir/madam,

    As you suggested i rebuild the drivers using command prompt. But it is giving message as shown in attached text filexdc_top.docx

    COMMANT PROMPT0.txt
    
    C:\Users\digvijay.khambe>c:/ti/xdctools_3_30_01_25_core/gmake -f c:/ti/tirtos_ti
    vac_2_00_01_23/tirtos.mak drivers
    building tirtos packages ...
    c:/ti/xdctools_3_30_01_25_core\packages\xdc\bld\xdc_top.mak:267: Warning: nothin
    g to build; the directories named after -P[RrD] don't contain any buildable pack
    ages
             -P
             -Pr ./packages
             -PR
             -PD
    making all: Sat Feb 24 11:21:52 IST 2018 ...
    .interfaces files complete: Sat Feb 24 11:21:52 IST 2018.
    .libraries files complete: Sat Feb 24 11:21:52 IST 2018.
    .dlls files complete: Sat Feb 24 11:21:53 IST 2018.
    .executables files complete: Sat Feb 24 11:21:53 IST 2018.
    all files complete: Sat Feb 24 11:21:53 IST 2018.
    
    C:\Users\digvijay.khambe>
    . Also i have attached xdc_top file.

  • Might it make sense to (for now) abandon the "RTOS" - and achieve your program's goals via the TM4C's powerful & extensive API?

    There are a multitude of examples - and "User Posted & Confirmed - Success details" (found via the "Forum Search Box" - atop the forum page! ) There are "far more such code examples" and "user success stories/postings" than under the newer, more limited, RTOS!

    Once you achieve your program's objectives - via the simpler & more extensive/supported API - you may log the various "API-Only" execution times - which best enables your (future) comparison against the RTOS - to (truly) reveal -  if the extra effort the RTOS demands - proves (at all) justified.

    Such is an example of "KISS."     Starting from "added/high complexity" (via the RTOS) - when little (or NO case) has been made for it - may not make the most sense.     You are now 11 "back-forth posts AND 5 days" invested - have employed/TWO skilled vendor agents - and still appear, "Far from your objective!"     (such is telling - is it not?)

    Might "simplification" - via, "Exploitation of the API's superior & eased resources" - prove a superior path to the, "Complexity demanded by the RTOS" - especially when, "No case whatsoever for RTOS use"  has been presented?     (nor queried - by those here...till now)

  • Respected sir/madam,
    I have already developed my application using Tiva Ware drivers library. And i have moved to RTOS. Right now my intention is to develop the RTOS platform only not the application yet.
    I know i am far from my objective , i dont have enough experience and task is tough. But still i want to give it a try. So please help if you can. It will be appreciated.
    Regards,
    Digvijay
  • As you have "succeeded" w/out the (limited (vendor restricted) RTOS) - what is your justification for employing the RTOS?   Why is its use your, "intention?"     You have yet to make (any) case for the RTOS!

    Is it not (far) more logical to first identify, "Any/all potential gains" - then balance those against, "Any/all potential costs" - and based upon that (favorable) calculus - only then devote significant, "Time, Cost, Effort" - to the new pursuit?

  • Respected sir,

       Can you at least give solution for the last problem regarding rebuilding of TI-RTOS (task_top and COMMAND_PROMPT0 attached files)??  Looks like i have to stop my quest of adding new driver library for now . But at least i want to modify existing driver library according to my need.I am not able to rebuild existing driver also without adding new driver. So please check the latest problem in this thread and kindly suggest solution.

    Regards,

    Digvijay

  • There remains - NO/ZERO explanation/justification for your being, "LOCKED ONTO" any RTOS!    You've noted being a reasonably new user - and normal "Programming syllabus" (i.e. coursework) would, "Start w/the basics - insuring a strong foundation - before venturing into the complex!"

    This especially "holds true" when your "intention" cannot be (reasonably) supported - and much time, effort (yours and that of skilled others) has failed to meet your objectives.

    There are many "shiny objects" which pass before us.      Choosing "which ones" are "best to pursue" (and when) - is a desired & most helpful skill...

  • Hi Digvijay,

    You need to cd into the tirtos install directory for the build.  From a CMD prompt:

    cd c:\ti\tirtos_tivac_2_00_01_23

    > ..\xdctools_3_30_01_25_core\gmake -f tirtos.mak drivers

    I hope that solves the build problem.

    Best regards,

    Janet

  • Respected sir/madam,
    That solved my problem. Thanks for all the help.
    Regards,
    Digvijay