STM32N6 ROM trace analyzer

1. Introduction

The BootROM implements a trace mechanism designed to assist users in debugging and understanding the behavior of the BootROM during its operation. This chapter provides a comprehensive guide on how to utilize the trace mechanism, including details on how traces are stored, how to analyze them, and how to compile and load the necessary firmware to interpret the traces.

2. Trace mechanism overview

The trace mechanism in the BootROM captures and stores binary trace data that records various events and states during the BootROM execution.

2.1. Storage of traces

The binary traces are stored in two designated memory areas in SRAM2 internal memory:

  • an area storing Secure BootROM traces, located at address @0x341037F0
  • an area storing Nonecure BootROM traces, located at address @0x241077F0

Both memory areas work together to provide a comprehensive record of the BootROM's operation.

3. Analysing traces

To analyze the binary traces, they must be parsed and translated into human-readable text messages. This process involves compiling a specific firmware that can interpret the binary data and output meaningful information.

  1. Downloading and compiling the firmware: the user must compile a firmware that includes the trace parsing and translation functionality. This firmware will be responsible for interpreting the binary traces. Article load a signed FSBL and get the BootRom traces details that procedure.
  2. Load the Firmware with BootROM: Once the firmware is compiled, it needs to be loaded and launched with the BootROM. This can be done either by flashing it on a flash device or by loading it from host through a serial interface.
  3. Parse and Translate Traces: The firmware will read the binary traces, parse them, and translate them into text messages. The translated text messages will be outputted on UART. By default the firmware displays traces on UART X at 115200 bauds, 8bits, 1 stop bit, no parity, no CTS/RTS. TBC