Reference Materials

Hardware Documentation

Cortex-M Overview

CPU Core: ARM Cortex-M0+

MCU: NXP KL25Z128

Development Board: NXP FRDM-KL25Z

Expansion Shield

Software Documentation

Arm ISA References 

Tools

MDK-ARM

Waveforms + Analog Discovery 2/3: Visualizing Code Timing with Debug Signals

  • Instructions on Visualizing Code Timing using debug signals, Analog Discovery tool and Waveforms program.
  • MDK-ARM Demonstration project with Waveforms workspace is on class repository in Tools\TestCode\DebugSignals. 

Ghidra Software Reverse-Engineering Tool

  • Home page
  • Installation guide
    • Download the latest zip file from github (e.g. Ghidra 11.2.1 -> Assets -> ghidra_….zip)
    • You may need to install a newer version of the JDK.
      • You can find all the copies of java.exe on your PC by opening a CMD window and typing where java.exe. The path should indicate the java version number.
      • See the Installation Guide for details and links to installers for newer versions (e.g. Adoptium Temurin and Amazon Corretto). 
    • Note: if you put the Ghidra directory in Program Files, then you’ll need to run Ghidra with Administrator privileges. It’s better to put it in Users\<your_login>\Ghidra.
  • Cheat sheet with command shortcuts
  • Development links
Create New Project
  1. File->New Project (Ctl-N)
  2. Non-Shared Project, Next
  3. Select the project directory (change if needed) and create a name for the project. Click Finish.
  4. Click on green Ghidra head in Tool Chest (upper left)
  5. Use File->Import File (I), navigate to your MDK project’s Object directory, highlight the .axf file and click Select File to Import.
  6. Format should be Executable and Linking Format (ELF), Language should be ARM:LE:32:v8:default. Click OK.
    1. Note: if you get an error at this point about access being denied to the language file, then you need to run Ghidra with Admin privileges, or move the Ghidra folder to a user-writable location.
  7. When Import Results Summary window opens, click OK.
  8. Answer Yes to “… has not been analyzed. Would you like to analyze it now?”
  9. Ghidra versions before 10.2.2 may require you preload Debug Info Entries: In Analysis Options -> Analyzers, select DWARF, then in Options (on right), check Preload all DIEs (the last box).
  10. Then select Analyze.

Video showing this process: Ghidra – New Project and Import axf

Basic Navigation
  • Use the Functions window to see a list of all the functions identified in the program. These include handlers and threads.
  •  Clicking on a function in the Functions window brings up the disassembly code in the Listing window, and shows function trees for incoming and outgoing calls.
  • Clicking on the   icon (1+3 green squares, “Display Function Graph”) shows the control-flow graph for the function (not the function call graph).

Get Regions: PC-Sampling Profiler

Most documentation is in the current ESO repository at Tools/GetRegions/Profiling Tools.pdf.

  • Profiles without LCD This document shows how to get profile information through the debugger if the LCD is not active or present.

Call Graph Tool

  • Must be located in ESA-2?/Tools/Calls
  • Requires Graphviz and Python
  • Keil MDK-ARM: Target Options
    • Linker -> Misc Controls: –callgraph_file=mycallgraph.txt –callgraph_output=text
    • Listings -> check Linker Listing box.
  • Main repo site to be posted