khm

TIVA RTC Code for Energia

9 posts in this topic

Hi,
Can someone help me to implement an internal RTC module code in TIVA TM4C1294NCPDT using Energia? 
Thanks.

Share this post


Link to post
Share on other sites

Hey,

 

Thanks a lot for your prompt reply. Site looks helpful.Would go through it. :)

 

-Khm

Share this post


Link to post
Share on other sites

I have added the RTC library in Energia under hardware/lm4f/libraries, but I am getting the following error when I compile the example code for MSP432 . I have selected the TM4C1294ncpdt board for this code. What changes and where are to be implemented if any?
 

[D:\Installer\energia-0101E0016\hardware\tools\lm4f\bin\arm-none-eabi-g++, -c, -Os, -w, -fno-rtti, -fno-exceptions, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -mfloat-abi=hard, -mfpu=fpv4-sp-d16, -fsingle-precision-constant, -DF_CPU=120000000L, -MMD, -DARDUINO=101, -DENERGIA=16, -ID:\Installer\energia-0101E0016\hardware\lm4f\cores\lm4f, -ID:\Installer\energia-0101E0016\hardware\lm4f\variants\launchpad_129, -ID:\Installer\energia-0101E0016\hardware\lm4f\libraries\RTC_Library, C:\Users\tanmay\AppData\Local\Temp\build6234340672184416431.tmp\MSP432_RTC.cpp, -o, C:\Users\tanmay\AppData\Local\Temp\build6234340672184416431.tmp\MSP432_RTC.cpp.o]
In file included from MSP432_RTC.cpp:81:0:
D:\Installer\energia-0101E0016\hardware\lm4f\libraries\RTC_Library/RTC_Library.h:43:3: error: #error Platform not supported.
 # error Platform not supported.



Please help .
Thanks.
   ^

Share this post


Link to post
Share on other sites

I see no MSP432_RTC.cpp on the library. 

 

About RTC_Library.h, if you're using a TM4C129 MCU, you can comment all the lines of the #if defined... #elif... #else... #endif.

#if defined(__MSP432P401R__)
#    include <driverlib/rtc_c.h>
#elif defined(__CC3200R1M1RGC__)
#    include <driverlib/prcm.h>
#elif defined(__LM4F120H5QR__) || defined(__TM4C123GH6PM__) || defined(__TM4C129XNCZAD__)
// nothing, as TivaWare is already in ROM!
#else
#    error Platform not supported.
#endif

Share this post


Link to post
Share on other sites

Its unclear as to what I have to comment exactly in the above part. Or can you just paste the code which I need to use to implement the RTC in TM4c1294NCPDT?
Thanks.

Share this post


Link to post
Share on other sites

Short answer, two options

 

I'm surprised the variable __TM4C129XNCZAD__ isn't defined when using the TM4C129 MCU.

  • Either comment the whole block of pre-processing statements. 
  • Or better, add #define __TM4C129XNCZAD__ before the whole block of pre-processing statements. 

Long answer

 

Give a tour to the GCC Preprocessor documentation, especially 

Fmilburn likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now