ARM Technical Support Knowledge Articles


Applies to: Fast Models


SimpleCADI is a convenience wrapper around a CADI interface from the client (debugger) point of view.

This is NOT an official interface between binary modules. Binary compatibility will generally not be maintained between versions. Source code compatibility will be maintained as far as possible.


SimpleCADI is provided as a header file containing a C++ class. Once instantiated, the CADI pointer for the required target is passed to the helper object via the setCADI function.

#include "SimpleCADI.h"
SimpleCADI simplecadi;
caif = caif->ObtainInterface("eslapi.CADI2", 0, 0); // obtain CADI interface for target

Once SimpleCADI has been provided with a CADI pointer, the object can be used as convenient mechanism for obtaining information from the target.

Main API

// register read/write
uint64_t regRead(const std::string& regName);
void regWrite(const std::string& regName, uint64_t value);
bool hasRegister(const std::string& regName);
std::vector<std::string> getRegisterNames();

// memory read/write
uint64_t memRead(uint32_t memorySpace, uint64_t address, uint32_t sizeInBytes = 1);
void memWrite(uint32_t memorySpace, uint64_t address, uint64_t value, uint32_t sizeInBytes = 1);
// disassembly
std::string disassemble(uint64_t address, uint32_t memorySpaceId, uint32_t disassemblyMode);
// get instruction count
uint64_t getInstCount();

// breakpoints
uint32_t bpAdd(uint64_t address, uint32_t memorySpace); // returns bptId
void bpRemove(uint32_t bptId);
// execution control
void run();
void stop();
// get CADIReturn_t of last CADI call
eslapi::CADIReturn_t getLastError();
eslapi::CADIDisassemblerStatus getLastDisasemblerStatus();

Attachments: SimpleCADI.h

Article last edited on: 2013-05-29 10:40:11

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential