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.

CC2640R2F: Compilation failure when I add RTC function in OAD off-chip project

Part Number: CC2640R2F

Hi, all

My environment :

SDK:simplelink_cc2640r2_sdk_4_40_00_10

CCS: 10.2.0.00009

I use simple_peripheral_cc2640r2lp_oad_offchip_app project

I add #include "osal_clock.h" and

UTCTimeStruct UTCimer;

osal_ConvertUTCTime(&UTCimer, osal_getClock());

at the end of SimplePeripheral_init(void).

But it Compilation failureI when I build the project.

undefined first referenced
symbol in file
--------- ----------------
osal_ConvertUTCTime <whole-program>
osal_getClock <whole-program>

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking;

I select osal_ConvertUTCTime and open declaration ,CCS opened the file osal_clock.c(simple_peripheral_cc2640r2lp_oad_offchip_stack/OSAL/osal_clock.c)

It seems that the osal_ConvertUTCTime function is linked to osal_clock.c file.

How to solve this problem?

  • Hello,

    I have assigned an expert to help you with your query. Upon first, glance it seems that the project is not finding the definitions. I would add the osal_clock.c file location to the include path of the project. To add directories to the include path, right click on the project, click on properties, then navigate to Build -> Arm Compiler -> Include Options. The section that says "Add dir to #include search path (--include_path, -I)" is the section that will search through all the files. I would ensure that the location where the osal_clock.c file is located is included.

    Regards,

    Jan

  • Hi,

    sorry for the delay. I add osal_clock.c to the same directories as link files, the project build successfully!

    But why I always get the same time when I use osal_getClock() to read rtc time?

    When I use simple_peripheral_cc2640r2lp_app project, I can get increasing time use osal_getClock().

  • Hi,

    I have used utc_clock.c and works okay. "C:\ti\simplelink_cc2640r2_sdk_4_40_00_10\source\ti\blestack\common\cc26xx\time"

    -kel

  • Hey Lei,

    Glad you got the project to build successfully. You can try the utc_clock.c as Kel mentions.

    Can you clarify what changes were made to the simple_peripheral app project vs the simple_peripheral oad project? I'm unsure why it would not work the same on the app project vs the oad project.

  • Hi kel,

    Thanks for your reply, I add UTC_init() and utc_clock.c utc_clock.h files to my OAD offchip project.

    I can get right time now.