Virtual Connectivity Manager (VCM) is a ModusToolbox™ middleware library that enables connectivity libraries to add multi-core support through virtualization. Virtualization allows the connectivity stack running on one core (the primary core) to be accessed from another core (the secondary core) using Inter-Processor Communication (IPC). With VCM, one core runs the full connectivity stack while the other core runs a subset of virtual-only APIs.
Internally, VCM uses IPC to forward API requests from the secondary core to the primary core where the API is executed, and then returns the result to the secondary core. To the secondary-core application, it appears as though the API executed locally. VCM hides the details of IPC from both the connectivity libraries and the end application, making it simple to add multi-core support.
For the complete API reference, see the Virtual Connectivity Manager Reference Manual.
cy_wcm_is_connected_to_apcy_wcm_register_event_callbackcy_wcm_deregister_event_callbackcy_mqtt_get_handlecy_mqtt_register_event_callbackcy_mqtt_deregister_event_callbackcy_mqtt_subscribecy_mqtt_unsubscribecy_mqtt_publishUse VCM when building a multi-core application in which the connectivity stack (for example, Wi-Fi or MQTT) runs on one core and must be accessed from a second core without duplicating the stack. Typical scenarios include:
VCM is a software middleware library and requires a multi-core Infineon MCU. It is supported on the following device families:
For the exact list of validated kits for this release, see RELEASE.md.
To print debug logs from both cores simultaneously, a second UART port (for example, an external USB-UART bridge such as an FTDI adapter) is required in addition to the on-board KitProg3 USB-UART COM port. See the Enable Debug Logs section for details.
This version of the library was validated for compatibility with the following software and tools:
| Software and tools | Version |
|---|---|
| ModusToolbox™ software environment | 3.9 |
| ModusToolbox™ device configurator | 5.90 |
| GCC compiler | 14.2.1 |
| IAR compiler | 9.50.2 |
| Arm® compiler 6 | 6.22 |
| LLVM Compiler | 22.1.0 |
Create an Empty application (always prefer starting from the Empty template) for each core of your multi-core design, or start from a multi-core connectivity code example that already targets your device.
VCM is not bundled as part of any other library by default; add it to each core's project explicitly. Add libraries using the ModusToolbox™ Library Manager (available in the ModusToolbox™ for VS Code extension and the Eclipse IDE), or by creating the corresponding .mtb files in the application's deps folder and running make getlibs.
deps/virtual-connectivity-manager.mtb with: cy-log module used to print VCM debug logs (pulled in as a dependency of the connectivity libraries).VCM is enabled through compile-time DEFINES rather than a COMPONENT. Add the following to each core's project Makefile:
VCM does not require a dedicated Configurator. IPC channel and queue configuration is done in code through cy_vcm_init() (see the Multi-Core (Virtual API) Usage section).
Include the VCM header in the application source on both cores:
This quick start demonstrates initializing VCM on both cores of a multi-core device so that virtual connectivity APIs can be used from the secondary core.
Step 1: Create an Empty application for each core and add the required libraries (see the Add Required Libraries section).
Step 2: Add the compile-time DEFINES to each core's Makefile (see the Configure Makefile section).
Step 3: Include cy_vcm.h and call cy_vcm_init() on both cores (see the Multi-Core (Virtual API) Usage section for initialization order and configuration rules).
Step 4: Add the initialization code to your main.c on each core (see the Sample Code section for a complete example).
Expected Outcome: VCM initializes on both cores, the primary core receives the CY_VCM_EVENT_INIT_COMPLETE event, and the secondary core can invoke virtual connectivity APIs as if they ran locally.
VCM uses IPC to forward virtual API calls from the secondary core to the primary core. Observe the following rules when initializing and using VCM:
cy_vcm_init() on both cores before invoking any virtual API.config.hal_resource_opt as CY_VCM_CREATE_HAL_RESOURCE; the second project must pass CY_VCM_USE_HAL_RESOURCE.cy_vcm_init() before it brings up the second project (the CM4 project on PSOC™ 62S2). VCM can be initialized in any order from any core as long as the create/use resource rule above is honored; if the order is not synchronized, the application is responsible for coordinating initialization, otherwise behavior is undefined.Note for PSOC™ Edge E84:
cy_vcm_init() must be different from the channel used in mtb_ipc_init(). For example, if mtb_ipc_init() uses MTB_IPC_CHAN_0, then cy_vcm_init() should use MTB_IPC_CHAN_1.IPC queue reservation: VCM uses IPC queue resources for inter-core communication. Each IPC queue is associated with a channel number and a queue number.
| Channel number | Queue number |
|---|---|
| Any IPC channel configured by the application for VCM | 1-7 (reserved by VCM) |
Note: The application cannot use queue numbers 1-7 for the configured channel number, as they are reserved for VCM.
Event queue size: VCM uses one of the IPC queues to send asynchronous event-callback data from the primary core to the secondary core. By default, the size of this queue is 20. If the application expects event callbacks in large bursts on the secondary core, increase this size to avoid queue overflow. Define the CY_VCM_EVENT_QUEUE_SIZE macro in the Makefile of the project that initializes VCM with config.hal_resource_opt as CY_VCM_CREATE_HAL_RESOURCE. For example, to set the queue size to 25:
Device support note: Virtual APIs are supported on all PSOC™ 62 devices, but have been validated on the CY8CEVAL-062S2-MUR-43439M2 kit.
The following example initializes VCM on both cores. The primary core (for example, CM0+ on PSOC™ 62 or CM33 on PSOC™ Edge E84) creates the resources and boots the secondary core; the secondary core (for example, CM4 or CM55) uses the resources.
cy_vcm_deinit() can be called from either core. When one core calls cy_vcm_deinit(), the other core receives the CY_VCM_EVENT_DEINIT event and must call cy_vcm_deinit() locally to release its resources and recover cleanly:
When the Quick Start example runs successfully, you should observe:
cy_vcm_init failed ... messages are printed on either core. With VCM logs enabled (see the Enable Debug Logs section), initialization progress is printed on the configured UART port(s).The VCM library disables all debug log messages by default. To enable them:
ENABLE_VCM_LOGS macro to DEFINES in the project Makefile of the core(s) where logs are needed: cy_log_init() function provided by the cy-log module. cy-log is part of the connectivity-utilities library. See the connectivity-utilities Reference Manual.Note: The following instructions are specific to PSOC™ 62S2 platforms. For other supported platforms, consult the platform-specific documentation.
To print debug logs from both cores, the application must reserve two distinct UART ports. If you are using one of Infineon's BSPs, you can use the on-board KitProg3 USB-UART COM port for one core; a second USB-UART bridge is required for the other core.
CYBSP_DEBUG_UART_TX and CYBSP_DEBUG_UART_RX pins to enable the SCB block for KitProg3 using the retarget-io library: CYBSP_MIKROBUS_UART_RX, CYBSP_MIKROBUS_UART_TX)CYBSP_D4, CYBSP_D5) CY_VCM_CREATE_HAL_RESOURCE and the second passes CY_VCM_USE_HAL_RESOURCE. Ensure all PDL initialization is complete before calling cy_vcm_init().ENABLE_MULTICORE_CONN_MW is defined on both cores, USE_VIRTUAL_API is defined on the secondary core, and (for MQTT) VCM_ENABLE_MQTT is defined on both cores.CY_VCM_EVENT_QUEUE_SIZE on the core that initializes VCM with CY_VCM_CREATE_HAL_RESOURCE.cy_vcm_init() channel number differs from the mtb_ipc_init() channel and that a valid IPC object is passed in config.ipc_obj.VCM is configured through compile-time DEFINES and the cy_vcm_config_t structure passed to cy_vcm_init().
| Define | Applies to | Purpose |
|---|---|---|
ENABLE_MULTICORE_CONN_MW | Both cores | Enables multi-core connectivity middleware support. |
USE_VIRTUAL_API | Secondary core | Selects the virtual-only API subset on the secondary core. |
VCM_ENABLE_MQTT | Both cores | Enables the MQTT virtual APIs. |
ENABLE_VCM_LOGS | Either core | Enables VCM debug log messages. |
CY_VCM_EVENT_QUEUE_SIZE | Create-resource core | Sets the event-callback queue depth (default 20). |
For the full parameter and structure reference, see the Virtual Connectivity Manager Reference Manual.
This library is provided under Infineon software license terms. It works alongside the connectivity libraries whose virtual APIs it exposes (for example, Wi-Fi Connection Manager and MQTT) and the connectivity-utilities library, which are governed by their respective license terms. You are responsible for reviewing and accepting all applicable third-party license terms.
(c) 2026, Infineon Technologies AG, or an affiliate of Infineon
Technologies AG. All rights reserved.