Qorivva MPC5xxx/SPC5xx Debugger and NEXUS Trace
70
©1989-2021 Lauterbach GmbH
Programming the RCHW or Boot Header
The RCHW or boot header holds information about the start address for the core(s) amongst other
configuration settings. Depending on the target processor, the RCHW/boot header is either read by the BAM
or BAF code, or directly evaluated by the processor’s reset logic. If a SYStem.Up is performed, the
processor sets the PC to the BAM/BAF start address in the BAM/BAF case, while in the reset logic case, the
PC will be directly set to the start address in the RCHW or boot header.
The RCHW or boot header typically is (and should be) part of the flash image, but it can also be generated
using the debugger, e.g. if the start address can be determined using debug symbols. The following example
shows how to manually program the RCHW on a MPC55XX processor. Addresses and contents vary
depending on the target processor in use.
Programming the Shadow Row
The flash programming example scripts included with TRACE32 declare the shadow row sector, but the
sector is set to flash algorithm NOP instead of TARGET. This way the sector is protected against accidental
erase or programming.
In order to enable programming or erasing the shadow row, the flash declaration has to be changed to
algorithm TARGET. Example:
FLASH.ReProgram ALL /ERASE
Data.LOAD.ELF * E:0x00--(&flashsize-1)
Data.Set 0x00 %Long 0x005A0000 ;boot identifier
Data.Set 0x04 %Long Var.ADDRESS("_start") ;start address
FLASH.ReProgram off
NOTE:
Programming the boot identifier without (or with an invalid) start address can
render the processor unusable and the debugger will fail to connect to the
processor. In order to regain access, pull the FAB pin of the processor HIGH.
This will configure the processor to boot from internal ROM instead of trying to
fetch the illegal boot address from flash. Once the FAB pin is high, the debugger
can connect and reprogram the FLASH.
;prepare flash programming
DO ~~/demo/powerpc/flash/mpc5xxx.cmm PREPAREONLY
;enable shadow row programming (change type NOP to TARGET)
FLASH.CHANGETYPE <shadow_row_base>++0x3FF TARGET
;program FLASH
FLASH.ReProgram ALL
...