Reset notes when using the Green Hills Probe
============================================

The MPC5746R has two debuggable cores:
0. e200z425 - Lockstep
1. e200z425 - Main

As determined by flash contents, one or more of the cores exits reset at a
reset vector, while the other cores remain in a holdoff state. In the factory
default configuration, core 1 boots out of reset. 

The 'reset' command is only valid when directed to a core that has a valid
reset vector (such as core 1). If you attempt to reset a core without a valid
reset vector, the probe outputs the message 'Target does not support hardware
reset', and MULTI waits indefinitely for the core to halt post-reset. To
abort this operation, press the 'Escape' key and retry the reset from a core 
with a valid reset vector. If you see this message while programming flash, 
run the flash programmer from a different core. 

If you change the bootable core, (for example, by modifying the boot header), 
you must disconnect from mpserv and then reconnect. 


Flashing a program to the MPC5746R board 
========================================

To program the internal flash memory on the MPC5746R, the RAM base address 
must be set to 0x40000100. In the flash dialog, enter this address in the 
RAM base text field. If you are programming flash using the flash burn 
command, append -rambase=0x40000100 to the command line. The base address 
of flash should point to the beginning of the UTEST block at 0x00400000. 


Board Initialization Library
============================
A custom Board Initialization library can be selected when creating a project.
This includes example code for multicore bringup.

* The library is designed to be run from core 1. Make sure to select this core
  when flashing the program. Core 1 bootstraps the other core and runs main().

* Core 0 is brought out of reset-holdoff by writes to MC_ME in
  __ghs_board_devices_init (in mpc5746r.ppc). Once enabled, the core sets its
  stack pointer to the end of its local DMEM and then branches to
  secondary_core_main(void). If either the stack section is not defined or
  if secondary_core_main() does not exist, the core spins at
  __ghs_secondary_core_exit.

* Syscalls (including file i/o) and heap allocation are not supported on core
  0 when using libboardinit and the standard libsys.

* After connecting to the Green Hills Probe, use the 'new' command so
  that the same binary is bound to all cores. Then, when flashing
  to ROM, use the 'prepare_target -flash -allcores' command from core 1 to
  flash the project and prepare all the cores.
* To restart the program, issue 'reset' from core 1 and then run. Any existing
  breakpoints on core 0 will be automatically re-installed when they are
  released from reset. 
* Breakpoints may not be set or cleared while a core is held in reset. 
* Software breakpoints are not currently supported in code shared by
  multiple cores.
