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.

Warning incompatible redefinition of macro, ek-tm4c123gxl lauchpad

Genius 3300 points
Other Parts Discussed in Thread: EK-TM4C123GXL, TM4C123GH6PM

1. I am using ek-tm4c123gxl launchpad with 2.1.1.71.

2. I have made main.c file with following includes:

#include "tm4c123gh6pm.h"

#define PART_TM4C123GH6PM     /* used for "driverlib/pin_map.h" */

#include "stdbool.h"
#include "stdint.h"
#include "extern_func.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "driverlib/timer.h"
#include "driverlib/interrupt.h"
#include "driverlib/cpu.h"
#include "driverlib/uart.h"
#include "driverlib/pin_map.h"
#include "driverlib/debug.h"

#include "inc/hw_sysctl.h"
#include "inc/hw_gpio.h"
#include "inc/hw_timer.h"
#include "inc/hw_nvic.h"
#include "inc/hw_uart.h"
#include "inc/hw_flash.h"
#include "inc/hw_ints.h"
#include "inc/hw_types.h"
#include "inc/hw_memmap.h"

3. Upon building with Keil v5.13.0.0, it gives warning like below. I have shown 2 warnings only, but there are total 79 such warnings where a redfination is made.

.\TI_lib\inc/hw_flash.h(144): warning:  #47-D: incompatible redefinition of macro "FLASH_FMA_OFFSET_M" (declared at line 9104 of ".\startup\tm4c123gh6pm.h")
  #define FLASH_FMA_OFFSET_M      0x000FFFFF  // Address Offset
.\TI_lib\inc/hw_ints.h(352): warning:  #47-D: incompatible redefinition of macro "INT_ADC0SS0" (declared at line 62 of ".\startup\tm4c123gh6pm.h")
  #define INT_ADC0SS0             INT_CONCAT(INT_ADC0SS0_, INT_DEVICE_CLASS)

4. If I remove #include "inc/hw_flash.h" & #include "inc/hw_ints.h" from above includes all warning goes.

But I have to include them since some files in driverlib ask for same.

5. Moreover there are incompatible redefinations. e.g

tm4c123gh6pm.h: #define FLASH_FMA_OFFSET_M      0x0003FFFF  // Address Offset

