MPC554 - Command line link does not appear to use .LCF file.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC554 - Command line link does not appear to use .LCF file.

1,181件の閲覧回数
Brad
Contributor I

The LCF file works correctly with CodeWarrior IDE.  However when used with the command line linker, the linker appears to completely ignore the .LCF file.  It gives me no warnings or faults, it just doesn't map the information in the LCF file.

 

From the .map file:

>>> SYMBOL NOT FOUND: __IV_ADDR
>>> SYMBOL NOT FOUND: CPUTBL_Get
>>> SYMBOL NOT FOUND: exit
>>> SYMBOL NOT FOUND: _ExitProcess
>>> SYMBOL NOT FOUND: fegetround
>>> SYMBOL NOT FOUND: remainderf
>>> SYMBOL NOT FOUND: InitializeUART
>>> SYMBOL NOT FOUND: WriteUARTN
>>> SYMBOL NOT FOUND: ReadUARTN
>>> SYMBOL NOT FOUND: __EXTERNAL_FLASH_START
>>> SYMBOL NOT FOUND: __EXTERNAL_SRAM_START
>>> SYMBOL NOT FOUND: __STACK_SIZE
>>> SYMBOL NOT FOUND: __SP_END
>>> SYMBOL NOT FOUND: __SRAM_SIZE
>>> SYMBOL NOT FOUND: __SRAM_START
>>> SYMBOL NOT FOUND: __SP_INIT
>>> SYMBOL NOT FOUND: __SBSS_SIZE
>>> SYMBOL NOT FOUND: __SBSS_START
>>> SYMBOL NOT FOUND: __SBSS2_SIZE
>>> SYMBOL NOT FOUND: __SBSS2_START
>>> SYMBOL NOT FOUND: __BSS_SIZE
>>> SYMBOL NOT FOUND: __BSS_START
>>> SYMBOL NOT FOUND: __EXTERNAL_SRAM_SIZE
>>> SYMBOL NOT FOUND: __ROM_COPY_SIZE
>>> SYMBOL NOT FOUND: __DATA_ROM
>>> SYMBOL NOT FOUND: __SRAM_CPY_START
>>> SYMBOL NOT FOUND: __ROM_COPY2_SIZE
>>> SYMBOL NOT FOUND: __SDATA2_ROM
>>> SYMBOL NOT FOUND: __SRAM_CPY2_START

 

The call to the linker:

 

q:\mwldeppc.exe -char signed -r -l d:\tdec500\ -search -msgstyle parseable -w on -proc Zen -fp soft -application -big -gdwarf-2 -model absolute -abi eabi -sdata 64 -sdata2 8 -heapsize 32 -stacksize 32 -stdlib -linkmode normal -map -listclosure -mapunused -stackaddr 0x003DFFF0 -rambuffer 0x00040000 -romaddr 0x00040000 -lcf cmd_line.lcf -srec cmdLineSre -sreclength 26 -sreceol dos -m __start -sortsrec -code_merging off -o tdec500 *.o

 

The linker command file:

/* A separate binary file is generated for each MEMORY directive. The hex
address of the location should be loaded between filename and extension. */
BIN_FILE_TYPE(MULTIPLE_BIN_FILES)

/* Removes unitialized data contained in a binary file. This is used if the
last section(s) of a binary file contain unitialized data. */
NO_TRAILING_BSS_IN_BIN_FILES

/******************************************************************************
memory map
******************************************************************************/
/*MAX_BIN_GAP(0x00200000) */
MEMORY
{
/* Standalone descriptor */
standalone : org = 0x00000000, len = 0x00000040
/* INTERNAL FLASH 2M - 64K for bootloader */

/* L2 INTERNAL FLASH */
tables : org = 0x00010000, len = 0x0000C000
/* L3 INTERNAL FLASH */
descriptor : org = 0x0001C010, len = 0x00000010
driver : org = 0x0001C020, len = 0x000003E0
init : org = 0x0001C400, len = 0x00000C00
unused : org = 0x0001D000, len = 0x00003000
/* L4-L5 INTERNAL FLASH */
profiles : org = 0x00020000, len = 0x0001FFF0
/* L6-H7 INTERNAL FLASH */
rom : org = 0x00040000, len = 0x001BFFE0
hw_version : org = 0x001FFFE0, len = 0x00000018
present : org = 0x001FFFF8, len = 0x00000008
/* External flash ( ) */
ext_flash : org = 0x20000000, len = 0x00000000
/* External SRAM ( 2 CY7C1041 chips for total of 1 Mb) */
ext_sram : org = 0x3FF00000, len = 0x00100000
/* Internal SRAM */
ram : org = 0x40000000, len = 0x0000DC20
driver_ram : org = 0x4000DC20, len = 0x000003E0
heap : org = 0x4000E000, len = 0x00002000
/* Area for initial stack (stolen cache way(s))
Granularity: 4K, max 32K
*/
stack_1 : org = 0x40040000, len = 0x00002000
}


