Hi Ziggy,
How do you exactly access those memory locations? Are you trying to place, code, variables, constants there?
Briefly:
• Small memory model: Both your code and variables are put by default in non-banked locations.
The compiler will not insert any instructions to handle any page register. Variables will be accessed directly in non-banked locations and your code will be executed using JSR/RTS instructions.
• Banked memory model: Your code is put by default in a banked location, but your variables are
put by default in non-banked locations.
The compiler will use instructions that handle the PPAGE register when accessing your code. The CALL instruction will be used when calling a function. This CALL instruction takes care of writing your function's page number to the PPAGE register prior to executing it. By default, the variables continue to be accessed as if they were in non-banked locations.
Regarding the linker parameter files (*.prm), what changes basically between the small and banked memory models parameter files is the location of the DEFAULT_ROM label.
The small memory model parameter file does not use the paged Flash locations. The label OTHER_ROM
is pointing to paged locations, but is not used by the wizard-created project. OTHER_ROM is only there for
the programmer to use it if needed.
It is important to understand that you can work with paged or non-paged objects in any memory model.
The memory model only affects the default location and the default compiler behavior.
For detailed information please see following appnote AN3784 (section 5, page 11):
Understanding the Memory Scheme in the S12(X) Architecture
Some additional information and examples, you can find in CodeWarrior Technical Note TN238 and TN240 located in CW installation folder which is by default - c:\Program Files (x86)\Freescale\CWS12v5.1\Help\PDF\
Have a great day,
iggi
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------