hw_flash.h:             #define FLASH_FMA_OFFSET_M      0x000FFFFF  // Address Offset,

  • Hi,

    I think you will not encounter this sort of problems, if you use an existing working example program like "hello" or "interrupts" and then just add your code. This way, if there are compile errors, you know that your added code, caused those errors.

    - kel
  • Hi kel,

    My code have nothing till now.
    In main.c, it has empty main functions with while loop only & header at start.
    It gives error. As you can there is clear redinations of registers.
  • Hi,

    What exactly does your program do? If you are not familiar how to make a new Keil Uvision project from scratch, there is a reference at Keil website which you can learn from. But, I recommend that you just use a working example program and then just add your code.

    - kel

  • Hello Vindhyachal

    Instead of defining the PART_TM4C123GH6PM in the main.c define it in the compile flow. Also have you put the TARGET_IS_TM4C123_RB1 in the compile flow?

    Regards
    Amit
  • Hi Amit,


    1. I had added PART_TM4C123GH6PM, TARGET_IS_TM4C123_RB1 both in compile flow. But still problem exists.

    2. Attached is the keil code, V5.13.0.0.  For above two deines you can check, Project->Option for Target->C/C++->Defines.

    3. All files used from driverlib 2.1.1.71.

    4. For complete list of error, i have attached error.txt.

    5. As far as I understand: there is clear redefination in one error. This is error here & have to be corrected

    hw_flash.h   ->  #define FLASH_FMA_OFFSET_M      0x000FFFFF  // Address Offset   ;line 144

    tm4c123gh6pm.h  ->  #define FLASH_FMA_OFFSET_M      0x0003FFFF  // Address Offset   ; line 9104

    sample.zip

    Rebuild target 'No_opt'
    compiling main.c...
    .\TI_lib\inc/hw_flash.h(144): warning:  #47-D: incompatible redefinition of macro "FLASH_FMA_OFFSET_M" (declared at line 9104 of ".\startup\tm4c123gh6pm.h")
      #define FLASH_FMA_OFFSET_M      0x000FFFFF  // Address Offset
    .\TI_lib\inc/hw_ints.h(352): warning:  #47-D: incompatible redefinition of macro "INT_ADC0SS0" (declared at line 62 of ".\startup\tm4c123gh6pm.h")
      #define INT_ADC0SS0             INT_CONCAT(INT_ADC0SS0_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(353): warning:  #47-D: incompatible redefinition of macro "INT_ADC0SS1" (declared at line 63 of ".\startup\tm4c123gh6pm.h")
      #define INT_ADC0SS1             INT_CONCAT(INT_ADC0SS1_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(354): warning:  #47-D: incompatible redefinition of macro "INT_ADC0SS2" (declared at line 64 of ".\startup\tm4c123gh6pm.h")
      #define INT_ADC0SS2             INT_CONCAT(INT_ADC0SS2_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(355): warning:  #47-D: incompatible redefinition of macro "INT_ADC0SS3" (declared at line 65 of ".\startup\tm4c123gh6pm.h")
      #define INT_ADC0SS3             INT_CONCAT(INT_ADC0SS3_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(356): warning:  #47-D: incompatible redefinition of macro "INT_ADC1SS0" (declared at line 92 of ".\startup\tm4c123gh6pm.h")
      #define INT_ADC1SS0             INT_CONCAT(INT_ADC1SS0_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(357): warning:  #47-D: incompatible redefinition of macro "INT_ADC1SS1" (declared at line 93 of ".\startup\tm4c123gh6pm.h")
      #define INT_ADC1SS1             INT_CONCAT(INT_ADC1SS1_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(358): warning:  #47-D: incompatible redefinition of macro "INT_ADC1SS2" (declared at line 94 of ".\startup\tm4c123gh6pm.h")
      #define INT_ADC1SS2             INT_CONCAT(INT_ADC1SS2_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(359): warning:  #47-D: incompatible redefinition of macro "INT_ADC1SS3" (declared at line 95 of ".\startup\tm4c123gh6pm.h")
      #define INT_ADC1SS3             INT_CONCAT(INT_ADC1SS3_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(361): warning:  #47-D: incompatible redefinition of macro "INT_CAN0" (declared at line 85 of ".\startup\tm4c123gh6pm.h")
      #define INT_CAN0                INT_CONCAT(INT_CAN0_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(362): warning:  #47-D: incompatible redefinition of macro "INT_CAN1" (declared at line 86 of ".\startup\tm4c123gh6pm.h")
      #define INT_CAN1                INT_CONCAT(INT_CAN1_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(363): warning:  #47-D: incompatible redefinition of macro "INT_COMP0" (declared at line 73 of ".\startup\tm4c123gh6pm.h")
      #define INT_COMP0               INT_CONCAT(INT_COMP0_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(364): warning:  #47-D: incompatible redefinition of macro "INT_COMP1" (declared at line 74 of ".\startup\tm4c123gh6pm.h")
      #define INT_COMP1               INT_CONCAT(INT_COMP1_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(369): warning:  #47-D: incompatible redefinition of macro "INT_FLASH" (declared at line 76 of ".\startup\tm4c123gh6pm.h")
      #define INT_FLASH               INT_CONCAT(INT_FLASH_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(370): warning:  #47-D: incompatible redefinition of macro "INT_GPIOA" (declared at line 48 of ".\startup\tm4c123gh6pm.h")
      #define INT_GPIOA               INT_CONCAT(INT_GPIOA_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(371): warning:  #47-D: incompatible redefinition of macro "INT_GPIOB" (declared at line 49 of ".\startup\tm4c123gh6pm.h")
      #define INT_GPIOB               INT_CONCAT(INT_GPIOB_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(372): warning:  #47-D: incompatible redefinition of macro "INT_GPIOC" (declared at line 50 of ".\startup\tm4c123gh6pm.h")
      #define INT_GPIOC               INT_CONCAT(INT_GPIOC_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(373): warning:  #47-D: incompatible redefinition of macro "INT_GPIOD" (declared at line 51 of ".\startup\tm4c123gh6pm.h")
      #define INT_GPIOD               INT_CONCAT(INT_GPIOD_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(374): warning:  #47-D: incompatible redefinition of macro "INT_GPIOE" (declared at line 52 of ".\startup\tm4c123gh6pm.h")
      #define INT_GPIOE               INT_CONCAT(INT_GPIOE_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(375): warning:  #47-D: incompatible redefinition of macro "INT_GPIOF" (declared at line 78 of ".\startup\tm4c123gh6pm.h")
      #define INT_GPIOF               INT_CONCAT(INT_GPIOF_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(402): warning:  #47-D: incompatible redefinition of macro "INT_HIBERNATE" (declared at line 87 of ".\startup\tm4c123gh6pm.h")
      #define INT_HIBERNATE           INT_CONCAT(INT_HIBERNATE_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(403): warning:  #47-D: incompatible redefinition of macro "INT_I2C0" (declared at line 56 of ".\startup\tm4c123gh6pm.h")
      #define INT_I2C0                INT_CONCAT(INT_I2C0_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(404): warning:  #47-D: incompatible redefinition of macro "INT_I2C1" (declared at line 83 of ".\startup\tm4c123gh6pm.h")
      #define INT_I2C1                INT_CONCAT(INT_I2C1_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(405): warning:  #47-D: incompatible redefinition of macro "INT_I2C2" (declared at line 103 of ".\startup\tm4c123gh6pm.h")
      #define INT_I2C2                INT_CONCAT(INT_I2C2_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(406): warning:  #47-D: incompatible redefinition of macro "INT_I2C3" (declared at line 104 of ".\startup\tm4c123gh6pm.h")
      #define INT_I2C3                INT_CONCAT(INT_I2C3_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(415): warning:  #47-D: incompatible redefinition of macro "INT_PWM0_0" (declared at line 58 of ".\startup\tm4c123gh6pm.h")
      #define INT_PWM0_0              INT_CONCAT(INT_PWM0_0_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(416): warning:  #47-D: incompatible redefinition of macro "INT_PWM0_1" (declared at line 59 of ".\startup\tm4c123gh6pm.h")
      #define INT_PWM0_1              INT_CONCAT(INT_PWM0_1_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(417): warning:  #47-D: incompatible redefinition of macro "INT_PWM0_2" (declared at line 60 of ".\startup\tm4c123gh6pm.h")
      #define INT_PWM0_2              INT_CONCAT(INT_PWM0_2_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(418): warning:  #47-D: incompatible redefinition of macro "INT_PWM0_3" (declared at line 89 of ".\startup\tm4c123gh6pm.h")
      #define INT_PWM0_3              INT_CONCAT(INT_PWM0_3_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(419): warning:  #47-D: incompatible redefinition of macro "INT_PWM0_FAULT" (declared at line 57 of ".\startup\tm4c123gh6pm.h")
      #define INT_PWM0_FAULT          INT_CONCAT(INT_PWM0_FAULT_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(420): warning:  #47-D: incompatible redefinition of macro "INT_PWM1_0" (declared at line 122 of ".\startup\tm4c123gh6pm.h")
      #define INT_PWM1_0              INT_CONCAT(INT_PWM1_0_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(421): warning:  #47-D: incompatible redefinition of macro "INT_PWM1_1" (declared at line 123 of ".\startup\tm4c123gh6pm.h")
      #define INT_PWM1_1              INT_CONCAT(INT_PWM1_1_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(422): warning:  #47-D: incompatible redefinition of macro "INT_PWM1_2" (declared at line 124 of ".\startup\tm4c123gh6pm.h")
      #define INT_PWM1_2              INT_CONCAT(INT_PWM1_2_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(423): warning:  #47-D: incompatible redefinition of macro "INT_PWM1_3" (declared at line 125 of ".\startup\tm4c123gh6pm.h")
      #define INT_PWM1_3              INT_CONCAT(INT_PWM1_3_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(424): warning:  #47-D: incompatible redefinition of macro "INT_PWM1_FAULT" (declared at line 126 of ".\startup\tm4c123gh6pm.h")
      #define INT_PWM1_FAULT          INT_CONCAT(INT_PWM1_FAULT_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(425): warning:  #47-D: incompatible redefinition of macro "INT_QEI0" (declared at line 61 of ".\startup\tm4c123gh6pm.h")
      #define INT_QEI0                INT_CONCAT(INT_QEI0_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(426): warning:  #47-D: incompatible redefinition of macro "INT_QEI1" (declared at line 84 of ".\startup\tm4c123gh6pm.h")
      #define INT_QEI1                INT_CONCAT(INT_QEI1_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(428): warning:  #47-D: incompatible redefinition of macro "INT_SSI0" (declared at line 55 of ".\startup\tm4c123gh6pm.h")
      #define INT_SSI0                INT_CONCAT(INT_SSI0_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(429): warning:  #47-D: incompatible redefinition of macro "INT_SSI1" (declared at line 80 of ".\startup\tm4c123gh6pm.h")
      #define INT_SSI1                INT_CONCAT(INT_SSI1_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(430): warning:  #47-D: incompatible redefinition of macro "INT_SSI2" (declared at line 96 of ".\startup\tm4c123gh6pm.h")
      #define INT_SSI2                INT_CONCAT(INT_SSI2_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(431): warning:  #47-D: incompatible redefinition of macro "INT_SSI3" (declared at line 97 of ".\startup\tm4c123gh6pm.h")
      #define INT_SSI3                INT_CONCAT(INT_SSI3_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(432): warning:  #47-D: incompatible redefinition of macro "INT_SYSCTL" (declared at line 75 of ".\startup\tm4c123gh6pm.h")
      #define INT_SYSCTL              INT_CONCAT(INT_SYSCTL_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(433): warning:  #47-D: incompatible redefinition of macro "INT_SYSEXC" (declared at line 121 of ".\startup\tm4c123gh6pm.h")
      #define INT_SYSEXC              INT_CONCAT(INT_SYSEXC_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(435): warning:  #47-D: incompatible redefinition of macro "INT_TIMER0A" (declared at line 67 of ".\startup\tm4c123gh6pm.h")
      #define INT_TIMER0A             INT_CONCAT(INT_TIMER0A_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(436): warning:  #47-D: incompatible redefinition of macro "INT_TIMER0B" (declared at line 68 of ".\startup\tm4c123gh6pm.h")
      #define INT_TIMER0B             INT_CONCAT(INT_TIMER0B_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(437): warning:  #47-D: incompatible redefinition of macro "INT_TIMER1A" (declared at line 69 of ".\startup\tm4c123gh6pm.h")
      #define INT_TIMER1A             INT_CONCAT(INT_TIMER1A_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(438): warning:  #47-D: incompatible redefinition of macro "INT_TIMER1B" (declared at line 70 of ".\startup\tm4c123gh6pm.h")
      #define INT_TIMER1B             INT_CONCAT(INT_TIMER1B_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(439): warning:  #47-D: incompatible redefinition of macro "INT_TIMER2A" (declared at line 71 of ".\startup\tm4c123gh6pm.h")
      #define INT_TIMER2A             INT_CONCAT(INT_TIMER2A_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(440): warning:  #47-D: incompatible redefinition of macro "INT_TIMER2B" (declared at line 72 of ".\startup\tm4c123gh6pm.h")
      #define INT_TIMER2B             INT_CONCAT(INT_TIMER2B_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(441): warning:  #47-D: incompatible redefinition of macro "INT_TIMER3A" (declared at line 81 of ".\startup\tm4c123gh6pm.h")
      #define INT_TIMER3A             INT_CONCAT(INT_TIMER3A_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(442): warning:  #47-D: incompatible redefinition of macro "INT_TIMER3B" (declared at line 82 of ".\startup\tm4c123gh6pm.h")
      #define INT_TIMER3B             INT_CONCAT(INT_TIMER3B_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(443): warning:  #47-D: incompatible redefinition of macro "INT_TIMER4A" (declared at line 105 of ".\startup\tm4c123gh6pm.h")
      #define INT_TIMER4A             INT_CONCAT(INT_TIMER4A_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(444): warning:  #47-D: incompatible redefinition of macro "INT_TIMER4B" (declared at line 106 of ".\startup\tm4c123gh6pm.h")
      #define INT_TIMER4B             INT_CONCAT(INT_TIMER4B_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(445): warning:  #47-D: incompatible redefinition of macro "INT_TIMER5A" (declared at line 107 of ".\startup\tm4c123gh6pm.h")
      #define INT_TIMER5A             INT_CONCAT(INT_TIMER5A_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(446): warning:  #47-D: incompatible redefinition of macro "INT_TIMER5B" (declared at line 108 of ".\startup\tm4c123gh6pm.h")
      #define INT_TIMER5B             INT_CONCAT(INT_TIMER5B_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(451): warning:  #47-D: incompatible redefinition of macro "INT_UART0" (declared at line 53 of ".\startup\tm4c123gh6pm.h")
      #define INT_UART0               INT_CONCAT(INT_UART0_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(452): warning:  #47-D: incompatible redefinition of macro "INT_UART1" (declared at line 54 of ".\startup\tm4c123gh6pm.h")
      #define INT_UART1               INT_CONCAT(INT_UART1_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(453): warning:  #47-D: incompatible redefinition of macro "INT_UART2" (declared at line 79 of ".\startup\tm4c123gh6pm.h")
      #define INT_UART2               INT_CONCAT(INT_UART2_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(454): warning:  #47-D: incompatible redefinition of macro "INT_UART3" (declared at line 98 of ".\startup\tm4c123gh6pm.h")
      #define INT_UART3               INT_CONCAT(INT_UART3_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(455): warning:  #47-D: incompatible redefinition of macro "INT_UART4" (declared at line 99 of ".\startup\tm4c123gh6pm.h")
      #define INT_UART4               INT_CONCAT(INT_UART4_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(456): warning:  #47-D: incompatible redefinition of macro "INT_UART5" (declared at line 100 of ".\startup\tm4c123gh6pm.h")
      #define INT_UART5               INT_CONCAT(INT_UART5_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(457): warning:  #47-D: incompatible redefinition of macro "INT_UART6" (declared at line 101 of ".\startup\tm4c123gh6pm.h")
      #define INT_UART6               INT_CONCAT(INT_UART6_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(458): warning:  #47-D: incompatible redefinition of macro "INT_UART7" (declared at line 102 of ".\startup\tm4c123gh6pm.h")
      #define INT_UART7               INT_CONCAT(INT_UART7_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(459): warning:  #47-D: incompatible redefinition of macro "INT_UDMA" (declared at line 90 of ".\startup\tm4c123gh6pm.h")
      #define INT_UDMA                INT_CONCAT(INT_UDMA_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(460): warning:  #47-D: incompatible redefinition of macro "INT_UDMAERR" (declared at line 91 of ".\startup\tm4c123gh6pm.h")
      #define INT_UDMAERR             INT_CONCAT(INT_UDMAERR_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(461): warning:  #47-D: incompatible redefinition of macro "INT_USB0" (declared at line 88 of ".\startup\tm4c123gh6pm.h")
      #define INT_USB0                INT_CONCAT(INT_USB0_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(462): warning:  #47-D: incompatible redefinition of macro "INT_WATCHDOG" (declared at line 66 of ".\startup\tm4c123gh6pm.h")
      #define INT_WATCHDOG            INT_CONCAT(INT_WATCHDOG_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(463): warning:  #47-D: incompatible redefinition of macro "INT_WTIMER0A" (declared at line 109 of ".\startup\tm4c123gh6pm.h")
      #define INT_WTIMER0A            INT_CONCAT(INT_WTIMER0A_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(464): warning:  #47-D: incompatible redefinition of macro "INT_WTIMER0B" (declared at line 110 of ".\startup\tm4c123gh6pm.h")
      #define INT_WTIMER0B            INT_CONCAT(INT_WTIMER0B_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(465): warning:  #47-D: incompatible redefinition of macro "INT_WTIMER1A" (declared at line 111 of ".\startup\tm4c123gh6pm.h")
      #define INT_WTIMER1A            INT_CONCAT(INT_WTIMER1A_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(466): warning:  #47-D: incompatible redefinition of macro "INT_WTIMER1B" (declared at line 112 of ".\startup\tm4c123gh6pm.h")
      #define INT_WTIMER1B            INT_CONCAT(INT_WTIMER1B_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(467): warning:  #47-D: incompatible redefinition of macro "INT_WTIMER2A" (declared at line 113 of ".\startup\tm4c123gh6pm.h")
      #define INT_WTIMER2A            INT_CONCAT(INT_WTIMER2A_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(468): warning:  #47-D: incompatible redefinition of macro "INT_WTIMER2B" (declared at line 114 of ".\startup\tm4c123gh6pm.h")
      #define INT_WTIMER2B            INT_CONCAT(INT_WTIMER2B_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(469): warning:  #47-D: incompatible redefinition of macro "INT_WTIMER3A" (declared at line 115 of ".\startup\tm4c123gh6pm.h")
      #define INT_WTIMER3A            INT_CONCAT(INT_WTIMER3A_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(470): warning:  #47-D: incompatible redefinition of macro "INT_WTIMER3B" (declared at line 116 of ".\startup\tm4c123gh6pm.h")
      #define INT_WTIMER3B            INT_CONCAT(INT_WTIMER3B_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(471): warning:  #47-D: incompatible redefinition of macro "INT_WTIMER4A" (declared at line 117 of ".\startup\tm4c123gh6pm.h")
      #define INT_WTIMER4A            INT_CONCAT(INT_WTIMER4A_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(472): warning:  #47-D: incompatible redefinition of macro "INT_WTIMER4B" (declared at line 118 of ".\startup\tm4c123gh6pm.h")
      #define INT_WTIMER4B            INT_CONCAT(INT_WTIMER4B_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(473): warning:  #47-D: incompatible redefinition of macro "INT_WTIMER5A" (declared at line 119 of ".\startup\tm4c123gh6pm.h")
      #define INT_WTIMER5A            INT_CONCAT(INT_WTIMER5A_, INT_DEVICE_CLASS)
    .\TI_lib\inc/hw_ints.h(474): warning:  #47-D: incompatible redefinition of macro "INT_WTIMER5B" (declared at line 120 of ".\startup\tm4c123gh6pm.h")
      #define INT_WTIMER5B            INT_CONCAT(INT_WTIMER5B_, INT_DEVICE_CLASS)
    source\main.c: 79 warnings, 0 errors
    assembling startup_rvmdk.S...
    compiling sysctl.c...
    compiling gpio.c...
    compiling timer.c...
    compiling interrupt.c...
    compiling uart.c...
    compiling cpu.c...
    linking...
    Program Size: Code=920 RO-data=16 RW-data=0 ZI-data=352  
    ".\output\No_opt\Objects\njg.axf" - 0 Error(s), 79 Warning(s).

  • Hi,

    Attach the Keil Uvision Project so E2E members can check project options. I still recommend that you use an existing example program like "hello" and then add your code.

    - kel
  • Hi Kel,

    Sample.zip has keil project. :)
  • I think what you should comment out or remove is #include "tm4c123gh6pm.h"

    At Project Options the device selected should be "LM4F120H5QR"

    This should be set at Preprocessor Symbols without a comma separator "rvmdk PART_TM4C123GH6PM TARGET_IS_BLIZZARD_RB1"

    - kel

  • Hi,
    I will try what you have said.
    Meanwhile another error:

    hw_adc.h -> #define ADC_CTL_VREF_M 0x00000003 // Voltage Reference Select ;line 415

    tm4c123gh6pm.h -> #define ADC_CTL_VREF_M 0x00000001 // Voltage Reference Select ; line 5460

    According to datasheet of tm4c123gh6pm, page 850 , shows ADC CTL register. Vref is bit0. So tm4c123gh6pm.h contains correct defination.
  • Hello Vindhyachal,

    Why add the tm4c123gh6pm.h and the inc/hw_xxx.h . That is the cause of the issue

    Regards
    Amit
  • Solved the problem ny removing tm4c123gh6pm.h

    but as I said earlier
    hw_adc.h -> #define ADC_CTL_VREF_M 0x00000003 // Voltage Reference Select ;line 415

    tm4c123gh6pm.h -> #define ADC_CTL_VREF_M 0x00000001 // Voltage Reference Select ; line 5460

    According to datasheet of tm4c123gh6pm, page 850 , shows ADC CTL register. Vref is bit0. So tm4c123gh6pm.h contains correct defination.
    Althogh upper bits are reserved for this register so doesn't make difference.


    Thanks
    VT
  • Hello VT,

    The define in hw_adc.h is for Mask bit while tm4c123gh6pm.h has the value bit.

    Regards
    Amit