Skip to main content

IAR Embedded Workbench for Arm 9.70.x

__whichCore

In this section:
Syntax
__whichCore()
Return value

Returns the currently running core. The cores are numbered from 0 and upwards.

For use with

All C-SPY drivers.

Description

When used in target execution, for example in a breakpoint condition or action, this macro returns the number of the core currently executing the application. Note that using this macro outside target execution will return -1.

Example
logAndMaybeStop()
{
    __var core;
    core = __whichCore();
    __message "Breakpoint hit by core ", core;
return core == 2;
}

When used as a breakpoint condition, the function will log every hit but stop only when it hits core 2.