Jump to content

Recommended Posts

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 .
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!
#    error Platform not supported.
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 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...