AnsweredAssumed Answered

Symbol F_vector_addr referenced from address 0x00000218 in section .text of file .... is too far away for a R_56800E_WORD16 relocation, which has a range from 0 to 131070 bytes

Question asked by Dmitry Rogachev on Jan 4, 2016
Latest reply on Jan 4, 2016 by Dmitry Rogachev

ERROR: Symbol F_vector_addr referenced from address 0x00000218 in section .text of file .... is too far away for a R_56800E_WORD16 relocation, which has a range from 0 to 131070 bytes

CHIP: MC56F8323 (probably is not important)

Hi!

 

Working on CW8.0 and 8.3 and trying to get access to the program address in memory, using the linker command  .cmd file, I often get this error

 

So, In linker command file it will be something like;

........................ cmd begins: ..........................................

MEMORY {

        # I/O registers area for on-chip peripherals

        .x_Peripherals (RW)   : ORIGIN = 0xF040, LENGTH = 0

 

        # List of all sections specified in the "Build options" tab

        #Internal vector boot area.

        .p_Interruptsboot  (RWX) : ORIGIN = 0x00020000, LENGTH = 0x0004

        .p_Interrupts  (RWX) : ORIGIN = 0x00000000, LENGTH = 0x000000A4

        .p_Code  (RWX) : ORIGIN = 0x000000A4, LENGTH = 0x00003F5C

        .x_Data  (RW) : ORIGIN = 0x00000001, LENGTH = 0x00000FFF

 

 

        # p_flash_ROM_data mirrors x_Data, mapping to origin and length

        # the "X" flag in "RX" tells the debugger flash p-memory.

        # the p-memory flash is directed to the address determined by AT

        # in the data_in_p_flash_ROM section definition

 

        .p_flash_ROM_data  (RX) : ORIGIN = 0x00000001, LENGTH = 0x00000FFF

 

        #Other memory segments

        .x_internal_ROM  (RW)  : ORIGIN = 0x00001000, LENGTH = 0x1000

        .p_internal_RAM  (RWX) : ORIGIN = 0x0002F800, LENGTH = 0x0800

 

}

 

KEEP_SECTION { interrupt_vectorsboot.text }

KEEP_SECTION { interrupt_vectors.text }

 

SECTIONS {

 

        .interrupt_vectorsboot :

        {

          F_vector_addr = .;

          # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AF

          # interrupt vectors boot area

          * (interrupt_vectorsboot.text)

        } > .p_Interruptsboot

 

.................... other sections..................................

.............................................................................

 

In the program:

extern void * _vector_addr;

 

========================================

I already changed the settings for the memory models for the assembler [EDIT/sdm pROM-xRAM Settings/M56800E Assembler] to

Default Data Memory Model of 24 bits and Program memory model of 19 bits. It should cover all the memory range within the memory map of my DSC. (56F8323)

 

How to avoid this error?

Thanks.

Outcomes