khm 0 Posted April 2, 2016 Share Posted April 2, 2016 Hi,Can someone help me to implement an internal RTC module code in TIVA TM4C1294NCPDT using Energia? Thanks. Quote Link to post Share on other sites
Rei Vilo 695 Posted April 2, 2016 Share Posted April 2, 2016 See Date and Time Library. khm 1 Quote Link to post Share on other sites
khm 0 Posted April 2, 2016 Author Share Posted April 2, 2016 Hey, Thanks a lot for your prompt reply. Site looks helpful.Would go through it. -Khm Quote Link to post Share on other sites
khm 0 Posted April 5, 2016 Author Share Posted April 5, 2016 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. ^ Quote Link to post Share on other sites
Rei Vilo 695 Posted April 5, 2016 Share Posted April 5, 2016 What does the file RTC_Library.h:43 contain? You may need to specify the MCU. Quote Link to post Share on other sites
khm 0 Posted April 5, 2016 Author Share Posted April 5, 2016 Line 43 contains include "Wiring.h". Where do I specify the MCU?@@Rei Vilo Quote Link to post Share on other sites
Rei Vilo 695 Posted April 5, 2016 Share Posted April 5, 2016 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 Quote Link to post Share on other sites
khm 0 Posted April 5, 2016 Author Share Posted April 5, 2016 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. Quote Link to post Share on other sites
Rei Vilo 695 Posted April 5, 2016 Share Posted April 5, 2016 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 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.