Cheriette Development and Debugging

Morello

LLVM Tooling

LLVM tooling like llvm-objdump, llvm-readelf, clang etc. for Morello are available in /tools/llvm-morello-distribution/bin.

Common usage patterns are:

llvm-objdump with disassembly and source line annotations:

llvm-objdump -S <elf>

llvm-readelf with all ELF headers:

llvm-readelf –all <elf>

FVP Tooling

Running an image through /src/scripts/fvp-run.sh or /src/scripts/fvp-run-console.sh configures the FVP to perform runtime toggleable instruction-level tracing into /src/morello.log.

The FVP can be configured to detect hlt <code> instructions based on the <code> and notify the tracing plugin to toggle instruction tracing. The runtime toggle is configured to hlt 0x5, and defaults to off.

The following snippet shows how to toggle on and then off the instruction-level tracing:

/* Tracing off */
__asm__ volatile("hlt 0x5\n");
/* Tracing on */
__asm__ volatile("hlt 0x5\n");
/* Tracing off */