AN2757 Freescale Semiconductor / Motorola, AN2757 Datasheet - Page 12

no-image

AN2757

Manufacturer Part Number
AN2757
Description
MPC5200 Quick Start
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Framework
There are two Memory Configuration Files in the MPC5200_Quick_Start. The first one is used by all projects and project targets:
5.3
Startup code is a key part of each MPC5200_Quick_Start project. It is implemented in the source files located in the
“SystemConfig” sub-directory of the project folder on a hard disk.
12
init_flashonly.cfg - initializes only the Flash and TB counter only. Can be used with Flash Programmer as it does not
require SDRAM memory to be valid (it uses MPC5200 static RAM for its operation).
mmap_ram.mem - defines the memory area for 64MB of SDRAM starting at address 0x00000000, memory area of
16MB Flash memory starting at address 0xFF000000 and two memory areas for MPC5200 memory-mapped registers.
One such area is based at address 0x80000000, which is the reset value of the MBAR peripheral-base address register.
This address is used by the script in the Target Initialization File. The second memory-mapped registers area is opened
for MBAR at 0xF0000000, which is the default operational location of MBAR in Quick Start applications. The MBAR base
is defined in the “appconfig.h” configuration file and can be set by the Graphical Configuration Tool. For proper operation
of the CodeWarrior debugger, the “mmap_ram.mem” file should be updated any time the MBAR is assigned different
value in GCT. See
mmap_fbl.mem - is similar to the “mmap_ram.mem” above, with the exception that Flash memory is defined to start at
address 0x00000000 and SDRAM memory is not used. This Memory Configuration file can be used when debugging
the Flash-based “boot-low” applications directly from the Flash memory.
startup.c - contains the __start global entry point. The __start function is relocatable, which means it can be run from
any location and its purpose is to call several other subroutines to initialize the PowerPC Core registers, initialize board
and memory, initialize EABI registers and stack pointer, relocate the code from flash ROM Image into a proper RAM
destination, jump to the RAM location and continue by invoking the main() function.
board.c - contains __reset exception handler, which invokes the __start startup code. It also contains some hardware-
specific operations like enabling the Flash memory in CS0 space at address 0xFF000000 and preparing the SDRAM or
DDRAM memory. In the case of DDRAM, the functional tap-delay value is also detected.
ppc_eabi_init.c - contains functions to initialize or free the C++ environment (if used) and to call __pre_main() and
__post_main() user functions.
appconfig.c - this file contains a default implementation of the __pre_main() and __post_main() functions. In the
MPC5200_Quick_Start, the __pre_main() function can be configured by Graphical Configuration Tool to perform
automatic initialization of MPC5200 peripheral modules before the main() function is entered.
Startup Code
Section 6.6.2, MPC5200 Core (CORE)
AN2757 MPC5200 Quick Start and Graphical Configuration Tool
Figure 12. Debugger Settings
for more details.
Freescale Semiconductor

Related parts for AN2757