Flashing overview:

First board flashing can be done via the TI Uniflash flow over UART or via JTAG using
TRACE32's flashing command groups (FLASH and FLASHFILE). These flashing methods
require the starting SOC state to be that of early boot. This typically is achieved
by setting the EVM to a boot mode where the initial software can be controlled. The
boot mode can be controlled by sysboot and EMU0/1 pin settings via DIP switches or
resistor strapping. If the state is not known the flashing tools will likely crash
and fail due to conflicts in the SOC or the flash part.

Part flashing requires:
 - a properly formatted flash image --> generated from TI-SDK
 - SOC power and clocks to be setup --> done via JTAG or minimal-SBL often via UART
 - A flash tool which knows a parts algorithm -->TRACE32 flasher or Uniflash

Flashing tends to happen in two stages. Stage 1 is SOC init and Stage 2 is image flashing.

A JTAG first stage achieved by setting the SOC into a NOBOOT state which stops any
possibly conflicting code from running. It is also possible to stop the boot by using
wait in reset mode (WIR) by setting EMU=0, EMU1=1. The EVM is provisioned to allow 
both of these methods.  Custom boards need to do the same to achieve flashing.

An SBL based first stage requires a minimal startup on a non-flash interface like UART
or an external SD card.

Once the first state is executed a second stage of burning is possible.

Non-secure general purpose devices (GP) can be burned with only the control of the 
SYSBOOT settings.  High security (HS) devices can require the generation of a valid
certificate which the SOC must validate before burning can proceed. This certificate
can be sent via JTAG if the device is in WIR mode or the certificate can be bundled
into the 1st stage functional boot image (SBL+Cert).

The TRACE32 flashing scripts require a setting of {bare_metal="yes"} for JTAG 1st
stage loading or a setting of {bare_metal="no"} when using an SBL based 1st stage.
Flash scrips tend to be found in directories named "burn_flash".
