This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Arm linker warning

how to resolve below warning:
warning: L6329W: Pattern Modbus_Mapper.o(.constdata) only matches removed unused sections.

I am using Keil compiler for cortex M3 controller.
plz explain with example/sample code as i m beginner in this concept.

  • my scatter file code is:

    
    LR_IROM1 0x00000000 0x00037000 {    ; load region size_region
      ER_IROM1 0x00000000 0x00037000 {  ; load address = execution address
       *.o (RESET, +First)
       *(InRoot$$Sections)
       .ANY (+RO)
      }
      RW_IRAM1 0x20000000 0x0000FFF0  {  ; RW data
       .ANY (+RW +ZI)
      }
      RW_IRAM2 0x2000FFFC 0x00000004  {
       .ANY (+RW +ZI)
      }
      MAPPER_CONFIG_DATA     0x0000D400     FIXED 0x00029C00
      {
            Modbus_Mapper.o (.constdata)
      }
    }
    

    plz help....

  • To remove the warning it is very good to interpret the warning message and understand what is happening.

    The warning message is telling you that a module only contains stuff that has been removed, so the module is empty.

    Why has the stuff been removed? probably because it is not being referenced by anything or that whatever is referencing it has been optimized out.

    So to get rid of your warning you must make sure that something that is present in your code is referencing something in that otherwise unused module.