{"id":4179,"date":"2026-01-23T13:45:54","date_gmt":"2026-01-23T13:45:54","guid":{"rendered":"https:\/\/blog.embeddedexpert.io\/?p=4179"},"modified":"2026-01-23T13:45:56","modified_gmt":"2026-01-23T13:45:56","slug":"getting-started-with-stm32h7-dual-core-how-to-debug-the-firmware","status":"publish","type":"post","link":"https:\/\/blog.embeddedexpert.io\/?p=4179","title":{"rendered":"Getting Started with STM32H7 Dual Core: How to Debug the Firmware"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-Jan-23-2026-at-04_24_16-PM-1024x683.png\" alt=\"\" class=\"wp-image-4180\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-Jan-23-2026-at-04_24_16-PM-1024x683.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-Jan-23-2026-at-04_24_16-PM-300x200.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-Jan-23-2026-at-04_24_16-PM-768x512.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-Jan-23-2026-at-04_24_16-PM-1150x767.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-Jan-23-2026-at-04_24_16-PM-750x500.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-Jan-23-2026-at-04_24_16-PM-400x267.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-Jan-23-2026-at-04_24_16-PM-250x167.png 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/ChatGPT-Image-Jan-23-2026-at-04_24_16-PM.png 1536w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In this second part, the guide focuses on debugging firmware on the dual-core STM32H747 with particular emphasis on observing variables during runtime. It explains how to attach the debugger to each core, inspect memory and registers, and track variable changes to verify correct system behavior.<\/p>\n\n\n\n<p>In this guide, we shall cover the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Firmware Development.<\/li>\n\n\n\n<li>How to launch the debug session.<\/li>\n\n\n\n<li>Results.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">6. Firmware Development:<\/h2>\n\n\n\n<p>In this part, we shall add variables for both core to observer them in the live expression window of STM32CubeIDE.<\/p>\n\n\n\n<p>In main.c for CM7 part of the project, in user code begin PV, declare the following global variable:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">uint8_t counter_cm7;<\/pre><\/div>\n\n\n\n<p>In while 1 loop before the led toggle, increment the variable as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">counter_cm7++;<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Save the project.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In main.c for CM4 part of the project, declare the following global variable:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">uint8_t counter_cm4;<\/pre><\/div>\n\n\n\n<p>In while 1 loop just before the toggle led operation, increment the variable as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">counter_cm4++;<\/pre><\/div>\n\n\n\n<p>Save the project.<\/p>\n\n\n\n<p>Thats all for the firmware.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">7. How Launch the Debugger:<\/h2>\n\n\n\n<p>From top toolbar, click on the down arrow near the debugging icon and select debug configuration as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"273\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1024x273.jpg\" alt=\"\" class=\"wp-image-4181\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1024x273.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-300x80.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-768x204.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1536x409.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1150x306.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-750x200.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-400x106.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-250x67.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26.jpg 1984w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Next, from left side of the window, double click on CM7 part of the project as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"714\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-34-59-1024x714.jpg\" alt=\"\" class=\"wp-image-4182\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-34-59-1024x714.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-34-59-300x209.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-34-59-768x535.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-34-59-1536x1071.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-34-59-2048x1428.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-34-59-1150x802.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-34-59-750x523.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-34-59-400x279.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-34-59-250x174.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Next, launch another debugger session for the CM4 part by clicking on down arrow and select debug configuration as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"273\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1-1024x273.jpg\" alt=\"\" class=\"wp-image-4183\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1-1024x273.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1-300x80.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1-768x204.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1-1536x409.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1-1150x306.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1-750x200.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1-400x106.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1-250x67.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-32-26-1.jpg 1984w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Launch CM4 debug session:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"714\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-38-57-1024x714.jpg\" alt=\"\" class=\"wp-image-4184\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-38-57-1024x714.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-38-57-300x209.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-38-57-768x535.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-38-57-1536x1071.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-38-57-2048x1428.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-38-57-1150x802.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-38-57-750x523.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-38-57-400x279.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-38-57-250x174.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Next, highlight both project and click on resume as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"582\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-39-15-1024x582.jpg\" alt=\"\" class=\"wp-image-4185\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-39-15-1024x582.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-39-15-300x171.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-39-15-768x437.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-39-15-1536x873.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-39-15-2048x1164.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-39-15-1150x654.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-39-15-750x426.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-39-15-400x227.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/2026-01-23_16-39-15-250x141.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Now, you can debug both core by setting breakpoints, observe memory etc.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">8. Results:<\/h2>\n\n\n\n<p>By adding counter_cm7 and counter_cm4 to live expression window, you should be able to see the variable incrementing as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"697\" height=\"1024\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/Screen-Recording-2026-01-23-at-16.16.28-697x1024.gif\" alt=\"\" class=\"wp-image-4186\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/Screen-Recording-2026-01-23-at-16.16.28-697x1024.gif 697w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/Screen-Recording-2026-01-23-at-16.16.28-204x300.gif 204w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/Screen-Recording-2026-01-23-at-16.16.28-768x1129.gif 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/Screen-Recording-2026-01-23-at-16.16.28-1045x1536.gif 1045w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/Screen-Recording-2026-01-23-at-16.16.28-750x1102.gif 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/Screen-Recording-2026-01-23-at-16.16.28-400x588.gif 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/01\/Screen-Recording-2026-01-23-at-16.16.28-250x367.gif 250w\" sizes=\"(max-width: 697px) 100vw, 697px\" \/><\/figure>\n\n\n\n<p>Now, you can debug the both core without any issue.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Happy coding \ud83d\ude09<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this second part, the guide focuses on debugging firmware on the dual-core STM32H747 with particular emphasis on observing variables during runtime. It explains how to attach the debugger to each core, inspect memory and registers, and track variable changes to verify correct system behavior. In this guide, we shall cover the following: 6. Firmware [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,12],"tags":[],"class_list":["post-4179","post","type-post","status-publish","format-standard","hentry","category-embedded-systems","category-stm32"],"_links":{"self":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/4179"}],"collection":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4179"}],"version-history":[{"count":1,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/4179\/revisions"}],"predecessor-version":[{"id":4187,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/4179\/revisions\/4187"}],"wp:attachment":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}