{"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-25T12:00:00","modified_gmt":"2026-06-25T12:00:00","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\/#Programming-workflow-with-the-CPP-SDK\" >Programming workflow with the CPP SDK<\/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\/#Navigating-the-IDE\" >Navigating the 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\/#Structure-and-content-of-the-user-template\" >Structure and content of the user template<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\/#Developing-the-user-code\" >Developing the user code<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" 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-7\" 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-8\" 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-9\" href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk\/#Launching-the-user-code\" >Launching the user code<\/a><\/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 provides instructions for getting started with the <a type=\"link\" href=\"\/software\/cpp-sdk\/\" id=\"\/software\/cpp-sdk\/\">CPP SDK<\/a>, focusing on the workflow for developing control algorithms for imperix controllers in C++. Specifically targeted at first-time users, 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 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 the C++ IDE and to the structure and content of the user code template.<\/li>\n\n\n\n<li><strong>Buck converter example:<\/strong> An example initializing and operating the main hardware peripherals, such as ADCs and PWM modulators.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">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>.<\/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) for programming imperix controllers in C++. It includes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>Imperix C\/C++ IDE<\/strong>, an Eclipse-based development environment tailored to 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 embedded&nbsp;software for the controllers (Linux-based environment&nbsp;on the supervisor CPU and bare-metal kernel on the user application CPU).<\/li>\n\n\n\n<li>The standard&nbsp;<strong>FPGA firmware<\/strong>, including all the necessary I\/O peripherals.<\/li>\n\n\n\n<li>The&nbsp;<strong>Cockpit<\/strong>&nbsp;monitoring software. <a href=\"https:\/\/imperix.com\/software\/cockpit\/\">Cockpit<\/a> enables real-time interaction with and monitoring of the physical converter by providing access to model variables and all 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<p class=\"wp-block-paragraph\"><a href=\"https:\/\/imperix.com\/products\/power-electronic-controllers\/\">Imperix controllers<\/a> can also be programmed using graphical approaches from Simulink or PLECS, leveraging automated code generation. Users interested in that approach should refer to the specific <a href=\"\/doc\/help\/getting-started-with-acg-sdk\" type=\"link\" id=\"\/doc\/help\/getting-started-with-acg-sdk\">getting-started guide<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Programming-workflow-with-the-CPP-SDK\"><\/span><strong><strong>Programming workflow<\/strong><\/strong> with the CPP SDK<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Programming imperix controllers is globally arranged into four steps:<\/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 Ethernet.<\/li>\n\n\n\n<li><strong>Execution:<\/strong> The executable is loaded and run in real time on the controller.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><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\" style=\"aspect-ratio:3.335629139072848;width:575px;height:auto\" 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<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Navigating-the-IDE\"><\/span>Navigating the IDE<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Assuming the user template has already been imported into the workspace, users should see a window as shown below. Instructions to import the user template are 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 the CPP SDK<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The interface is organized into several key areas:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Build and launch controls (top left):<\/strong> Dedicated buttons in the upper-left toolbar compile the code and deploy the executable to the controller.<\/li>\n\n\n\n<li><strong>Project explorer (left panel):<\/strong> Displays the project&#8217;s directory structure and project files. The contents of these files are detailed in the upcoming sections.<\/li>\n\n\n\n<li><strong>Code editor (center panel):<\/strong> The main workspace for editing code.<\/li>\n\n\n\n<li><strong>Console (bottom panel):<\/strong> Displays system logs, including 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=\"Structure-and-content-of-the-user-template\"><\/span>Structure and content of the user template<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 template contains several folders, as shown and described below.<\/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:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>user.cpp<\/code>, which serves as the code root. It 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 example below.<\/li>\n\n\n\n<li><code>user.h<\/code>, which typically contains the prototypes of user-defined routines, as well as some useful readability-helper definitions.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Includes<\/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. By reviewing these headers, users can quickly obtain an overview of the available routines and the information needed to implement them. This folder is structured into two main subdirectories:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>Core<\/strong> folder notably includes routines managing the operational state (FAULT, BLOCKED, OPERATING) of imperix controllers. More information on the related operating principles is given in <a href=\"https:\/\/imperix.com\/doc\/help\/operating-principles-of-imperix-controllers\">PN261<\/a>.<\/li>\n\n\n\n<li>The <strong>Driver<\/strong> folder contains the definitions of the peripheral driver routines. All of them are further detailed in the imperix software documentation: <a href=\"https:\/\/imperix.com\/software-documentation\/\">https:\/\/imperix.com\/software-documentation\/<\/a><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">API<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>API <\/strong>folder provides predefined routines frequently used in power electronics. 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>Basic PLLs, such as dq-frame and SOGI<\/li>\n\n\n\n<li>Coordinate transformations<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Developing-the-user-code\"><\/span><strong>Developing the user code<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This section addresses the development of the user-specific, application-level part of the embedded software. This starts from the <code>user.cpp<\/code> file located in the <strong>My_functions<\/strong> folder.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hereafter, an example is developed, meant to operate a buck converter in an open-loop configuration. The resulting user.cpp file is shown below, with explanations for each section given afterward. Further details on the application itself can be found in <a href=\"https:\/\/imperix.com\/doc\/implementation\/step-down-buck-converter?currentThread=current-controlled-buck-converter\">TN100<\/a>.<\/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 <code>user.cpp<\/code> The file is dedicated to declaring global variables. All global variables (of type int, unsigned int, or float) will be available in Cockpit during run time. For the buck converter example, the following variables 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<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 first function is <code>UserInit()<\/code>. This initialization routine is executed only once at startup, prior to the first call of the main interrupt. It is used to configure interrupt timings and initialize all necessary hardware peripherals. More information on how imperix controllers behave at runtime is provided in <a href=\"https:\/\/imperix.com\/doc\/help\/operating-principles-of-imperix-controllers\">PN261<\/a>.<\/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. Comprehensive details regarding the configuration of these clocks can be found in <a href=\"https:\/\/imperix.com\/doc\/help\/timing-configuration-on-imperix-controllers\">PN259<\/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 (the middle of the period)<\/li>\n\n\n\n<li>Configures ADC channels 0 and 1 with the proper sensor sensitivity. More information about the available routines is provided in the <a href=\"https:\/\/imperix.com\/doc\/software\/analog-data-acquisition\">ADC<\/a> peripheral documentation.<br>(Warning: for B-Box 3, the configured sensitivity should consider the hardware gain that is configured on the analog front end. A numerical example is given in <a href=\"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp\">PN105<\/a>.)<\/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\">PN258<\/a>.<\/li>\n\n\n\n<li>Initializes a carrier-based PWM peripheral on <code>PWM_CHANNEL_0<\/code>. This modulator is mapped to <code>CLOCK_0is based on a triangular carrier and is configured with a dead time<\/code> of 1 us. More information on the available routines is provided in the documentation for the <a href=\"https:\/\/imperix.com\/doc\/software\/carrier-based-pwm\">CB-PWM<\/a> peripheral.<\/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\">The <code>UserInterrupt()<\/code> routine is executed at the <code>CLOCK_0<\/code> frequency, as configured during <code>UserInit()<\/code>. This function encapsulates the main interrupt-based control routines required to operate the power stage. This generally includes acquiring ADC measurements, executing control strategies, and updating the PWM duty cycles. More information on this typical process is given in <a href=\"https:\/\/imperix.com\/doc\/help\/operating-principles-of-imperix-controllers\">PN261<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this example, the <code>UserInterrupt()<\/code> function simply computes the required duty cycle for the buck converter based on the input voltage measurement. It then updates the PWM outputs.<\/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 goes 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=\"Launching-the-user-code\"><\/span><strong>Launching the user code<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once the user code has been successfully written and compiled, Cockpit automatically opens to flash it onto the controller. The subsequent steps are described in <a href=\"\/doc\/help\/programming-imperix-controllers\">PN138<\/a> and are identical for both imperix SDKs.<\/p>\n\n\n\n<div class=\"wp-block-simple-alerts-for-gutenberg-alert-boxes sab-alert sab-alert-warning\" role=\"alert\">Because offline simulation is not readily available with the CPP SDK, development relies heavily on incremental physical validation. It is hence critical to <strong>configure robust hardware protections<\/strong> prior to testing. The article on <a href=\"https:\/\/imperix.com\/doc\/help\/over-current-and-over-voltage-protection?currentThread=power-modules\">overcurrent and overvoltage protections<\/a> is a recommended starting point.<\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Memory access errors<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Memory access violations may easily occur when writing code manually, most often due to misused pointers. When an invalid memory address is accessed, a so-called <strong>software fault<\/strong> is detected, immediately blocking all PWM outputs. This is one of many other protection mechanisms available on imperix controllers, as documented in <a href=\"https:\/\/imperix.com\/doc\/help\/hardware-protections-on-imperix-controllers\">PN263<\/a>. In such a case, the user code must be restarted.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"570\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-49-1024x570.png\" alt=\"Programming essentials for the CPP SDK pointer error\" class=\"wp-image-45698\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-49-1024x570.png 1024w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-49-300x167.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-49-768x428.png 768w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2022\/08\/image-49.png 1104w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\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 recommended to also 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\">Efficient programming with the CPP SDK<\/a> provides insights specific to power electronics applications.<\/li>\n\n\n\n<li>The <a href=\"https:\/\/imperix.com\/doc\/help\/cockpit-user-guide\">Cockpit user guide<\/a>&nbsp;also provides useful tips on using the monitoring software.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, 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 3 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","protected":false},"excerpt":{"rendered":"<p>This article provides instructions for getting started with the CPP SDK, focusing on the workflow for developing control algorithms for imperix controllers in C++. Specifically&#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 v28.1 - 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-25T12:00:00+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=\"8 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-25T12:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/getting-started-with-cpp-sdk\"},\"wordCount\":1330,\"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-25T12:00:00+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-25T12:00:00+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":"8 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-25T12:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/imperix.com\/doc\/help\/getting-started-with-cpp-sdk"},"wordCount":1330,"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-25T12:00:00+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":173,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/13054\/revisions"}],"predecessor-version":[{"id":48593,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/13054\/revisions\/48593"}],"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}]}}