M52233DEMO Memory Map / Documentation

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

M52233DEMO Memory Map / Documentation

1,851 Views
czerofusion
Contributor I
Hi,
I was wondering if anyone would know where I can obtain documentation on the MCF52233 memory layout.  More specifically- a memory map.
I recently obtained the M52233DEMO, and am in the process of modifying the .lcf file in order to create a separate stack space.  After combing through the MCF52235 Reference Manual, I am still unable to determine where the actual start and end of RAM is located.
Bare with me, I'm new to this.
 
Thanks
Labels (1)
0 Kudos
3 Replies

353 Views
mccPaul
Contributor I
The Coldfire's memory map is configured with the CPU registers IPSBAR, RAMBAR and FLASHBAR - you need look them up in the M52233 user's manual.
 
These CPU registers are normally setup by startup code that runs at the beginning of your application. If you add sections to the linker command file and make the linker place your code in these new sections without regard to RAMBAR you will get odd effects.
 
I don't use the CodeWarrior compiler so I don't know how the stationery for the 522xx targets sets up the memory map, but it is fairly common to have SRAM at 0x20000000 and internal flash at 0xf0000000. On CPUs with external RAM and flash these are often placed at 0x00000000 and 0xffe00000. Try searching through your source to find the entry point (usually _start) and then trace through the code to see how the startup code is setting up the memory map.
 
Good luck,
 
Paul.
0 Kudos

353 Views
PaoloRenzo
Contributor V
Hi

I´m not sure what you are asking for:

internal RAM is 32K

sram (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00008000

You should check CW project templates for LCF files.

For more documentation about LCF you can check:

C:\Program Files\Freescale\CodeWarrior for ColdFire V6.3\Help\PDF\ColdFire_Build_Tools_Reference.pdf

Good luck!
0 Kudos

353 Views
czerofusion
Contributor I
Hi,
Thanks for the response.  I modified my .lcf file like so:
 
MEMORY {
 vector_ram (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000500
 user       (RWX) : ORIGIN = 0x20000500, LENGTH = 0x00007B00 
 loser_region (RWX) : ORIGIN = AFTER(user), LENGTH = 0x00002710  
 ipsbar     (RWX) : ORIGIN = 0x40000000, LENGTH = 0x0
}
 
 
My code runs fine as I load the "loser_region" up with random data.
 
What I'm trying to figure out is that if sram is 32k, what part of memory ( what kind of memory) is my "loser_region" segment in?  
 
Also, if I set the ORIGIN of the "loser_region" to 0x30000000, my program crashes the instant I run it.
 
 
Thanks
 
 
 
 
 
0 Kudos