AN2757 Freescale Semiconductor / Motorola, AN2757 Datasheet - Page 6

no-image

AN2757

Manufacturer Part Number
AN2757
Description
MPC5200 Quick Start
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
MPC5200 Quick Start Projects
4.2
Except the BestComm and DMA functionality, all three project templates in the MPC5200_Quick_Start Stationery are identical.
This section describes the project targets available in each project and how to use the targets to debug or to prepare a standalone
application.
A project “Target” is in fact a named and saved configuration of project, including the set of files to compile, actual settings of the
compiler/linker and settings of the debugger environment. The following targets are available in each MPC5200_Quick_Start
project:
6
RAM Debug - This target is primarily used for debugging of the embedded application over a BDM link. The
CodeWarrior debugger uses the BDM interface to prepare the Lite5200 system (Clocks, SDRAM memory,...) and
downloads the application executable directly into the RAM for debugging.
ROM Image - This target can be used for debugging without BDM interface or to deploy applications to firmware-based
systems. The application is compiled into a compact self-extracting executable image (relocatable), which can be loaded
and started by the Lite5200 firmware (e.g. dBug). The firmware is typically capable of loading the image over ethernet
network using a TFTP protocol and of saving the image into the non-volatile memory. In case of debugging, the image
is typically downloaded and run manually using the firmware console commands. When making an application
standalone, the firmware can be configured to run the image automatically after the system boots up.
When the image is run (by jumping to its base address), it relocates itself into operational RAM and begins execution
of its main() program. Memory relocation typically means the firmware’s variables and exception vectors are lost and
firmware operation can not resume if the application ever finishes.
Standalone BL - After an application is debugged using one of the targets described above, the “Standalone BL” target
can be used to compile a standalone executable image. When this image is programmed to the Lite5200 Flash memory
starting at Flash address 0 the application is ready for “boot-low” standalone operation not requiring any firmware. The
startup code takes care of relocating the Flash memory to the end of the address space (0xFF000000), initializing
SDRAM controller and SDRAM memory from address 0x00000000, relocating the code and starting the main() from
RAM.
As the Lite5200 comes with the dBug firmware as a “boot-high” option by default (at address 0xFFF00000), the
application image built with “Standalone BL” target can co-exist with the firmware. The user selects the “boot-low” or
“boot-high” option using a jumper switch on the Lite5200 board.
SDRAM Memory
Flash Memory
Code Execution
Executable Name
Entry Point
Prefix File Macro
Project Targets
As the MPC5200 system is not in the post-reset state when running an application of the
“ROM Image” target, it is highly recommended to enable the “Generate all register
values” setting in the GCT options. Otherwise, the GCT saves modified (non-reset value)
register values only into the “appconfig.h” file. And as the firmware configures some modules
for its own use there is a risk the modules are only partially re-configured by the Quick Start
initialization code. See
AN2757 MPC5200 Quick Start and Graphical Configuration Tool
Set up by debugger
Not used
From SDRAM only
ramdebug.elf /
ramdebug.mot
__start
TARGET_RAMDEBUG
Table 1. Comparing MPC5200_Quick_Start Targets
RAM Debug
Section 6.4, GCT Options
Set up by firmware
Not required (can be used
by firmware to store the
image)
Starts wherever the ROM
Image is based,
continues in SDRAM
romimage.elf /
romimage.mot
offset 0 of the image
TARGET_ROMIMAGE
NOTE
ROM Image
for more details.
Set up by application itself
Used for boot-low at
address 0x00000000. Later
relocated to 0xFF000000
Starts in Flash, continues
in SDRAM
runram_bl.elf /
runram_bl.mot
Boot-low: 0x00000100
(__reset)
TARGET_RUNRAM
Standalone BL
Freescale Semiconductor

Related parts for AN2757