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/LAUNCHXL-CC2650: Access RTC on LAUNCHXL-CC2650 using ProjectZero

Part Number: LAUNCHXL-CC2650
Other Parts Discussed in Thread: CC2650, CCSTUDIO

Tool/software: TI-RTOS

I am trying to access the RTC on my LAUNCHXL-CC2650 Launchpad using a working ProjectZero.

I have a local copy of CCS version 7.  Project Zero properties shows TI-RTOS for SimpleLink wireless MCUs v2.13.0.6 in use and TI-RTOS for CC13xx and CC26xx v2.21.0.6 in use.

Is there something else I have to have set to use the AON RTC functions?

I try to use AONRTCSecGet function in code but get a build error:

undefined    first referenced
  symbol          in file     
 ---------    ----------------
 AONRTCSecGet <whole-program>

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "ProjectZeroApp_CC2650LAUNCHXL.out" not built

Any help for this newbie would be great!

Thanks,

Dale

  • More Info:

    I have spent many more hours trying to simply access the RTC by modifying the Launchpads example ProjectZero, still no luck, it should not be this hard.

    If I use ccsv7 resource explorer for product "CC2650 Launchpad", the only TI-RTOS example that seems to have anything to do with an RTClike usage is the C++ Example (bigtime). As a newbie to TI IDE etc.. the 'bigtime' example seems to be actually setting up one or more timers to act like an RTC and parsing the output into date/time format. When I run/debug the example the output is running at nowhere near real time, which I assume is because of the console messages and debugging environment.

    I only need the whole seconds real time so I just want to use the AONRTCSecGet function.

    Is AONRTCSecGet still available or is the 'bigtime' example the only way to 'create' an RTC?
  • Hi Dale,

    The error you are seeing above is due to the linker not being able to find that symbol/function. I looked at the default project & it seems like everything required by the compiler & linker is provided. Can you attach you example file so that I can give it a try on my end?

    Regards,
    -- Emmanuel
  • To make sure I have isolated this issue:

    1.  I deleted the ProjectZero folder where the resource explorer installed it in my 'users...' directory.

    2. I used resource explorer in ccsv7 and used 'Import to IDE' on ProjectZeroApp

    3. I modified the button handler code as follows:

    static void user_handleButtonPress(button_state_t *pState)

    {

     uint32_t atsecs = AONRTCSecGet(); //dale added

     Log_info3("%s %s at %u",

       (IArg)(pState->pinId == Board_BUTTON0?"Button 0":"Button 1"),

       (IArg)(pState->state?"\x1b[32mpressed\x1b[0m":

                            "\x1b[33mreleased\x1b[0m"),

       (IArg)atsecs); //dale modified

    ...

    The above resulted in the posted build error.

    I then checked the box for TI-RTOS for CC13xx and CC26xx v2.21.0.6 in project properties which resulted in the same build error.

    I have zipped the whole project folder into a 2MB file but am unsure how to attach it here.

    Here is the ccsv7 'installed software' from the 'Help>About>Installation Details' menu:

     Analysis Suite 4.1.0.201612061750 com.ti.dvt2.analysis.suite.feature.group Texas Instruments

     ARM Compiler Help 16.9.0.20161026170303 com.ti.cgt.arm.16.9.help.feature.group Texas Instruments

     ARM Compiler Tools 16.9.0.LTS com.ti.cgt.tms470.15.win32.feature.group Texas Instruments

     C/C++ Development Tools 9.0.0.201606062011 org.eclipse.cdt.feature.group Eclipse CDT

     C/C++ GCC Cross Compiler Support 9.0.0.201606062011 org.eclipse.cdt.build.crossgcc.feature.group Eclipse CDT

     C/C++ Memory View Enhancements 9.0.0.201606062011 org.eclipse.cdt.debug.ui.memory.feature.group Eclipse CDT

     C/C++ Remote Launch 9.0.0.201606062011 org.eclipse.cdt.launch.remote.feature.group Eclipse CDT

     CC13xx/CC26xx Device Support 2.10.1.00 com.ti.ccstudio.cc26xx.devicesupport.win32.feature.group Texas Instruments

     CCS and SAT Common Components Feature 6.2.0.201612021400 com.ti.tools.common.feature.group Texas Instruments

     CCS Documentation 7.0.0.20161213-3 com.ti.ccstudio.doc.win32.feature.group Texas Instruments

     CCS Launcher 7.0.0.20161020 com.ti.ccstudio.launcher.win32.feature.group Texas Instruments

     CCS Utilities 1.0.0.20160210 com.ti.ccstudio.utils.cli.win32.feature.group Texas Instruments

     CCStudio p2 Tool Feature 7.0.0.201611291427 com.ti.ccstudio.p2tool.feature.group Texas Instruments

     Chromium Browser Feature 6.2.0.201612021400 com.ti.chromium.browser.feature.group Texas Instruments

     Code Composer Studio Base Components 7.0.0.01808 com.ti.ccstudio.base.feature.group Texas Instruments

     Code Composer Studio IDE ARM Components 7.0.0.201612021400 com.ti.ccstudio.tms470.feature.group Texas Instruments

     Code Composer Studio IDE Main Feature 6.2.0.201612021400 com.ti.ccstudio.idemain.feature.group Texas Instruments

     Code Composer Studio IDE Workflow 7.0.0.201612021400 com.ti.ccstudio.workflow.feature.group Texas Instruments

     Compiler Tools On-line Documentation 1.1.5 com.ti.cgt.dmed.win32.feature.group Texas Instruments

     Debug Server 7.0.0.1808 com.ti.ccstudio.debugserver.win32.feature.group Texas Instruments

     Debug Server Flash 7.0.0.1808 com.ti.dsflash.win32.feature.group Texas Instruments

     DVT - Graph Visualization 4.1.0.201612061750 com.ti.dvt2.graph.visualization.feature.group Texas Instruments

     DVT - Profiler Analysis Manager 4.1.0.201612061750 com.ti.dvt2.profileanalysismanager.feature.group Texas Instruments

     DVT - Resource Explorer 4.1.0.201612061750 com.ti.dvt2.resource.explorer.feature.group Texas Instruments

     DVT - System Analyzer 4.1.0.201612061750 com.ti.dvt2.uia.feature.group Texas Instruments

     DVT - Trace Control 4.1.0.201612061750 com.ti.dvt2.trace.control.feature.group Texas Instruments

     Eclipse Git Team Provider 4.4.0.201606070830-r org.eclipse.egit.feature.group Eclipse EGit

     Eclipse Help System 2.2.0.v20160606-1100 org.eclipse.help.feature.group Eclipse.org

     Eclipse Platform 4.6.0.I20160606-1100 org.eclipse.platform.ide Eclipse.org

     Equinox p2, Discovery UI support 1.0.400.v20160504-1450 org.eclipse.equinox.p2.discovery.feature.feature.group Eclipse.org - Equinox

     Equinox p2, Provisioning for IDEs. 2.2.200.v20160606-1311 org.eclipse.equinox.p2.user.ui.feature.group Eclipse.org - Equinox

     GCC ARM Compiler Tools 4.9.3.2015q3_20150921 com.ti.gcc.arm.win32.feature.group Texas Instruments

     GEF (MVC) 3.11.0.201606061308 org.eclipse.gef.feature.group Eclipse GEF

     GUI Composer Backplane Feature 6.1.0.201612021400 com.ti.gc.backplane.feature.group Texas Instruments

     GUI Composer Program Model Feature 6.1.0.201612021400 com.ti.gc.pm.feature.group Texas Instruments

     IDE - Debug Server Integration Feature 6.0.1.201612021400 com.ti.debug.server.feature.group Texas Instruments

     Image Analyzer 4.1.0.201612061750 com.ti.dvt2.via.ccs.feature.group Texas Instruments

     LWInstaller 7.0.0.00042 com.ti.ccstudio.installer.win32.feature.group Texas Instruments

     Marketplace Client 1.5.0.v20160608-1804 org.eclipse.epp.mpc.feature.group Eclipse Marketplace Client

     MSVC 2008 Redistributable 9.0.30729.17 com.ti.ccstudio.installer.msvc.2008.win32.feature.group Texas Instruments

     MSVC 2012 Redistributable 11.0.61030 com.ti.ccstudio.installer.msvc.2012.win32.feature.group Texas Instruments

     Node.js 6.9.1 com.ti.ccstudio.nodejs.win32.feature.group Texas Instruments

     p2appf 6.0.0.201612021400 com.ti.ccstudio.p2appf.feature.group Texas Instruments

     Pin Mux 4.0.1470 com.ti.ccstudio.pinmux.win32.feature.group Texas Instruments

     Remote System Explorer End-User Runtime 3.7.1.201603211627 org.eclipse.rse.feature.group Eclipse TM Project

     ROV 4.1.0.201612061750 com.ti.dvt2.rov.feature.group Texas Instruments

     RTSC/XDCtools (IDE Client) 3.32.1.22 org.eclipse.rtsc.xdctools.product.ui.feature.group Texas Instruments

     RTSC/XDCtools (Target Runtime Support) 3.32.1.22 org.eclipse.rtsc.xdctools.product_3.32.1.22.feature.group Texas Instruments

     RTSC/XDCtools (Target Runtime Support) 3.32.0.06 org.eclipse.rtsc.xdctools.product_3.32.0.06.feature.group Texas Instruments

     RTSC/XDCtools (Target Runtime Support) 3.31.1.33 org.eclipse.rtsc.xdctools.product_3.31.1.33.feature.group Texas Instruments

     RXTX End-User Runtime 2.1.8.0_201606281300 gnu.io.rxtx.feature.group RXTX.org

     TargetDB Default Props 6.0.0.20131206 com.ti.ccstudio.targetdb.props.default.win32.feature.group Texas Instruments

     TI Cloud Agent 0.5.1057 com.ti.ccstudio.cloudagent.win32.feature.group Texas Instruments

     TI Emulators 6.0.504.1 com.ti.emulation.pack.win32.feature.group Texas Instruments

     TI Target Content 1.0.0.201608011655 com.ti.targetcontent.feature.group Texas Instruments

     TI-RTOS for CC13XX and CC26XX (IDE Client) 2.21.0.06 com.ti.rtsc.TIRTOSCC13XX_CC26XX.product.ui.feature.group Texas Instruments

     TI-RTOS for CC13XX and CC26XX (Target Content) 2.21.0.06 com.ti.rtsc.TIRTOSCC13XX_CC26XX.product_2.21.0.06.feature.group Texas Instruments

     TI-RTOS for SimpleLink Wireless MCUs (IDE Client) 2.13.0.06 com.ti.rtsc.TIRTOSsimplelink.product.ui.feature.group Texas Instruments

     TI-RTOS for SimpleLink Wireless MCUs (Target Content) 2.13.0.06 com.ti.rtsc.TIRTOSsimplelink.product_2.13.0.06.feature.group Texas Instruments

     TIREX Desktop 3.0.0.137 com.ti.tirex.feature.group Texas Instruments

     TM Terminal 4.1.0.201606052351 org.eclipse.tm.terminal.feature.feature.group Eclipse.org - Target Management

     Trace Analyzer 4.1.0.201612061750 com.ti.dvt2.trace.ccs.feature.group Texas Instruments

     Xulrunner 24.0.0 com.ti.ccstudio.xulrunner.win32.feature.group Texas Instruments

    Thanks for the help so far.

    Dale

  • Hi Dale,

    I was able to reproduce your problem.  The reason the linker is not finding that API (although driverlib is being provided to the linker) is that the function is defined & implemented in the aon_rtc.h header file.  So you need only include that file in your application & it should build fine.  Add the following:

    #include <driverlib/aon_rtc.h>

    Regards,

    -- Emmanuel

  • Well as a newbie I wasn't entirely sure I needed to include a special file to access AON RTC functions. Could not find that requirement anywhere.

    I found a aon_rtc.h file in my directory structure and I could not get a #include statement to find the file so I put the whole path in the #include, in ProjectZero.c.

    #include "C:\ti\tirex-content\tirtos_simplelink_2_13_00_06\products\cc13xxware_2_00_01_15600\driverlib\aon_rtc.h"

    And guess what, it built!!!!

    What is the short include line that works?
  • Hi Dale,

    I posted the short version of the include line above. The driverlib is already on the list of directories the compiler will use to search for files. You need only add the path from the base driverlib directory to the file you want (in this case <driverlib/aon_rtc.h>).

    Hope this helps,
    -- Emmanuel