Skip to main content

IAR Embedded Workbench for Arm 9.70.x

__getSelectedCore

In this section:
Syntax
__getSelectedCore()
Return value

The current core. The cores are numbered from 0 and upwards.

For use with

The C-SPY simulator. (Not available for all cores and devices.)

The C-SPY I-jet driver.

Description

Gets the number of the current core.

Example
test ()
{
  __message "Core: ", __getSelectedCore(), " pc = ", #PC:%x, “\n”;
  __selectCore(0);
  __message "Core: ", __getSelectedCore(), " pc = ", #PC:%x, “\n”;
  __selectCore(1);
  __message "Core: ", __getSelectedCore(), " pc = ", #PC:%x, “\n”;

A typical result of the above macro would be (assuming that the original core was number 1):

Core: 1 pc = 0000213C
Core: 0 pc = 00000494
Core: 1 pc = 0000213C
See also

__selectCore.