Hi I use Metroweks Codewarrior for 5249. I used the default memory configuration generated by the compiler. In that my code was positioned in SDRAM, which causes memory stalls for instructions. For eg: a MAC takes 8 cycles to execute. I tried positioning my code in SRAM, but it simply isn't running. I'm copying the linker command file I used to run the code. Somebody plz help me out. LINKER COMMAND FILE ************************************************************************** MEMORY { sdram (RWX) : ORIGIN = 0x00000000, LENGTH = 0x00800000 vector_ram (RWX) : ORIGIN = 0x00000000, LENGTH = 0x00000400 user (RWX) : ORIGIN = 0x20002000, LENGTH = 0x00005000 mbar (RWX) : ORIGIN = 0x10000000, LENGTH = 0x00000500 sram0 (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00010000 sram1 (RWX) : ORIGIN = 0x20010000, LENGTH = 0x00008000 mbar2 (RWX) : ORIGIN = 0x80000000, LENGTH = 0x40000000 } SECTIONS { .sdram : {} > sdram .mbar : {} > mbar .mbar2 : {} > mbar2 .sram0 : {} > sram0 .sram1 : {} > sram1 .vector_ram : {} > vector_ram .vectors : { # vectors.s (.text) . = ALIGN (0x4); } > user .text : { . = ALIGN (0x4); *(.text) . = ALIGN (0x4); *(.rodata) . = ALIGN (0x4); } >> user .data : { ___DATA_ROM = .; ___DATA_RAM = .; __START_DATA = .; *(.data) . = ALIGN (0x4); __END_DATA = .; __START_SDATA = .; *(.sdata) . = ALIGN (0x4); __END_SDATA = .; __SDA_BASE = .; . = ALIGN (0x4); } >> user .bss : { __START_SBSS = .; *(.sbss) . = ALIGN (0x4); *(SCOMMON) __END_SBSS = .; __START_BSS = .; *(.bss) . = ALIGN (0x4); *(COMMON) __END_BSS = .; . = ALIGN(0x4); } >> user .custom : { ___HEAP_START = .; ___HEAP_END = ___HEAP_START + 0x5000; ___SP_END = ___HEAP_END; ___SP_INIT = ___SP_END + 0x1000; . = ALIGN (0x4); } >> user ___MBAR = ADDR(.mbar); ___MBAR2 = ADDR(.mbar2); ___SDRAM = ADDR(.sdram); ___SRAM0 = ADDR(.sram0); ___SRAM1 = ADDR(.sram1); ___VECTOR_RAM = ADDR(.vector_ram); __SP_INIT = ___SP_INIT; ___heap_addr = ___HEAP_START; ___heap_size = 0x5000; __S_romp = 0x0; } ************************************************************************** Ramkumar |
Coldfire MCF 5249 Memory stalls
Started by ●February 23, 2005