cembeddedmicrocontrollercodewarrior

_f_data_rom linker script symbols


I am working on startup code of micro controller 32 bit and codewarrior compiler , As we have to deal with linker script. Certain variables that used in startup code for initilization of RAM and stack come from linker script.

Linker Script initialize these variables with different address. Problem is one variable have wrong address. In linker script it initialized by following command _f_data_rom.

it looks like

RC_SDATA_SRC       = _f_sdata_rom;
RC_SDATA_DEST      = _f_sdata;
RC_SDATA_SIZE      = (SIZEOF(.sdata)+3) / 4;
RC_DATA_SRC        = _f_data_rom;
RC_DATA_DEST       = _f_data;
RC_DATA_SIZE       = (SIZEOF(.data)+3) / 4;

Solution

  • Looking at this document at page 69 you have to look at __ppc_eabi_linker.h how those variable are exported, e.g: this link to file

    Into the same document, at page 65 you can find the form that configure addresses for linker. Take a look at that and check those settings.