I am getting following warning after building my project " L46: SFR SYMBOL HAS DIFFERENT VALUES SYMBOL: p .\DP8051\DP8051_Keil_951\Debug\main.obj (MAIN) "

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

" L46: SFR SYMBOL HAS DIFFERENT VALUES SYMBOL: p .\DP8051\DP8051_Keil_951\Debug\main.obj (MAIN) "

CODE

main.c

#include "project.h"

#include "FPU.h"

#include "FPU_I2C.h"

uint8 EZI2C_Buffer[EZI2C_BUF_SIZE];

uint8 p;

int main(void)

{

  CyGlobalIntEnable; /* Enable global interrupts. */

  

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

 

    EZI2C_Start();

       /* Configure EZI2C buffer, only WRITE_REG_SIZE(15) bytes are writable */

      EZI2C_SetBuffer1(EZI2C_BUF_SIZE,EZI2C_RWBOUNDRY,EZI2C_Buffer);

   

    // Initialize Read-only Block for module 1

    for (i=0; i < RO_REG_BLOCK_SIZE; i++) {

        ro_regs = i;

    }

   

    // Initialize Read-only Block for module 2

    for (i=0; i < RO_REG_BLOCK_SIZE; i++) {

        ro_regs_MOD2 = i;

    }

   

    // Initialize Read write registers for module 1

    for (i=0; i < RW_REG_BLOCK_SIZE; i++) {

        rw_regs = i; //0x80-i;

    }

   

    // Initialize Read write registers for module 2

    for (i=0; i < RW_REG_BLOCK_SIZE; i++) {

        rw_regs_MOD2 = i; //0x80-i;

    }

...

...

...

...

...

...

..

for(p=0;p<=(2*TOTAL_NUMBER_OF_RO)+1;p++)

            {   if(p<=TOTAL_NUMBER_OF_RO)

                 {  //for module 1

                    EZI2C_Buffer[EZI2C_RWBOUNDRY+p]=ro_regs

;

                    /* Place your application code here. */

                  }

}

Header file

FPU.h

    #define MAJOR_VERSION                                                        0x1                        // Should only be between 0-F

    #define MINOR_VERSION                                                        0x2                        // Should only be between 0-F

    #define VERSION                                                (MAJOR_VERSION << 4) | MINOR_VERSION

    #define I2C_SLAVE_ADDR                                                        0x28 // 50 is the address from Sw/diag

    #define    RO_REG_BLOCK_SIZE                                                    0x80                    // Read only register Block size

    #define    RW_REG_BLOCK_SIZE                                                    0x80                    // Read write register Block size

    #define    EZI2C_BUF_SIZE                                                        255

    #define    EZI2C_RWBOUNDRY                                                        100   //100 to 255 read only buffer

    #define    TOTAL_NUMBER_OF_RO                                                   72    //100 to 172 ro of module 1, 173-245 ro of module 2

    #define    TOTAL_NUMBER_OF_RW                                                   35    // 0-35 rw of module 1, 36-71 rw of module 2

    #define TOTAL_NUMBER_OF_LED_PINS                                            8

    #define STARTING_INDEX_OF_LED_PINS                                          82

0 Likes
1 Solution
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Please refer this link for info on this warning:

LX51: ERROR/WARNING ON SYMBOL DEFINITION

Please try doing a Clean and build.

Please attach the project if possible.

View solution in original post

0 Likes
1 Reply
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Please refer this link for info on this warning:

LX51: ERROR/WARNING ON SYMBOL DEFINITION

Please try doing a Clean and build.

Please attach the project if possible.

0 Likes