 
					
				
		
The XEP100 has 64K of RAM.
Processor Expert allocates only 8K in Segment1.
How do I tell PE to allow usage of all 64K?
Thanks,
Anders J
解決済! 解決策の投稿を見る。
 
					
				
		
Hello,
to access whole 64K of RAM its necessary to switch to “Large memory” model, where the whole RAM will be available through page window.
Since there is no way how to create new PE project with “Large” memory model selected by default, it is necessary to switch it within Build Options tab in CPU component. For more details please see enclosed build_options_tab.png.
Steps to switch from “Banked” memory  model to “Large” memory model in PE:
1 – create new PE project with Banked memory model
2 – switch “Memory model” property in “Build Options” tab to “Large”
3 – confirmation window will be opened – please click on “Yes” button
4 - go to project compiler settings and switch "-Mb" to "-Ml" option. For more
details please see enclosed compiler_settings.png
4 - go to "Project panel" to "Files" tab and change ansixbi.lib to ansixli.lib
in "Libraries" folder
5 – start code generation. It will update the prm file.
In case of Large memory model, paged ram is in PAGED_RAM PLACEMENT, therefore it is
necessary to use appropriate pragma in C code to access this memory.
For more details about properly using of pragma directives please see "5.1
How to use pragma statements to control location of objects" chapter in :
http://cache.freescale.com/files/soft_dev_tools/doc/app_note/AN3784.pdf
Note:
AN3784 also contains description of small, banked, large memory models.
 
					
				
		
Hello,
to access whole 64K of RAM its necessary to switch to “Large memory” model, where the whole RAM will be available through page window.
Since there is no way how to create new PE project with “Large” memory model selected by default, it is necessary to switch it within Build Options tab in CPU component. For more details please see enclosed build_options_tab.png.
Steps to switch from “Banked” memory  model to “Large” memory model in PE:
1 – create new PE project with Banked memory model
2 – switch “Memory model” property in “Build Options” tab to “Large”
3 – confirmation window will be opened – please click on “Yes” button
4 - go to project compiler settings and switch "-Mb" to "-Ml" option. For more
details please see enclosed compiler_settings.png
4 - go to "Project panel" to "Files" tab and change ansixbi.lib to ansixli.lib
in "Libraries" folder
5 – start code generation. It will update the prm file.
In case of Large memory model, paged ram is in PAGED_RAM PLACEMENT, therefore it is
necessary to use appropriate pragma in C code to access this memory.
For more details about properly using of pragma directives please see "5.1
How to use pragma statements to control location of objects" chapter in :
http://cache.freescale.com/files/soft_dev_tools/doc/app_note/AN3784.pdf
Note:
AN3784 also contains description of small, banked, large memory models.
 
					
				
		
This is because by default only 8k of RAM are not paged and accessible directly. The rest can be accessed via 4k RPAGE window at 0x1000-0x1FFF, or using global memory addressing.
You can map additional 16k of RAM to 0x4000-0x7FFF (instead of flash) making contiguous 8+16=24k RAM segment at 0x2000-0x7FFF. You can do that using PE. See CPU component properties. Internal resource mapping. Set Int. FLASH in 0x4000-0x7FFF to OFF and set Int. RAM in 0x4000-0x7FFF to ON.
If don't wan't paged RAM and need little more, then you can add RPAGE window and form contiguous 4k+24k =28k segment at 0x1000-0x7FFF. But PE won't help you here. You need to edit PRM file.
Do you need to allocate some big array, something like single 40kB array? You can do that using global addressing, though more PRM editing might be required.
 
					
				
		
I have seen the remapping option, but was afraid to use it without understanding the implications.
Will I loose Int.FLASH, or is it just relocated?
What I "want" is access to all 64K so I can allocate storage just by declaring variables
in the "normal" simple way. That seems not possible from what I read in your post.
"Big array?" Not really. This happened when I declared a number of communication buffers
together with other miscellaneous variables.
I do not understand the concept of global adressing.
What does that mean?
Can you show me an example?
Thanks for helping,
Anders J
 
					
				
		
You won't loose flash, but you will loose nonpaged flash. Accessing constants in flash is faster when constants are allocated in nonpaged flash.
Large memory model at the cost of spped might be the way to go. To enable it, create new project as usually, with Memory model = Banked, else project wizard won't allow you to use PE. In PE Build Options switch memory model to Large.
Then in Standard Settins find Compiler Options, in Code Generation tab find memory model and change it to Large. Then you should be able to use all the RAM. Though I'm not sure about >4kB objects.
It's hard to expplain it in few words. Please study CPU12X(E) reference manual.
