{"id":13054,"date":"2026-06-25T10:54:04","date_gmt":"2026-06-25T10:54:04","guid":{"rendered":"https:\/\/imperix.com\/doc\/?p=13054"},"modified":"2026-06-25T11:06:38","modified_gmt":"2026-06-25T11:06:38","slug":"getting-started-with-cpp-sdk","status":"publish","type":"post","link":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk","title":{"rendered":"Getting started with the CPP SDK"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 ez-toc-wrap-right-text counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\/#Product-description\" >Product description<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\/#CPP-SDK-Programming-workflow\" >CPP SDK Programming workflow<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\/#Development-with-the-C-IDE\" >Development with the C++ IDE<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\/#Navigate-the-IDE\" >Navigate the IDE<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\/#User-template-structure-and-content\" >User template structure and content<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\/#CPP-SDK-coding-example\" >CPP SDK coding example<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\/#Global-variables\" >Global variables<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\/#UserInit-function\" >UserInit() function<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\/#UserInterrupt-function\" >UserInterrupt() function<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\/#Further-reading\" >Further reading<\/a><\/li><\/ul><\/nav><\/div>\n\n<p class=\"wp-block-paragraph\">This article, targeted towards first-time imperix users, provides instructions to get started with the CPP SDK. It focuses on the typical workflow associated with the development of C++ control algorithms for imperix controllers. It notably addresses:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Product presentation:<\/strong>&nbsp;What the CPP SDK is, and what pieces of software it contains.<\/li>\n\n\n\n<li><strong>CPP SDK Programming workflow:<\/strong> A general overview of the whole workflow to give a first idea of how imperix controllers are programmed.<\/li>\n\n\n\n<li><strong>Development with the C++ IDE:<\/strong> An introduction to navigating the C++ IDE and understanding the structure and content of the user code template.<\/li>\n\n\n\n<li><strong>Buck converter example:<\/strong> Guidance on initializing and operating the main hardware peripherals, such as ADCs and PWM modulators, to operate a simple buck converter in open loop.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This article focuses on developing C++ code for imperix controllers. Instructions regarding the initial software installation and setup of the CPP SDK are detailed in <a href=\"https:\/\/imperix.com\/doc\/help\/getting-started-cpp-sdk\/installation-and-utilisation-of-cpp-sdk?currentThread=cpp-sdk\">PN146<\/a>. Similarly, users interested in a block-based approach utilizing Automated Code Generation from MATLAB Simulink or PLECS should refer to the separate documentation regarding the <a href=\"https:\/\/imperix.com\/doc\/help\/installation-guide-acg-sdk?currentThread=b-box-4\">ACG SDK<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Product-description\"><\/span>Product description<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<a href=\"https:\/\/imperix.com\/software\/cpp-sdk\">CPP SDK<\/a>&nbsp;is a Software Development Kit (SDK) enabling engineers to program imperix controllers using C++ code. It includes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An <strong>Eclipse-based C++ IDE<\/strong> tailored to program imperix controllers<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1114\" height=\"846\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-41.png\" alt=\"C++ IDE to get started with CPP SDK development\" class=\"wp-image-45156\" style=\"aspect-ratio:1.31681045751634;width:653px;height:auto\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-41.png 1114w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-41-300x228.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-41-1024x778.png 1024w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-41-768x583.png 768w\" sizes=\"auto, (max-width: 1114px) 100vw, 1114px\" \/><\/figure>\n<\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>The BBOS&nbsp;<strong>operating system<\/strong>&nbsp;for the controllers.<\/li>\n\n\n\n<li>The standard&nbsp;<strong>FPGA firmware<\/strong>.<\/li>\n\n\n\n<li>The&nbsp;<strong>Cockpit<\/strong>&nbsp;monitoring software. Cockpit enables real-time interaction and monitoring of the physical converter by providing access to the model variables and all the signals measured by imperix controllers.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"400\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-31.png\" alt=\"Getting started with CPP SDK - Cockpit overview\" class=\"wp-image-44262\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-31.png 640w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-31-300x188.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"CPP-SDK-Programming-workflow\"><\/span><strong><strong>CPP SDK Programming workflow<\/strong><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before diving into control development, it is helpful to get the big picture of the CPP SDK workflow. The process bridges the gap between writing code on the PC and executing it on imperix controllers.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Code development:<\/strong> The control algorithm is implemented within the Imperix IDE (based on Eclipse).<\/li>\n\n\n\n<li><strong>Compilation:<\/strong> The code is built, and an executable binary file (<code>.elf<\/code>) is generated.<\/li>\n\n\n\n<li><strong>Flashing the code:<\/strong> This <code>.elf<\/code> file is retrieved by Cockpit and flashed to the controller over the Ethernet link.<\/li>\n\n\n\n<li><strong>Execution:<\/strong> The executable is loaded, and the control algorithm is run by BBOS, the controller&#8217;s operating system.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"307\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/Workflow-03-2-1024x307.png\" alt=\"\" class=\"wp-image-45919\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/Workflow-03-2-1024x307.png 1024w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/Workflow-03-2-300x90.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/Workflow-03-2-768x230.png 768w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/Workflow-03-2-1536x460.png 1536w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/Workflow-03-2-2048x613.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<div class=\"wp-block-simple-alerts-for-gutenberg-alert-boxes sab-alert sab-alert-info\" role=\"alert\">Debugging note: Instead of using traditional IDE breakpoints, debugging is done by monitoring variables in real time via Cockpit.<\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Development-with-the-C-IDE\"><\/span>Development with the C++ IDE<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">With the general workflow covered, the focus can now shift to the implementation of real-time control algorithms for the dedicated BBOS CPU core. For this, users will rely on the imperix C++ Eclipse-based IDE and the provided C++ user template.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Navigate-the-IDE\"><\/span>Navigate the IDE<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Assuming that the user template is already imported into the workspace, users should be presented with a window as shown in the screenshot below. Help on how to import the user template is provided in the <a href=\"https:\/\/imperix.com\/doc\/help\/getting-started-cpp-sdk\/installation-and-utilisation-of-cpp-sdk?currentThread=cpp-sdk\">Installation guide for imperix CPP SDK<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The interface is organized into several key areas as follows:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Build and Launch Controls (Top Left):<\/strong> Dedicated buttons located in the upper-left toolbar are used to compile the written code and deploy the resulting executable directly to the controller.<\/li>\n\n\n\n<li><strong>Project Explorer (Left Panel):<\/strong> Displays the project&#8217;s directory structure and the files included in the project. The specific roles and contents of these files are detailed in the upcoming sections.<\/li>\n\n\n\n<li><strong>Code Editor (Center Panel):<\/strong> Serves as the primary workspace for viewing and modifying the C++ source code.<\/li>\n\n\n\n<li><strong>Console (Bottom Panel):<\/strong> Outputs the system and build logs,  displaying any compilation warnings or errors.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1593\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/IDE_overview-scaled.png\" alt=\"CPP IDE layout to get started with the CPP SDK\" class=\"wp-image-45160\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/IDE_overview-scaled.png 2560w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/IDE_overview-300x187.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/IDE_overview-1024x637.png 1024w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/IDE_overview-768x478.png 768w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/IDE_overview-1536x956.png 1536w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/IDE_overview-2048x1274.png 2048w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"User-template-structure-and-content\"><\/span>User template structure and content<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The user template should be imported into the IDE workspace by following the <a href=\"https:\/\/imperix.com\/doc\/help\/getting-started-cpp-sdk\/installation-and-utilisation-of-cpp-sdk?currentThread=cpp-sdk\">Installation guide for imperix CPP SDK<\/a>. This next section will detail the content of the user template, which contains several folders (as shown in the Project Explorer in the above screenshot) that are organized as follows.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"136\" height=\"146\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-47.png\" alt=\"\" class=\"wp-image-45448\"\/><\/figure>\n<\/div>\n\n\n<h4 class=\"wp-block-heading\">My functions<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>My_functions<\/strong> is the folder where all user files should be stored. By default, it contains only two files that the user can freely modify:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>user.cpp<\/code>, which serves as the code root and contains the initialization routine <code>UserInit()<\/code> and the main interrupt service routine <code>UserInterrupt()<\/code>. Further details regarding these two functions are provided in the buck converter example below.<\/li>\n\n\n\n<li><code>user.h<\/code>, which typically contains the prototypes of the user-defined routines as well as some useful readability helper definitions.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Includes &#8211; peripherals libraries<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Includes <\/strong>folder contains the header files for the user-accessible routines associated with the hardware peripherals of imperix controllers. By reviewing these headers, users can obtain a quick overview of the available routines and the necessary information regarding their implementation. This folder is structured into two main subdirectories: <strong>Core<\/strong> and <strong>Driver<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Core<\/strong> folder notably includes routines managing the operational state (FAULT, BLOCKED, OPERATING) of imperix controllers. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>driver<\/strong> folder provides header files to peripheral driver routines, which are used to configure and operate the different peripherals of imperix controllers. All peripheral driver routines are further detailed in the imperix software documentation: <a href=\"https:\/\/imperix.com\/software-documentation\/\">https:\/\/imperix.com\/software-documentation\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, the <strong>Includes <\/strong>folder also contains a sensor header file, which provides a convenient list of definitions for the sensitivities of the various imperix current and voltage sensors.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Helper API<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>API <\/strong>folder provides a library of predefined routines frequently used in power electronics control. Developers are encouraged to use these standard functions, though they can be modified as needed. Key implementations provided within this directory include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PI controllers,<\/li>\n\n\n\n<li>MPPT algorithms<\/li>\n\n\n\n<li>dq-frame and SOGI PLLs<\/li>\n\n\n\n<li>Clarke and Park transformations<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"CPP-SDK-coding-example\"><\/span><strong>CPP SDK coding example<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This section will address the default content of the user files inside the <strong>My_functions<\/strong> folder of the user template. Reviewing this example will provide practical foundations for new users to get started with the CPP SDK.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These files implement a basic algorithm designed to operate a buck converter in an open-loop configuration, further detailed in the <a href=\"https:\/\/imperix.com\/doc\/implementation\/step-down-buck-converter?currentThread=current-controlled-buck-converter\">Step-down buck converter<\/a> article. As previously explained, <code>user.h<\/code> includes the required user routine prototypes and readability helpers. Therefore, the following sections will focus on the control logic contained within <code>user.cpp<\/code>.<\/p>\n\n\n<style>.kt-accordion-id13054_4c3834-d5 .kt-accordion-inner-wrap{column-gap:var(--global-kb-gap-md, 2rem);row-gap:1px;}.kt-accordion-id13054_4c3834-d5 .kt-accordion-panel-inner{border-top:2px solid transparent;border-right:2px solid transparent;border-bottom:2px solid transparent;border-left:2px solid transparent;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;background:#ffffff;padding-top:20px;padding-right:20px;padding-bottom:20px;padding-left:20px;}.kt-accordion-id13054_4c3834-d5 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header{border-top:2px solid #f2f2f2;border-right:2px solid #f2f2f2;border-bottom:2px solid #f2f2f2;border-left:2px solid #f2f2f2;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;background:#ffffff;font-size:16px;line-height:24px;letter-spacing:0px;font-weight:bold;text-transform:none;color:var(--global-palette3, #1A202C);padding-top:12px;padding-right:10px;padding-bottom:8px;padding-left:16px;}.kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle )  > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle )  > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap .kt-blocks-accordion-icon-trigger:before{background:var(--global-palette3, #1A202C);}.kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-icon-trigger{background:var(--global-palette3, #1A202C);}.kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-icon-trigger:before{background:#ffffff;}.kt-accordion-id13054_4c3834-d5 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header:hover, \n\t\t\t\tbody:not(.hide-focus-outline) .kt-accordion-id13054_4c3834-d5 .kt-blocks-accordion-header:focus-visible{color:#444444;background:#ffffff;border-top:2px solid #eeeeee;border-right:2px solid #eeeeee;border-bottom:2px solid #eeeeee;border-left:2px solid #eeeeee;}.kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger:before, body:not(.hide-focus-outline) .kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle ) .kt-blocks-accordion--visible .kt-blocks-accordion-icon-trigger:after, body:not(.hide-focus-outline) .kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle ) .kt-blocks-accordion-header:focus-visible .kt-blocks-accordion-icon-trigger:before{background:#444444;}.kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger, body:not(.hide-focus-outline) .kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible .kt-blocks-accordion-icon-trigger{background:#444444;}.kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger:before, body:not(.hide-focus-outline) .kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible .kt-blocks-accordion-icon-trigger:after, body:not(.hide-focus-outline) .kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible .kt-blocks-accordion-icon-trigger:before{background:#ffffff;}.kt-accordion-id13054_4c3834-d5 .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible,\n\t\t\t\t.kt-accordion-id13054_4c3834-d5 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active{color:var(--global-palette3, #1A202C);background:var(--global-palette9, #ffffff);border-top:2px solid var(--global-palette6, #718096);border-right:2px solid var(--global-palette6, #718096);border-bottom:2px solid var(--global-palette6, #718096);border-left:2px solid var(--global-palette6, #718096);}.kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle )  > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle )  > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger:before{background:var(--global-palette3, #1A202C);}.kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger{background:var(--global-palette3, #1A202C);}.kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id13054_4c3834-d5:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger:before{background:var(--global-palette9, #ffffff);}@media all and (max-width: 1024px){.kt-accordion-id13054_4c3834-d5 .kt-accordion-panel-inner{border-top:2px solid transparent;border-right:2px solid transparent;border-bottom:2px solid transparent;border-left:2px solid transparent;}}@media all and (max-width: 1024px){.kt-accordion-id13054_4c3834-d5 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header{border-top:2px solid #f2f2f2;border-right:2px solid #f2f2f2;border-bottom:2px solid #f2f2f2;border-left:2px solid #f2f2f2;}}@media all and (max-width: 1024px){.kt-accordion-id13054_4c3834-d5 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header:hover, \n\t\t\t\tbody:not(.hide-focus-outline) .kt-accordion-id13054_4c3834-d5 .kt-blocks-accordion-header:focus-visible{border-top:2px solid #eeeeee;border-right:2px solid #eeeeee;border-bottom:2px solid #eeeeee;border-left:2px solid #eeeeee;}}@media all and (max-width: 1024px){.kt-accordion-id13054_4c3834-d5 .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible,\n\t\t\t\t.kt-accordion-id13054_4c3834-d5 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active{border-top:2px solid var(--global-palette6, #718096);border-right:2px solid var(--global-palette6, #718096);border-bottom:2px solid var(--global-palette6, #718096);border-left:2px solid var(--global-palette6, #718096);}}@media all and (max-width: 767px){.kt-accordion-id13054_4c3834-d5 .kt-accordion-inner-wrap{display:block;}.kt-accordion-id13054_4c3834-d5 .kt-accordion-inner-wrap .kt-accordion-pane:not(:first-child){margin-top:1px;}.kt-accordion-id13054_4c3834-d5 .kt-accordion-panel-inner{border-top:2px solid transparent;border-right:2px solid transparent;border-bottom:2px solid transparent;border-left:2px solid transparent;}.kt-accordion-id13054_4c3834-d5 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header{border-top:2px solid #f2f2f2;border-right:2px solid #f2f2f2;border-bottom:2px solid #f2f2f2;border-left:2px solid #f2f2f2;}.kt-accordion-id13054_4c3834-d5 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header:hover, \n\t\t\t\tbody:not(.hide-focus-outline) .kt-accordion-id13054_4c3834-d5 .kt-blocks-accordion-header:focus-visible{border-top:2px solid #eeeeee;border-right:2px solid #eeeeee;border-bottom:2px solid #eeeeee;border-left:2px solid #eeeeee;}.kt-accordion-id13054_4c3834-d5 .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible,\n\t\t\t\t.kt-accordion-id13054_4c3834-d5 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active{border-top:2px solid var(--global-palette6, #718096);border-right:2px solid var(--global-palette6, #718096);border-bottom:2px solid var(--global-palette6, #718096);border-left:2px solid var(--global-palette6, #718096);}}<\/style>\n<div class=\"wp-block-kadence-accordion alignnone\"><div class=\"kt-accordion-wrap kt-accordion-id13054_4c3834-d5 kt-accordion-has-8-panes kt-active-pane-0 kt-accordion-block kt-pane-header-alignment-left kt-accodion-icon-style-arrow kt-accodion-icon-side-left\" style=\"max-width:none\"><div class=\"kt-accordion-inner-wrap\" data-allow-multiple-open=\"false\" data-start-open=\"none\">\n<div class=\"wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-7 kt-pane13054_926211-04\"><div class=\"kt-accordion-header-wrap\"><button class=\"kt-blocks-accordion-header kt-acccordion-button-label-show\" type=\"button\"><span class=\"kt-blocks-accordion-title-wrap\"><span class=\"kt-blocks-accordion-title\">user.cpp<\/span><\/span><span class=\"kt-blocks-accordion-icon-trigger\"><\/span><\/button><\/div><div class=\"kt-accordion-panel kt-accordion-panel-hidden\"><div class=\"kt-accordion-panel-inner\"><pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp\"><span class=\"hljs-meta\">#<span class=\"hljs-meta-keyword\">include<\/span> <span class=\"hljs-meta-string\">\"user.h\"<\/span><\/span>\n\n<span class=\"hljs-comment\">\/**\n * Global variables\n * float, int, and unsigned int, can be monitored and altered from imperix Cockpit\n *\/<\/span>\n<span class=\"hljs-keyword\">float<\/span> Vdc_meas  = <span class=\"hljs-number\">0<\/span>;  <span class=\"hljs-comment\">\/\/ Measured DC bus voltage<\/span>\n<span class=\"hljs-keyword\">float<\/span> Vout_ref  = <span class=\"hljs-number\">25<\/span>; <span class=\"hljs-comment\">\/\/ Buck converter output voltage reference<\/span>\n<span class=\"hljs-keyword\">float<\/span> Vout_meas = <span class=\"hljs-number\">0<\/span>;  <span class=\"hljs-comment\">\/\/ Measured output voltage<\/span>\n<span class=\"hljs-keyword\">float<\/span> d         = <span class=\"hljs-number\">0<\/span>;  <span class=\"hljs-comment\">\/\/ CB-PWM duty cycle<\/span>\n\n<span class=\"hljs-comment\">\/**\n * Specify the number of devices used by this code.\n * This information is used by Cockpit for display purposes only.\n *\/<\/span>\nNUMBER_OF_DEVICES(<span class=\"hljs-number\">1<\/span>);\n\n<span class=\"hljs-comment\">\/**\n * Initialization routine executed only once, before the first call of the main interrupt\n * To be used to configure all needed peripherals and perform all needed initializations\n *\/<\/span>\n<span class=\"hljs-function\">tUserSafe <span class=\"hljs-title\">UserInit<\/span><span class=\"hljs-params\">(<span class=\"hljs-keyword\">void<\/span>)<\/span>\n<\/span>{\n\t<span class=\"hljs-comment\">\/**\n\t * Configuration of the main interrupt:\n\t * - The frequency of CLOCK_0 is set to the desired switching frequency\n\t * - The main interrupt routine is mapped on CLOCK_0, with a phase of 0.5.\n\t * - As the the sampling of the ADC channels happens just before the interrupt is executed,\n\t *   setting a phase of 0.5 allows to sample in the middle of each switching periods.\n\t *\/<\/span>\n\tClock_SetFrequency(CLOCK_0, SW_FREQ);\n\tConfigureMainInterrupt(UserInterrupt, CLOCK_0, <span class=\"hljs-number\">0.5<\/span>);\n\n\t<span class=\"hljs-comment\">\/**\n\t * Configuration of the ADC channels, with:\n\t * - sensor sensitivity defined in user.h\n\t * - no sensor offset compensation\n\t *\/<\/span>\n\tAdc_ConfigureSensor(ADC0, IX_PEB_800_40_V_SENSITIVITY, <span class=\"hljs-number\">0.0<\/span>, <span class=\"hljs-number\">0<\/span>);\n\tAdc_EnableSynchronousAveraging(ADC0);\n\n\tAdc_ConfigureSensor(ADC1, IX_VSR_500_HBW_SENSITIVITY, <span class=\"hljs-number\">0.0<\/span>, <span class=\"hljs-number\">0<\/span>);\n\tAdc_EnableSynchronousAveraging(ADC1);\n\n\t<span class=\"hljs-comment\">\/**\n\t * Configuration of PWM channel 0 (lines 0 &amp; 1)\n\t * - mapping on CLOCK_0\n\t * - triangle carrier\n\t * - 1 microsecond dead-time between complementary signals\n\t *\/<\/span>\n\tCbPwm_ConfigureChannel(PWM_CHANNEL_0, CLOCK_0, TRIANGLE, DEADTIME);\n\n\t<span class=\"hljs-comment\">\/**\n\t * Note: the function CbPwm_ConfigureChannel() is a helper defined in user.h\n\t * By default this routine:\n\t * - sets a phase of 0 between CLOCK_0 and PWM carrier\n\t * - sets outputs as 2 complementary signals\n\t * - activates the PWM channel\n\t *\/<\/span>\n\n\t<span class=\"hljs-keyword\">return<\/span> SAFE;\n}\n\n\n<span class=\"hljs-comment\">\/**\n * Main interrupt routine\n *\/<\/span>\n<span class=\"hljs-function\">tUserSafe <span class=\"hljs-title\">UserInterrupt<\/span><span class=\"hljs-params\">(<span class=\"hljs-keyword\">void<\/span>)<\/span>\n<\/span>{\n\t<span class=\"hljs-comment\">\/\/ Retrieve the measurements<\/span>\n\tVdc_meas  = Adc_GetValue(ADC0);\n\tVout_meas = Adc_GetValue(ADC1);\n\n\t<span class=\"hljs-comment\">\/\/ Compute the duty cycle for the CB-PWM modulator<\/span>\n\td = Vout_ref \/ Vdc_meas;\n\n\t<span class=\"hljs-comment\">\/\/ Update the PWM duty-cycles<\/span>\n\tCbPwm_SetDutyCycle(PWM_CHANNEL_0, d);\n\n\t<span class=\"hljs-keyword\">return<\/span> SAFE;\n}\n\n\n<span class=\"hljs-comment\">\/**\n * Routine executed when the core state goes into FAULT mode\n *\/<\/span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">void<\/span> <span class=\"hljs-title\">UserError<\/span><span class=\"hljs-params\">(tErrorSource source)<\/span>\n<\/span>{\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre><\/div><\/div><\/div>\n<\/div><\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Global-variables\"><\/span>Global variables<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The initial segment of the user.cpp file is dedicated to the declaration of global variables. All global variables (of type int, unsigned int, or float) in <code>user.cpp<\/code> will be available in the monitoring software Cockpit (later introduced in the suggested further readings), as <a href=\"https:\/\/imperix.com\/doc\/software\/probe-variable\">probes<\/a> or <a href=\"https:\/\/imperix.com\/doc\/software\/tunable-parameter\">tunable parameters<\/a>. This enables real-time scoping and modification of these variables during converter operation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the buck converter in the user template, the variables below are instantiated specifically for this purpose.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"607\" height=\"122\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-43.png\" alt=\"Global variables to get started with the CPP SDK\" class=\"wp-image-45322\" style=\"width:607px;height:auto\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-43.png 607w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-43-300x60.png 300w\" sizes=\"auto, (max-width: 607px) 100vw, 607px\" \/><\/figure>\n<\/div>\n\n\n<div class=\"wp-block-simple-alerts-for-gutenberg-alert-boxes sab-alert sab-alert-info\" role=\"alert\">Users can prevent specific global variables from appearing in Cockpit by declaring them inside a dedicated C++ namespace, as done in the code example below.<\/div>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp\"><span class=\"hljs-keyword\">namespace<\/span>{<span class=\"hljs-keyword\">float<\/span> my_hidden_variable;}; <span class=\"hljs-comment\">\/\/ Variable that does not appear in Cockpit<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"UserInit-function\"><\/span>UserInit() function<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The next function located within <code>user.cpp<\/code> is <code>UserInit()<\/code>. This initialization routine is executed only once, prior to the initial call of the main interrupt. It is utilized to configure the main control interrupt timings and initialize all necessary hardware peripherals, such as ADCs and PWM modulators.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>UserInit()<\/code> notably defines the control period, the sampling phase, and the switching frequency, using the four clocks at the user&#8217;s disposal: <code>CLOCK_0<\/code>, <code>CLOCK_1<\/code>, <code>CLOCK_2<\/code> and <code>CLOCK_3<\/code>. Comprehensive details regarding the configuration of these clocks can be found in <a href=\"https:\/\/imperix.com\/doc\/help\/timing-configuration-on-imperix-controllers\">Timing configuration on imperix controllers<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the specific case of the user template, the <code>UserInit()<\/code> function configures the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sets the frequency of <code>CLOCK_0<\/code> to the desired frequency (e.g. 20kHz).<\/li>\n\n\n\n<li><span style=\"color: var(--global-palette4);\">Maps the main interrupt to <\/span><code>CLOCK_0<\/code> and sets a sampling phase of 0.5 <\/li>\n\n\n\n<li>Configures ADC channels 0 and 1 with the proper sensor sensitivity. <br>(Warning: for B-Box RCP 3.0 the configured sensitivity should include the configured input gain on the analog front end)<\/li>\n\n\n\n<li>Enables synchronous averaging for both ADC channels. More information on synchronous averaging is provided in <a href=\"https:\/\/imperix.com\/doc\/help\/sampling-techniques-for-power-electronics?currentThread=b-board-pro\">Sampling techniques for power electronics<\/a>.<\/li>\n\n\n\n<li>Initializes a carrier-based PWM peripheral on PWM_CHANNEL_0. This modulator is mapped to CLOCK_0, is based on a triangular carrier, and is configured with a dead-time of 1 us.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"697\" height=\"678\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-45.png\" alt=\"User init function to get started with the CPP SDK\" class=\"wp-image-45400\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-45.png 697w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-45-300x292.png 300w\" sizes=\"auto, (max-width: 697px) 100vw, 697px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"UserInterrupt-function\"><\/span>UserInterrupt() function<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, the <code>UserInterrupt()<\/code> function encapsulates the main control interrupt routine. This function is executed at <code>CLOCK_0<\/code>&#8216;s frequency, as configured in <code>UserInit()<\/code>. <code>UserInterrupt()<\/code> implements the user-defined control algorithms required to operate power converters. This generally includes the acquisition of ADC measurements, the execution of standard power electronics control strategies (such as PI controllers and dq-frame transformations), and the update of the duty cycle for the PWM modulators.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the case of the user template, the <code>UserInterrupt()<\/code> function simply computes the required duty cycle for the buck converter according to the input voltage measurement. It then updates the output of the PWM modulator.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"410\" height=\"211\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-46.png\" alt=\"Getting started with CPP SDK control development\" class=\"wp-image-45416\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-46.png 410w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-46-300x154.png 300w\" sizes=\"auto, (max-width: 410px) 100vw, 410px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Note that both the <code>UserInit()<\/code> and <code>UserInterrupt()<\/code> functions return the value <code>SAFE<\/code> when they were executed without errors. Otherwise, the B-Box will go into fault, should an error occur during the execution, or if the value <code>UNSAFE <\/code>is returned.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Further-reading\"><\/span>Further reading<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It is highly recommended to read the following pages:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/imperix.com\/doc\/help\/programming-essentials-for-the-cpp-sdk\">Programming essentials for the CPP SDK<\/a> provides programming insights for CPP SDK users.<\/li>\n\n\n\n<li><a href=\"https:\/\/imperix.com\/doc\/help\/programming-imperix-controllers\">Programming and operating imperix controllers<\/a>&nbsp;addresses how to deploy the control code onto an imperix controller.<\/li>\n\n\n\n<li><a href=\"https:\/\/imperix.com\/doc\/help\/cockpit-user-guide\">Cockpit user guide (PN300)<\/a>&nbsp;gives a full guide on how to use imperix Cockpit monitoring software.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Controller-specific getting-started instructions can be found in the following notes:<a href=\"https:\/\/imperix.com\/doc\/help\/b-box-4-quick-start-guide\"><\/a><a href=\"https:\/\/imperix.com\/doc\/help\/getting-started-acg-sdk-simulink\"><\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/imperix.com\/doc\/help\/b-box-4-quick-start-guide\">B-Box 4 &#8211; Quick start Guide<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-b-box-micro\">B-Box micro &#8211; Quick start Guide<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/imperix.com\/doc\/help\/tpi-quick-start-guide\">TPI 8032 &#8211; Quick start Guide<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article, targeted towards first-time imperix users, provides instructions to get started with the CPP SDK. It focuses on the typical workflow associated with the&#8230;<\/p>\n","protected":false},"author":11,"featured_media":13282,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[14,3],"tags":[165,74,161],"software-environments":[105],"provided-results":[],"related-products":[31,32,92,166,51,110],"guidedreadings":[],"tutorials":[],"user-manuals":[136],"coauthors":[64],"class_list":["post-13054","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-getting-started-cpp-sdk","category-help","tag-b-box-4","tag-cpp-sdk","tag-imperix-controllers","software-environments-c-plus-plus","related-products-b-board-pro","related-products-b-box-rcp","related-products-b-box-micro","related-products-b-box-rcp-3-0","related-products-cpp-sdk","related-products-tpi","user-manuals-cpp-sdk"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Getting started with the CPP SDK - imperix<\/title>\n<meta name=\"description\" content=\"This page explains how to get started with the CPP SDK (Software Development Kit) for the programming of imperix RCP controllers.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting started with the CPP SDK - imperix\" \/>\n<meta property=\"og:description\" content=\"This page explains how to get started with the CPP SDK (Software Development Kit) for the programming of imperix RCP controllers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\" \/>\n<meta property=\"og:site_name\" content=\"imperix\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-25T10:54:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-25T11:06:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/3_2_ratio_PN149.png\" \/>\n\t<meta property=\"og:image:width\" content=\"450\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jessy An\u00e7ay\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jessy An\u00e7ay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk\"},\"author\":{\"name\":\"Jessy An\u00e7ay\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/person\\\/53bdc49b53b03a52afee023feef62ea4\"},\"headline\":\"Getting started with the CPP SDK\",\"datePublished\":\"2026-06-25T10:54:04+00:00\",\"dateModified\":\"2026-06-25T11:06:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk\"},\"wordCount\":1496,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/3_2_ratio_PN149.png\",\"keywords\":[\"B-Box 4\",\"CPP SDK\",\"imperix controllers\"],\"articleSection\":[\"Getting started with CPP SDK\",\"Product notes\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk\",\"name\":\"Getting started with the CPP SDK - imperix\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/3_2_ratio_PN149.png\",\"datePublished\":\"2026-06-25T10:54:04+00:00\",\"dateModified\":\"2026-06-25T11:06:38+00:00\",\"description\":\"This page explains how to get started with the CPP SDK (Software Development Kit) for the programming of imperix RCP controllers.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk#primaryimage\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/3_2_ratio_PN149.png\",\"contentUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/3_2_ratio_PN149.png\",\"width\":450,\"height\":300},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Knowledge base\",\"item\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Product notes\",\"item\":\"https:\\\/\\\/imperix.com\\\/doc\\\/category\\\/help\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Getting started with the CPP SDK\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#website\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\",\"name\":\"imperix\",\"description\":\"power electronics\",\"publisher\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/imperix.com\\\/doc\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\",\"name\":\"imperix\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/imperix_logo.png\",\"contentUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/imperix_logo.png\",\"width\":350,\"height\":120,\"caption\":\"imperix\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/person\\\/53bdc49b53b03a52afee023feef62ea4\",\"name\":\"Jessy An\u00e7ay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ee54f075f5969fcfd2bf6f348058cf40ca40d54a6472ac7c0a9855d036190d0a?s=96&d=mm&r=g3826f6cf12d7359812a917063d7db3c1\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ee54f075f5969fcfd2bf6f348058cf40ca40d54a6472ac7c0a9855d036190d0a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ee54f075f5969fcfd2bf6f348058cf40ca40d54a6472ac7c0a9855d036190d0a?s=96&d=mm&r=g\",\"caption\":\"Jessy An\u00e7ay\"},\"description\":\"Jessy is a power electronics engineer. At imperix, he is mostly involved with sales and project engineering. On the knowledge base, he is an active contributor to numerous notes and examples on a broad variety of topics.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/jessy-ancay-a47615237\\\/\"],\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/author\\\/ancay\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Getting started with the CPP SDK - imperix","description":"This page explains how to get started with the CPP SDK (Software Development Kit) for the programming of imperix RCP controllers.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk","og_locale":"en_US","og_type":"article","og_title":"Getting started with the CPP SDK - imperix","og_description":"This page explains how to get started with the CPP SDK (Software Development Kit) for the programming of imperix RCP controllers.","og_url":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk","og_site_name":"imperix","article_published_time":"2026-06-25T10:54:04+00:00","article_modified_time":"2026-06-25T11:06:38+00:00","og_image":[{"width":450,"height":300,"url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/3_2_ratio_PN149.png","type":"image\/png"}],"author":"Jessy An\u00e7ay","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jessy An\u00e7ay","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk#article","isPartOf":{"@id":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk"},"author":{"name":"Jessy An\u00e7ay","@id":"https:\/\/imperix.com\/doc\/#\/schema\/person\/53bdc49b53b03a52afee023feef62ea4"},"headline":"Getting started with the CPP SDK","datePublished":"2026-06-25T10:54:04+00:00","dateModified":"2026-06-25T11:06:38+00:00","mainEntityOfPage":{"@id":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk"},"wordCount":1496,"commentCount":0,"publisher":{"@id":"https:\/\/imperix.com\/doc\/#organization"},"image":{"@id":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk#primaryimage"},"thumbnailUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/3_2_ratio_PN149.png","keywords":["B-Box 4","CPP SDK","imperix controllers"],"articleSection":["Getting started with CPP SDK","Product notes"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk#respond"]}]},{"@type":"WebPage","@id":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk","url":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk","name":"Getting started with the CPP SDK - imperix","isPartOf":{"@id":"https:\/\/imperix.com\/doc\/#website"},"primaryImageOfPage":{"@id":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk#primaryimage"},"image":{"@id":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk#primaryimage"},"thumbnailUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/3_2_ratio_PN149.png","datePublished":"2026-06-25T10:54:04+00:00","dateModified":"2026-06-25T11:06:38+00:00","description":"This page explains how to get started with the CPP SDK (Software Development Kit) for the programming of imperix RCP controllers.","breadcrumb":{"@id":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk#primaryimage","url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/3_2_ratio_PN149.png","contentUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/3_2_ratio_PN149.png","width":450,"height":300},{"@type":"BreadcrumbList","@id":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Knowledge base","item":"https:\/\/imperix.com\/doc\/"},{"@type":"ListItem","position":2,"name":"Product notes","item":"https:\/\/imperix.com\/doc\/category\/help"},{"@type":"ListItem","position":3,"name":"Getting started with the CPP SDK"}]},{"@type":"WebSite","@id":"https:\/\/imperix.com\/doc\/#website","url":"https:\/\/imperix.com\/doc\/","name":"imperix","description":"power electronics","publisher":{"@id":"https:\/\/imperix.com\/doc\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/imperix.com\/doc\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/imperix.com\/doc\/#organization","name":"imperix","url":"https:\/\/imperix.com\/doc\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/imperix.com\/doc\/#\/schema\/logo\/image\/","url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/imperix_logo.png","contentUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/imperix_logo.png","width":350,"height":120,"caption":"imperix"},"image":{"@id":"https:\/\/imperix.com\/doc\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/imperix.com\/doc\/#\/schema\/person\/53bdc49b53b03a52afee023feef62ea4","name":"Jessy An\u00e7ay","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ee54f075f5969fcfd2bf6f348058cf40ca40d54a6472ac7c0a9855d036190d0a?s=96&d=mm&r=g3826f6cf12d7359812a917063d7db3c1","url":"https:\/\/secure.gravatar.com\/avatar\/ee54f075f5969fcfd2bf6f348058cf40ca40d54a6472ac7c0a9855d036190d0a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ee54f075f5969fcfd2bf6f348058cf40ca40d54a6472ac7c0a9855d036190d0a?s=96&d=mm&r=g","caption":"Jessy An\u00e7ay"},"description":"Jessy is a power electronics engineer. At imperix, he is mostly involved with sales and project engineering. On the knowledge base, he is an active contributor to numerous notes and examples on a broad variety of topics.","sameAs":["https:\/\/www.linkedin.com\/in\/jessy-ancay-a47615237\/"],"url":"https:\/\/imperix.com\/doc\/author\/ancay"}]}},"_links":{"self":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/13054","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/comments?post=13054"}],"version-history":[{"count":165,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/13054\/revisions"}],"predecessor-version":[{"id":45968,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/13054\/revisions\/45968"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/media\/13282"}],"wp:attachment":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/media?parent=13054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/categories?post=13054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/tags?post=13054"},{"taxonomy":"software-environments","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/software-environments?post=13054"},{"taxonomy":"provided-results","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/provided-results?post=13054"},{"taxonomy":"related-products","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/related-products?post=13054"},{"taxonomy":"guidedreadings","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/guidedreadings?post=13054"},{"taxonomy":"tutorials","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/tutorials?post=13054"},{"taxonomy":"user-manuals","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/user-manuals?post=13054"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/coauthors?post=13054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}