/******************************************************************************
section allocation
******************************************************************************/
SECTIONS
{
.standalone LOAD(ADDR(standalone)) : {} > standalone
.tables LOAD(ADDR(tables)) : {} > tables
.descriptor LOAD(ADDR(descriptor)) : {} > descriptor
.driver LOAD(ADDR(driver)) : {} > driver
.init LOAD(ADDR(init)) : {} > init
.profiles LOAD(ADDR(profiles)) : {} > profiles
.hw_version LOAD(ADDR(hw_version)) : {} > hw_version

GROUP :
{
.text (TEXT) : {}
.rodata : { *(.rdata) *(.rodata) }
.ctors : {}
.dtors : {}
.xcptn ALIGN(0x10000) : {}
extabindex : {}
extab : {}
__DATA_ROM = (. + 7) & ~7;

} > rom

GROUP :
{
.data LOAD( __DATA_ROM) : {}

PROVIDE(__SDATA_ROM = (__DATA_ROM + SIZEOF(.data) + 7) & ~7);
.sdata LOAD( __SDATA_ROM) : {}

.sbss : {}

PROVIDE(__SDATA2_ROM = (__SDATA_ROM + SIZEOF(.sdata) + 7) & ~7);
.sdata2 LOAD(__SDATA2_ROM) : {}

.sbss2 : {}

.isrvectbl ALIGN(0x800) : {}

.bss : {}
.heap : {}
} > ram

.stack : {} > stack_1

PROVIDE(__EXTRAM_ROM = (__SDATA2_ROM + SIZEOF(.sdata2) + 7) & ~7);
.extram LOAD(__EXTRAM_ROM) : {} > ext_sram

/* Stack address parameters */
__SP_INIT = ADDR(stack_1) + SIZEOF(stack_1);
__SP_END = ADDR(stack_1);
__STACK_SIZE = SIZEOF(stack_1);

/* SRAM address parameters */
__SRAM_CPY_START = ADDR(.data);
__ROM_COPY_SIZE = (SIZEOF(.data) + SIZEOF(.sdata));
__SRAM_CPY2_START = ADDR(.sdata2);
__ROM_COPY2_SIZE = SIZEOF(.sdata2);

/* BSS address parameters */
__SBSS_START = ADDR(.sbss);
__SBSS_SIZE = SIZEOF(.sbss);
__SBSS2_START = ADDR(.sbss2);
__SBSS2_SIZE = SIZEOF(.sbss2);
__BSS_START = ADDR(.bss);
__BSS_SIZE = SIZEOF(.bss);

/* Interrupt handler parameters */
__IV_ADDR = ADDR(.xcptn);

}


/******************************************************************************
constants
******************************************************************************/
_stack_addr = ADDR(stack_1) + SIZEOF(stack_1);
_stack_end = ADDR(stack_1);
_heap_addr = ADDR(heap);
_heap_end = ADDR(heap) + SIZEOF(heap);
__SRAM_START = ADDR(ram);
__SRAM_SIZE = (_heap_end + 1) - ADDR(ram);
__EXTERNAL_FLASH_START = ADDR(ext_flash);
__EXTERNAL_FLASH_SIZE = SIZEOF(ext_flash);
__TABLES_START = ADDR(tables);
__TABLES_SIZE = SIZEOF(tables);
__PROFILES_START = ADDR(profiles);
__PROFILES_SIZE = SIZEOF(profiles);
__HW_VERSION_START = ADDR(hw_version);
__HW_VERSION_SIZE = SIZEOF(hw_version);
__EXTERNAL_SRAM_START = ADDR(ext_sram);
__EXTERNAL_SRAM_SIZE = SIZEOF(ext_sram);
__LINKER_FLASH_DRIVER_RAM_ADDRESS = ADDR(driver_ram);
__LINKER_FLASH_DRIVER_ROM_ADDRESS = ADDR(driver);
__LINKER_FLASH_DRIVER_SIZE = SIZEOF(driver) >> 2;
LINKER_PRESENT_FLAG_ADDRESS = ADDR(present);
LINKER_RAM_ADDRESS = ADDR(ram);

ラベル(1)
タグ(1)
0 件の賞賛
2 返答(返信)

486件の閲覧回数
benfleming
Contributor II

On mwldmcf.exe (the Coldfire linker) there is no -lcf option. Instead, you provide the .lcf file as one of the files to 'link'. The linker recognizes the .lcf extension and parses the file

0 件の賞賛

486件の閲覧回数
J2MEJediMaster
Specialist I

Have you tried specifying the complete directory path to the linker command file? Just a thought.

 

---Tom

0 件の賞賛