MCF5225 TWR-MECH with TWR-MEM (locating code on external memory)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCF5225 TWR-MECH with TWR-MEM (locating code on external memory)

642 Views
abdulaziztakrou
Contributor I

Hi all,

 

I'v been running into a problem to debug my project on CW10.7. I have TWR-MECH (MCF5225) where my application require the extension of memory due to the size of the code. I have sat the miniflex bus (0X80000000) to access the MRAM memory on TWR-MEM and I changed the build file settings to load the code to the extMRAM at the address 0X80000000.

 

My debug session can't start the main code and it seems to have the trouble locating some of the memory elements pointed by the startcf.c where I get the error No source available where the interrupts are saved 

 

176025_176025.pngpastedImage_2.png

 

 

176027_176027.pngpastedImage_4.png

I would like to point that I'm a total beginner so all the build options and the components settings are generated automatically with CW (including the link file) which shown below with the memory segment:

 

KEEP_SECTION { .vectortable }

MEMORY {
interrupts (RX) : ORIGIN = 0x20000000, LENGTH = 0x00000600
code (RWX) : ORIGIN = 0x80000600, LENGTH = 0x0007A800
data (RW) : ORIGIN = 0x2000AC00, LENGTH = 0x00005400
ipsbar (RW) : ORIGIN = 0x40000000, LENGTH = 0x0
}

SECTIONS {
# Heap and Stack sizes definition
___heap_size = 0x0400;
___stack_size = 0x0400;

.ipsbar : {} > ipsbar

.interrupts :
{
___VECTOR_RAM = .;
* (.vectortable)
. = ALIGN (0x4);
} > interrupts

.text :
{
* (.text)
. = ALIGN(0x4);
* (.rodata)
. = ALIGN(0x4);
___ROM_AT = .;
___DATA_ROM = .;
} > code

.data : AT(___ROM_AT)
{
___DATA_RAM = .;
* (.exception)
. = ALIGN(0x4);
__exception_table_start__ = .;
EXCEPTION
__exception_table_end__ = .;

___sinit__ = .;
STATICINIT

___DATA_START =.;
* (.data)
. = ALIGN (0x4);
___DATA_END =.;

__SDATA_START =.;
* (.sdata)
. = ALIGN (0x4);
__SDATA_END = .;

__SDA_BASE = .;
. = ALIGN(0x4);
} > data

.bss :
{
__START_SBSS = .;
* (.sbss)
*(SCOMMON)
__END_SBSS = .;

__START_BSS = .;
* (.bss)
* (COMMON)
__END_BSS = .;
. = ALIGN(0x4);
} >> data

# 64 Kbytes Internal SRAM
___RAMBAR = 0x20000000;
___RAMBAR_SIZE = 0x00010000;

# 512 KByte Internal Flash Memory
___FLASH_ADDRESS = 0x00000000;
___FLASH_SIZE = 0x00080000;

___IPSBAR = ADDR(.ipsbar);

___SP_AFTER_RESET = ___RAMBAR + ___RAMBAR_SIZE - 4;
___HEAP_START = .;
___HEAP_END = ___HEAP_START + ___heap_size;
___SP_END = ___HEAP_END;
___SP_INIT = ___SP_END + ___stack_size;

___mem_limit = ___HEAP_END;
___stack_safety = 16;

___heap_addr = ___HEAP_START;
___heap_size = ___HEAP_END - ___HEAP_START;
__SP_INIT = ___SP_INIT;

_romp_at = ___ROM_AT + SIZEOF(.data);
.romp : AT(_romp_at)
{
__S_romp = _romp_at;
WRITEW(___ROM_AT);
WRITEW(ADDR(.data));
WRITEW(SIZEOF(.data));
WRITEW(0);
WRITEW(0);
WRITEW(0);
}
}

 

I'm not sure if I have to do more to point the startup to the main or whatever it's not possible to place to code on the external MRAM for initialisation.

I was trying to read the notes in relation to the LCF commands file but it look like the code has to be loaded into the intRAM then copied to the extRAM before the startup. I thought as well that the application can't be initiated from the miniflex. 

Labels (1)
Tags (3)
0 Kudos
Reply
1 Reply

513 Views
TomE
Specialist II

If you don't get an answer from here, I would suggest searching the Code Warrior forums, and if nothing turns up, post in the appropriate CW forum.

Tom

0 Kudos
Reply