winIDEA SDK
|
This class enables access to data on the target - memory, variables, and registers.
When variables are specified by name, for example in evaluate()
or modify()
methods, it may happen that more than one variables in different source or download files share the same name. In such case we have to specify the fully qualified variable name in the following format:
"<moduleName>"#<varName>,,<downloadFileName>
where:
moduleName
- name of the C source file, which contains variablevarName
- name of the variabledownloadFileName
- name of the download file, where the variable is locatedExample:
"main.c"#iCounter,,executable.elf
The same syntax is used for function names, see also CAddressController::getFunctionName().
Another type of variables are function static variables, which have to be prefixed with <functionName>##
, for example:
myFunction##myStaticVar
The same syntax can be used in winIDEA's Watch window.
Python example for batch access.
Python example for method getSymbols().
Python example for method evaluate().
Another Python example for method evaluate().
Python example for method readRegister().
Python example for method writeRegister().
#include <CDataController.h>
Public Types | |
enum | ESymbolsType { estFunctions , estGlobalVariables , estModules } |
Types of symbols to be returned by the method getSymbols(). More... | |
Public Member Functions | |
CDataController (std::shared_ptr< ConnectionMgr > connectionMgr) | |
Instantiates object. More... | |
CCPUInfo | getCPUInfo () |
Returns CPU info. More... | |
int | getMemoryAreaBytesPerMAU (int memArea) |
Returns the number of bytes per addressable memory unit. More... | |
std::vector< BYTE > | readMemory (IConnectDebug::EAccessFlags accessFlags, BYTE memArea, ADDRESS_64 aAddress, ADDRESS_64 aNumMAUs, BYTE bytesPerMAU) |
This method reads memory block and returns data and access info. More... | |
std::vector< BYTE > | writeMemory (IConnectDebug::EAccessFlags accessFlags, BYTE memArea, ADDRESS_64 aAddress, ADDRESS_64 aNumMAUs, BYTE bytesPerMAU, std::vector< BYTE > &buff) |
Writes block of data to target memory, and returns access information. More... | |
void | writeMemoryNAI (IConnectDebug::EAccessFlags accessFlags, BYTE memArea, ADDRESS_64 aAddress, ADDRESS_64 aNumMAUs, BYTE bytesPerMAU, std::vector< BYTE > &buff) |
Writes block of data to target memory. More... | |
CValueType | readRegister (IConnectDebug::EAccessFlags accessFlags, const std::string ®isterName) |
Reads the specified general purpose register. More... | |
void | writeRegister (IConnectDebug::EAccessFlags accessFlags, const std::string ®isterName, const CValueType ®isterInfo) |
Writes value to the specified core register. More... | |
CValueType | readValue (IConnectDebug::EAccessFlags accessFlags, BYTE memArea, ADDRESS_64 aAddress, const SType &type) |
Reads a value from the target system. More... | |
void | writeValue (IConnectDebug::EAccessFlags accessFlags, BYTE memArea, ADDRESS_64 aAddress, const CValueType &value) |
Writes a value to the target system. More... | |
void | writeValue (IConnectDebug::EAccessFlags accessFlags, bool isNotRefreshWinIDEAGUIAfterWrite, BYTE memArea, ADDRESS_64 aAddress, const CValueType &value) |
Writes a value to the target system. More... | |
CValueType | evaluate (IConnectDebug::EAccessFlags accessFlags, const std::string &expression) |
Calls evaluate(IConnectDebug::EAccessFlags, IConnectDebug::EEvaluate, const std::string &expression) with evaluateFlags = IConnectDebug::efDefaultMemAreaDisplay . More... | |
CValueType | evaluate (IConnectDebug::EAccessFlags accessFlags, IConnectDebug::EEvaluate evaluateFlags, const std::string &expression) |
Evaluates an expression. More... | |
std::string | modify (IConnectDebug::EAccessFlags accessFlags, const std::string &expression, const CValueType &value, bool readBack=true) |
See modify(IConnectDebug::EAccessFlags, IConnectDebug::EEvaluate, const std::string &, const CValueType &, bool). More... | |
std::string | modify (IConnectDebug::EAccessFlags accessFlags, const std::string &expression, const std::string &value, bool readBack=true) |
See modify(IConnectDebug::EAccessFlags, IConnectDebug::EEvaluate, const std::string &, const CValueType &, bool). More... | |
std::string | modify (IConnectDebug::EAccessFlags accessFlags, IConnectDebug::EEvaluate evaluateFlags, const std::string &expression, const CValueType &value, bool readBack=true) |
Modifies expression to value. More... | |
std::string | modify (IConnectDebug::EAccessFlags accessFlags, IConnectDebug::EEvaluate evaluateFlags, const std::string &expression, const std::string &value, bool readBack=true) |
Modifies expression to string value. More... | |
bool | batchAccess (DWORD dwBatchAccessFlags, const struct SBatchAccessHeader *pBatchAccessHeader, const std::vector< SBatchAccessItem > &batchAccessItems, std::vector< SBatchAccessItemResult > &batchAccessItemResults) |
Performs multiple memory accesses, using deterministic delays. More... | |
void | eraseFlash (int nDevice=-1) |
void | secureFlash (int nDevice=-1) |
Secures FLASH memory. More... | |
void | unsecureFlash (int nDevice=-1) |
Unsecures FLASH memory. More... | |
void | getSymbols (ESymbolsType symbolsType, iconnect::StrVector &symbolNames, int partition=PARTITION_DEFAULT) |
Gets list of all symbols of the specified type. More... | |
void | getStackFrames (bool isActiveFrameOnly, bool isAbsPaths, isys::StackFrameVector &stackFrames) |
Gets list of current stack frames on a target. More... | |
void | getVariables (int partition, VariableVector &variables) |
Returns list of global variables in a download file. More... | |
void | getLabels (int partition, VariableVector &labels) |
Returns list of labels in a download file. More... | |
void | getModules (int partition, ModuleVector &modules) |
Returns list of source code files which were used to generate a download file. More... | |
void | getFunctions (int partition, FunctionVector &functions) |
Returns list of functions in a download file. More... | |
void | getTypes (int partition, TypeVector &types) |
Returns list of types in a download file. More... | |
void | getTypedefs (int partition, TypedefVector &typedefs) |
void | getPartitions (iconnect::StrVector &paths, iconnect::StrVector &fileNames) |
Returns a list of download files. More... | |
void | getMacros (int partition, iconnect::StrVector &names, iconnect::StrVector &values) |
Returns a list of macros in the given partition. More... | |
CSystemMemoryAreas | getSystemMemoryAreas () |
This method returns information about memory areas available on a target. More... | |
EEndian | getDefaultEndian () |
Returns default CPU endian mode. More... | |
CStackUsage | getStackUsage () |
Returns information about maximum stack usage since seedStack() was called. More... | |
void | seedStack () |
Writes the given values to stack memory area. More... | |
void | configureStackUsage (ADDRESS_64 start, ADDRESS_64 end, unsigned char value=0xcc) |
void | configureStackUsage (const std::string &start, const std::string &end, unsigned char value) |
isys::CCodeStoreSPtr | csCreate () |
This method creates an empty code store object. More... | |
isys::CCodeStoreSPtr | csGetDownloaded (BYTE memArea, const std::string &fileDownload, bool data) |
This method retrieves all downloaded code. More... | |
isys::CCodeStoreSPtr | csReadMemory (BYTE memArea, const isys::CCodeStoreSPtr &rspSource) |
This method reads memory to the given rspSource object. More... | |
isys::CCodeStoreSPtr | csVerifyDownloaded (BYTE memArea, const std::string &fileDownload, const std::string &fileReport, IConnectDebug2::ECodeCacheOp verifyAgainst=IConnectDebug2::ccSrcLoaded) |
This method verifies downloaded data with the given file. More... | |
isys::CCodeStoreSPtr | csDif (const isys::CCodeStoreSPtr &rsp1, const isys::CCodeStoreSPtr &rsp2, bool flDifferent=true, bool flNotIn1=true, bool flNotIn2=true, bool flEqual=false) |
This method returns differences between two SPCodeStore instances. More... | |
Static Public Member Functions | |
static void | setByte (BYTE *array, int idx, BYTE value) |
Sets array element at index idx to value . More... | |
static BYTE | getByte (BYTE *array, int idx) |
Gets array element at index idx . More... | |
static std::vector< BYTE > | byteArrayToVector (BYTE *array, size_t len) |
This method converts byte array to std::vector<BYTE>, which is supported by SWIG and provides better access than pure C arrays. | |
static void | vectorToByteArray (std::vector< BYTE > &buff, BYTE *array, size_t size) |
This method converts std::vector<BYTE> to byte array. | |
Static Public Attributes | |
static const int | PARTITION_DEFAULT = -1 |
The default download file is sued. | |
static const int | PARTITION_CURRENT = -2 |
The current download file is used. | |
Types of symbols to be returned by the method getSymbols().
Enumerator | |
---|---|
estFunctions | get functions |
estGlobalVariables | get global variables |
estModules | get modules |
isys::CDataController::CDataController | ( | std::shared_ptr< ConnectionMgr > | connectionMgr | ) |
Instantiates object.
connectionMgr | class which maintains connection to winIDEA. Connection must be established before this call. |
Python example: test_cpu_info.py
bool isys::CDataController::batchAccess | ( | DWORD | dwBatchAccessFlags, |
const struct SBatchAccessHeader * | pBatchAccessHeader, | ||
const std::vector< SBatchAccessItem > & | batchAccessItems, | ||
std::vector< SBatchAccessItemResult > & | batchAccessItemResults | ||
) |
Performs multiple memory accesses, using deterministic delays.
dwBatchAccessFlags | see enum EFlags in SBatchAccessHeader, flags that start with prefix 'fl' |
pBatchAccessHeader | see SBatchAccessHeader |
batchAccessItems | items defining the type and time of an individual access. |
batchAccessItemResults | objects that will receive the results of every individual access. |
IOException | if one of the accesses failed |
FeatureNotImplementedException | if batch access is not implemented for your target |
Example:
const int NUM_ITEMS = 1; // just one item to execute in every run const int NUM_RUNS = 100; // perform so many iterations SBatchAccessHeader BAH = {0}; SBatchAccessItem aBAI[NUM_ITEMS]; memset(aBAI, 0, sizeof aBAI); // define header BAH.m_dwFlags = SBatchAccessHeader::flRealTime; // use real-time access BAH.m_dwFlags |= SBatchAccessHeader::flWantTimeStamp; BAH.m_dwNumItems = NUM_ITEMS; BAH.m_dwNumRuns = NUM_RUNS; BAH.m_qwRunInterval = 500; // every 500 us // Define item(s),iCounter
in this case. Call CAddressController::getSymbolInfo() // to getaSizeMAUs
,byMemArea
, andaAddress
ofiCounter
. aBAI[0].m_byFlags = SBatchAccessItem::flRead; // it's a read aBAI[0].m_bySize = (BYTE)aSizeMAUs; // size or iCounter aBAI[0].m_byMemArea = byMemArea; // memory area of iCounter aBAI[0].m_aAddress = aAddress; // address of iCounter SBatchAccessItemResult aBAIR[NUM_ITEMS * NUM_RUNS]; // make space for results bool hr = batchAccess(0, &BAH, aBAI, aBAIR);
Python example: test_batch_access.py
void isys::CDataController::configureStackUsage | ( | ADDRESS_64 | start, |
ADDRESS_64 | end, | ||
unsigned char | value = 0xcc |
||
) |
void isys::CDataController::configureStackUsage | ( | const std::string & | start, |
const std::string & | end, | ||
unsigned char | value | ||
) |
Configures winIDEA options used for measuring stack usage. This method changes values of options Debug.StackUsage.*
in winIDEA. This method must be called before download, for settings to take effect. After download you should call seedStack() without parameters to seed the stack memory region.
start | starting address. If both start and end are empty strings, then stack usage monitoring is disabled. |
end | end address - value at this address is not modified, so that size = end - start . If both start and end are empty strings, then stack usage monitoring is disabled. |
value | value to write to the stack. Not that this value should not interfere with other values written to stack to get reliable stack usage with getStackUsage(). |
Python example: test_configure_stack_usage.py
isys::CCodeStoreSPtr isys::CDataController::csCreate | ( | ) |
This method creates an empty code store object.
Python example: test_cs_read_memory.py
isys::CCodeStoreSPtr isys::CDataController::csDif | ( | const isys::CCodeStoreSPtr & | rsp1, |
const isys::CCodeStoreSPtr & | rsp2, | ||
bool | flDifferent = true , |
||
bool | flNotIn1 = true , |
||
bool | flNotIn2 = true , |
||
bool | flEqual = false |
||
) |
This method returns differences between two SPCodeStore instances.
rsp1 | the first CCodeStore object |
rsp2 | the second CCodeStore object |
flDifferent | report locations present in both objects, but with different contents |
flNotIn1 | report locations that are not in rsp1, but present int rsp2 |
flNotIn2 | report locations that are not in rsp2, but present int rsp1 |
flEqual | report locations with equal contents |
Python example: test_code_store_diff.py
isys::CCodeStoreSPtr isys::CDataController::csGetDownloaded | ( | BYTE | memArea, |
const std::string & | fileDownload, | ||
bool | data | ||
) |
This method retrieves all downloaded code.
memArea | specifies the memory space for which the downloaded code should be retrieved |
fileDownload | if empty, all downloaded code is retrieved, otherwise only for the specified file |
data | true to retrieve the data. Otherwise only address information is retrieved. |
Python example: test_code_store.py
isys::CCodeStoreSPtr isys::CDataController::csReadMemory | ( | BYTE | memArea, |
const isys::CCodeStoreSPtr & | rspSource | ||
) |
This method reads memory to the given rspSource
object.
memArea | specifies the memory space from which to read |
rspSource | a CCodeStore object filled with items (address and size), which should be read |
Python example: test_cs_read_memory.py
isys::CCodeStoreSPtr isys::CDataController::csVerifyDownloaded | ( | BYTE | memArea, |
const std::string & | fileDownload, | ||
const std::string & | fileReport, | ||
IConnectDebug2::ECodeCacheOp | verifyAgainst = IConnectDebug2::ccSrcLoaded |
||
) |
This method verifies downloaded data with the given file.
memArea | specifies the memory space for which the verify should be performed |
fileDownload | if empty, all downloaded code is verified, otherwise only for the specified file |
fileReport | file path to which the report should be written. If empty no report is generated |
verifyAgainst | can be one of IConnectDebug2::ccSrcLoaded, IConnectDebug2::ccSrcInFiles, or IConnectDebug2::ccSrcFiltered. |
Python example: test_cs_verify_downloaded.py
void isys::CDataController::eraseFlash | ( | int | nDevice = -1 | ) |
Erases FLASH memory.
nDevice | if -1 all FLASH devices are processed, otherwise only the specified device |
CValueType isys::CDataController::evaluate | ( | IConnectDebug::EAccessFlags | accessFlags, |
const std::string & | expression | ||
) |
Calls evaluate(IConnectDebug::EAccessFlags, IConnectDebug::EEvaluate, const std::string &expression) with evaluateFlags = IConnectDebug::efDefaultMemAreaDisplay
.
Python example with online value graph: chart_sample.py
Python module for plotting of watch expressions: variables_chart.py
Python example with web server providing results of this method: webserver.py
Python example: test_data_evaluate.py
CValueType isys::CDataController::evaluate | ( | IConnectDebug::EAccessFlags | accessFlags, |
IConnectDebug::EEvaluate | evaluateFlags, | ||
const std::string & | expression | ||
) |
Evaluates an expression.
Works only for simple types. See also Qualified Variable Names.
accessFlags | IConnectDebug::EAccessFlags determine what kind of memory access is permitted if required to resolve the expression |
evaluateFlags | define result format |
expression | any C syntax expression. CPU registers (including SFRs) can be used in expression with prefix '@', for example '@R0'. |
IOException | if complex type is given or in case of an error |
|
static |
Gets array element at index idx
.
This is general method, which can be used to read arrays, which are returned by isystem.connect
function parameters or are elements of isystem.connect
structures, for example SBatchAccessItem
.
Python example: test_batch_access.py
CCPUInfo isys::CDataController::getCPUInfo | ( | ) |
Returns CPU info.
See definition of this struct in CCPUInfo.h for enum constants which describe CPU type.
Python example: test_cpu_info.py
EEndian isys::CDataController::getDefaultEndian | ( | ) |
Returns default CPU endian mode.
Python example: test_get_default_endian.py
void isys::CDataController::getFunctions | ( | int | partition, |
FunctionVector & | functions | ||
) |
Returns list of functions in a download file.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
functions | vector to receive result |
Python example: test_get_functions.py
void isys::CDataController::getLabels | ( | int | partition, |
VariableVector & | labels | ||
) |
Returns list of labels in a download file.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
labels | vector to receive result |
Python example: test_get_labels.py
void isys::CDataController::getMacros | ( | int | partition, |
iconnect::StrVector & | names, | ||
iconnect::StrVector & | values | ||
) |
Returns a list of macros in the given partition.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
names | vector, which will contain names of macros on return. |
values | vector, which will contain values of macros on return. |
Python example: test_get_macros.py
int isys::CDataController::getMemoryAreaBytesPerMAU | ( | int | memArea | ) |
Returns the number of bytes per addressable memory unit.
memArea | memory area for which to return the number |
Python example: test_get_memory_area_bytes_per_mau.py
void isys::CDataController::getModules | ( | int | partition, |
ModuleVector & | modules | ||
) |
Returns list of source code files which were used to generate a download file.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
modules | vector to receive result |
Python example: test_get_modules.py
void isys::CDataController::getPartitions | ( | iconnect::StrVector & | paths, |
iconnect::StrVector & | fileNames | ||
) |
Returns a list of download files.
paths | vector to receive paths of download files |
fileNames | vector to receive names of download files |
Python example: test_get_partitions.py
void isys::CDataController::getStackFrames | ( | bool | isActiveFrameOnly, |
bool | isAbsPaths, | ||
isys::StackFrameVector & | stackFrames | ||
) |
Gets list of current stack frames on a target.
The stack frame information depends on compiler debug info and may not be always available.
isActiveFrameOnly | if true, only the active frame is returned. This can be much faster than retrieving all frames. |
isAbsPaths | if true, absolute paths are returned |
stackFrames | vector to receive stack frame objects |
Python example: test_get_stack_frames.py
CStackUsage isys::CDataController::getStackUsage | ( | ) |
Returns information about maximum stack usage since seedStack() was called.
Python example: test_seed_get_stack_usage.py
void isys::CDataController::getSymbols | ( | ESymbolsType | symbolsType, |
iconnect::StrVector & | symbolNames, | ||
int | partition = PARTITION_DEFAULT |
||
) |
Gets list of all symbols of the specified type.
Symbols must be downloaded in winIDEA before this function is called.
symbolsType | type of symbols to retrieve |
symbolNames | after return this vector contains names of all symbols of the specified type from download file. |
partition | index of download file to get symbols from |
Python example: test_get_symbols.py
CSystemMemoryAreas isys::CDataController::getSystemMemoryAreas | ( | ) |
This method returns information about memory areas available on a target.
Python example: test_get_system_memory_areas.py
void isys::CDataController::getTypedefs | ( | int | partition, |
TypedefVector & | typedefs | ||
) |
getTypes()
instead.Returns list of typedefs in a download file.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
typedefs | vector to receive result |
Python example: test_get_typedefs.py
void isys::CDataController::getTypes | ( | int | partition, |
TypeVector & | types | ||
) |
Returns list of types in a download file.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
types | vector to receive result |
Python example: test_get_types.py
void isys::CDataController::getVariables | ( | int | partition, |
VariableVector & | variables | ||
) |
Returns list of global variables in a download file.
partition | partition number, or PARTITION_CURRENT for current download file or PARTITION_DEFAULT for default download file. |
variables | vector to receive result |
Python example: test_get_variables.py
std::string isys::CDataController::modify | ( | IConnectDebug::EAccessFlags | accessFlags, |
const std::string & | expression, | ||
const CValueType & | value, | ||
bool | readBack = true |
||
) |
std::string isys::CDataController::modify | ( | IConnectDebug::EAccessFlags | accessFlags, |
const std::string & | expression, | ||
const std::string & | value, | ||
bool | readBack = true |
||
) |
std::string isys::CDataController::modify | ( | IConnectDebug::EAccessFlags | accessFlags, |
IConnectDebug::EEvaluate | evaluateFlags, | ||
const std::string & | expression, | ||
const CValueType & | value, | ||
bool | readBack = true |
||
) |
Modifies expression to value.
The expression must evaluate to a lvalue. See also Qualified Variable Names.
accessFlags | determines what kind of memory access is permitted if required to resolve the expression, |
evaluateFlags | define result format. |
expression | any C syntax expression that evaluates to a lvalue |
value | contains the value to write to expression |
readBack | set to false to skip reading back the value |
IOException | in case of an error |
Python example: test_data_modify.py
std::string isys::CDataController::modify | ( | IConnectDebug::EAccessFlags | accessFlags, |
IConnectDebug::EEvaluate | evaluateFlags, | ||
const std::string & | expression, | ||
const std::string & | value, | ||
bool | readBack = true |
||
) |
Modifies expression to string value.
The expression must evaluate to a lvalue. See also Qualified Variable Names.
accessFlags | determines what kind of memory access is permitted if required to resolve the expression, |
evaluateFlags | define result format. |
expression | any C syntax expression that evaluates to a lvalue |
value | contains the value to write to expression |
readBack | set to false to skip reading back the value |
IOException | in case of an error |
Python example: test_data_modify.py
std::vector< BYTE > isys::CDataController::readMemory | ( | IConnectDebug::EAccessFlags | accessFlags, |
BYTE | memArea, | ||
ADDRESS_64 | aAddress, | ||
ADDRESS_64 | aNumMAUs, | ||
BYTE | bytesPerMAU | ||
) |
This method reads memory block and returns data and access info.
Returned vector contains data in the first (aNumMAUs * bytesPerMAU)
bytes, and access info in aNumMAUs
bytes at offset (aNumMAUs * bytesPerMAU)
.
Access info bytes tell us, whether read for MAU succeeded or not. Each byte is set to ACCESS_OK
or ACCESS_FAIL
. These two constants are defined in globdefs.h.
Contents of the returned vector:
[(target memory data, size = aNumMAUs * bytesPerMAU) (access info, size = aNumMAUs)]
accessFlags | use IConnectDebug::EAccessFlags | ||||||||
memArea | memory space. Definitions for individual CPUs are provided in MemArea.h | ||||||||
aAddress | address of the memory location | ||||||||
aNumMAUs | number of MAUs (memory addressable units) to read. | ||||||||
bytesPerMAU | Number of BYTE type locations required to fit one MAU (memory addressable unit). The number of bytes required for every MAU is:
|
IOException | in case of an error |
Python example: test_read_write_memory.py
CValueType isys::CDataController::readRegister | ( | IConnectDebug::EAccessFlags | accessFlags, |
const std::string & | registerName | ||
) |
Reads the specified general purpose register.
For SFRs please use method evaluate().
accessFlags | see IConnectDebug::EAccessFlags for available flags, except fCacheCode |
registerName | name of the register to read |
IOException | in case of an error |
Python example: test_read_write_register.py
CValueType isys::CDataController::readValue | ( | IConnectDebug::EAccessFlags | accessFlags, |
BYTE | memArea, | ||
ADDRESS_64 | aAddress, | ||
const SType & | type | ||
) |
Reads a value from the target system.
This function resembles readMemory() but additionally it formats the value according to the type specified (including endian conversions).
Example:
debug = ic.CDebugFacade(cmgr) varType = ic.SType() varType.m_byBitSize = 32 varType.m_byType = ic.SType.tSigned memArea = 0 addr = 1073768999 value = debug.readValue(ic.IConnectDebug.fMonitor, memArea, addr, varType) print "Result = ", value.getInt()
accessFlags | use IConnectDebug::EAccessFlags, except fCore, and fSFR |
memArea | memory area, definitions for individual CPUs are provided in MemArea.h |
aAddress | address of the memory location of the first access. |
type | variable containing the type info of value to be read |
IOException | in case of an error |
Python example: test_read_write_value.py
void isys::CDataController::secureFlash | ( | int | nDevice = -1 | ) |
Secures FLASH memory.
nDevice | if -1 all FLASH devices are processed, otherwise only the specified device |
Python example: service_functions.py
void isys::CDataController::seedStack | ( | ) |
Writes the given values to stack memory area.
Memory locations and value are defined with options Debug.StackUsage.*
in winIDEA, which can be configured with Debug | Configure Session... | Applications
dialog or method configureStackUsage() in this class.
Python example: test_seed_get_stack_usage.py
|
static |
Sets array element at index idx
to value
.
This is general method, which can be used to set arrays, which are required as isystem.connect
function parameters or are elements of isystem.connect
structures, for example SBatchAccessItem
.
Python example: test_batch_access.py
void isys::CDataController::unsecureFlash | ( | int | nDevice = -1 | ) |
Unsecures FLASH memory.
nDevice | if -1 all FLASH devices are processed, otherwise only the specified device |
Python example: service_functions.py
std::vector< BYTE > isys::CDataController::writeMemory | ( | IConnectDebug::EAccessFlags | accessFlags, |
BYTE | memArea, | ||
ADDRESS_64 | aAddress, | ||
ADDRESS_64 | aNumMAUs, | ||
BYTE | bytesPerMAU, | ||
std::vector< BYTE > & | buff | ||
) |
Writes block of data to target memory, and returns access information.
accessFlags | use IConnectDebug::EAccessFlags | ||||||||
memArea | memory space. Definitions for individual CPUs are provided in MemArea.h | ||||||||
aAddress | address of the memory location | ||||||||
aNumMAUs | number of MAUs (memory addressable units) to write. | ||||||||
bytesPerMAU | Number of BYTE type locations required to fit one MAU (memory addressable unit). The number of bytes required for every MAU is:
| ||||||||
buff | vector, which contains data to be written to memory on the target. Languages other than C++ should instantiate class VectorBYTE for this parameter. Examples:Python: buff = isystem.connect.VectorBYTE([0, 0, 0, 0xff])Java: VectorBYTE buff = new VectorBYTE(); buff.add((short)0); buff.add((short)0); buff.add((short)0); buff.add((short)255); |
IOException | in case of an error |
Python example: test_read_write_memory.py
void isys::CDataController::writeMemoryNAI | ( | IConnectDebug::EAccessFlags | accessFlags, |
BYTE | memArea, | ||
ADDRESS_64 | aAddress, | ||
ADDRESS_64 | aNumMAUs, | ||
BYTE | bytesPerMAU, | ||
std::vector< BYTE > & | buff | ||
) |
Writes block of data to target memory.
This method is faster than writeMemory(), because no access information is returned.
accessFlags | use IConnectDebug::EAccessFlags | ||||||||
memArea | memory space. Definitions for individual CPUs are provided in MemArea.h | ||||||||
aAddress | address of the memory location | ||||||||
aNumMAUs | number of MAUs (memory addressable units) to write. | ||||||||
bytesPerMAU | Number of BYTE type locations required to fit one MAU (memory addressable unit). The number of bytes required for every MAU is:
| ||||||||
buff | vector, which contains data to be written to memory on the target. Languages other than C++ should instantiate class VectorBYTE for this parameter. Examples:Python: buff = isystem.connect.VectorBYTE([0, 0, 0, 0xff])Java: VectorBYTE buff = new VectorBYTE(); buff.add((short)0); buff.add((short)0); buff.add((short)0); buff.add((short)255); |
IOException | in case of an error |
Python example: see test_read_write_memory.py
void isys::CDataController::writeRegister | ( | IConnectDebug::EAccessFlags | accessFlags, |
const std::string & | registerName, | ||
const CValueType & | registerInfo | ||
) |
Writes value to the specified core register.
Example:
# bit size is 32, value is 1234567 r1Value = isystem.connect.CValueType(32, 1234567) debug.writeRegister(IConnectDebug.fMonitor, 'R1', r1Value)
Longer way, if we use specific data types:
# first we should define value type valueType = isystem.connect.SType() valueType.m_byType = isystem.connect.SType.tSigned valueType.m_byBitSize = 32 # create 'Value' with type and value r0Value = isystem.connect.CValueType(valueType, 5678) debug.writeRegister(0, "R0", r0Value)
accessFlags | see IConnectDebug::EAccessFlags for available flags, except fCacheCode |
registerName | name of the register to write to |
registerInfo | a value to be written to the register |
IOException | in case of an error |
Note: This method can modify only core registers. To modify SFRs please use the modify() method.
Python example : test_read_write_register.py
void isys::CDataController::writeValue | ( | IConnectDebug::EAccessFlags | accessFlags, |
bool | isNotRefreshWinIDEAGUIAfterWrite, | ||
BYTE | memArea, | ||
ADDRESS_64 | aAddress, | ||
const CValueType & | value | ||
) |
Writes a value to the target system.
This function resembles writeMemory() but additionally it formats the value according to the type specified (including endian conversions).
accessFlags | use IConnectDebug::EAccessFlags, except fCore, fSFR, and fCacheXXX. |
isNotRefreshWinIDEAGUIAfterWrite | if true, winIDEA windows are not refreshed after write operation - this speeds up operation. |
memArea | memory space. Definitions for individual CPUs are provided in MemArea.h |
aAddress | address of the memory location of the first access |
value | variable containing the value to write |
IOException | in case of an error |
Python example: test_read_write_value.py
void isys::CDataController::writeValue | ( | IConnectDebug::EAccessFlags | accessFlags, |
BYTE | memArea, | ||
ADDRESS_64 | aAddress, | ||
const CValueType & | value | ||
) |
Writes a value to the target system.
This function resembles writeMemory() but additionally it formats the value according to the type specified (including endian conversions).
accessFlags | use IConnectDebug::EAccessFlags, except fCore, fSFR, and fCacheXXX. |
memArea | memory space. Definitions for individual CPUs are provided in MemArea.h |
aAddress | address of the memory location of the first access |
value | variable containing the value to write |
IOException | in case of an error |
Python example: test_read_write_value.py