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.

Compiler/tm4c1294kcpdt: TivaWare, tm4c1294kcpdt.h, hw_flash.h, FLASH_FMA_OFFSET_M

Part Number: TM4C1294KCPDT

Tool/software: TI C/C++ Compiler

hello,

I am got this error message compiling my project (written in CCS7):

#48-D incompatible redefinition of macro "FLASH_FMA_OFFSET_M" (declared at line 11498 of "C:/TI/TivaWare_C_Series-2.1.4.178/inc/tm4c1294kcpdt.h")    .ccsproject    /ionet    line 144, external location: C:\TI\TivaWare_C_Series-2.1.4.178\inc\hw_flash.h    C/C++ Problem

I have to include following files (both needed in this source):

 -- C:\TI\TivaWare_C_Series-2.1.4.178\inc\tm4c1294kcpdt.h

 -- C:\TI\TivaWare_C_Series-2.1.4.178\inc\hw_flash.h

Looking at the data sheet for the TM4C1294KCPDT Microcontroller (description of the FMA register) I found, that the definition in the first file is ok, the definition in the hw_flash.h must be faulty.

Did I right with my thought... ?

thanks for an answer.

  • Hello Andres,

    The issue with the redefinition is because you have included the following:

    C:\TI\TivaWare_C_Series-2.1.4.178\inc\tm4c1294kcpdt.h

    Please remove that file and see if the issue resolves.

    As far as the values, I believe the hw_flash.h value is a mask for the bitfield of the register, not the actual value out of the datasheet.
  • Ralph,

    thanks for your answer, but

    the register Register 1: Flash Memory Address (FMA), base 0x400F.D000, offset 0x000 has a defined bitfield for the address offset. This field is 19 bits long.

    the declaration for the mask  at line 11498 of "C:/TI/TivaWare_C_Series-2.1.4.178/inc/tm4c1294kcpdt.h" is ok (0x0007FFFF).

    the declaration for the mask  at line 144 of "C:/TI/TivaWare_C_Series-2.1.4.178/inc/hw_flash.h" is wrong (0x000FFFFF).

    my project need to include both files to get all needed defines . Some are defined in the one file, some in the other...

    I think, TI should correct this for the next update of tivaware to avoid the generated warning message.

  • Hello Andres,

    The mask for hw_flash.h will work across all TM4C devices when used with TivaWare driver library, that is why it is setup like that, so it is still correct for your MCU.

    You should not need the tm4c1294kcpdt.h file if you are using TivaWare. The definitions you are missing should be present in other TivaWare provided files. If you want some help trying to seek them out, I can assist with that.

    TivaWare had been updated in the past to resolve issues with these warnings and part of that update is that you should not use the processor specific header file. Look at all TivaWare examples and you will see none of them use the processor specific header.