{"id":7302,"date":"2021-12-02T11:38:50","date_gmt":"2021-12-02T10:38:50","guid":{"rendered":"https:\/\/playembedded.org\/?p=7302"},"modified":"2024-02-04T12:21:40","modified_gmt":"2024-02-04T11:21:40","slug":"flash-run","status":"publish","type":"post","link":"https:\/\/playembedded.org\/blog\/flash-run\/","title":{"rendered":"How to Flash &#038; Run a project in ChibiStudio"},"content":{"rendered":"<h2 class=\"wp-block-heading level_1\" id=\"1_Introduction\">Introduction<\/h2>\n\n\n\n<p>This article is a step-by-step guide showing how to reliably flash and run a project in ChibiStudio.<\/p>\n\n\n\n<h2 class=\"wp-block-heading level_1\" id=\"2_Step_by_step_procedure\">Step by step procedure<\/h2>\n\n\n\n<h3 class=\"wp-block-heading level_2\" id=\"3_Creating_the_launch_configuration\">Creating the launch configuration<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Check if the <strong>build<\/strong> folder exists (if it is a freshly imported project <a href=\"https:\/\/playembedded.org\/how-to-build-a-project\/\" data-type=\"URL\" data-id=\"https:\/\/playembedded.org\/how-to-build-a-project\/\">press the hammer button)<\/a><\/li>\n\n\n\n<li>Open the <strong>build<\/strong><em> <\/em>folder located inside your project folder <\/li>\n\n\n\n<li>Select the <strong>.elf <\/strong>file<\/li>\n\n\n\n<li>Go to <strong>External Tools<\/strong> menu (downward facing black arrow)<\/li>\n\n\n\n<li>Select <strong>Create OpenOCD Debug Configuration (pre-select .elf file into a project)<\/strong><\/li>\n\n\n\n<li>In the Console window you can read <strong>Done<\/strong><\/li>\n\n\n\n<li>The <strong>debug <\/strong>folder is now visible (a refresh &ndash; <strong>F5 <\/strong>&ndash; of the Project Explorer may be required)<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-jetpack-slideshow aligncenter\" data-effect=\"slide\"><div class=\"wp-block-jetpack-slideshow_container swiper-container\"><ul class=\"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper\"><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"471\" height=\"225\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8234\" data-id=\"8234\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Build-only-view-PE.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Build-only-view-PE.png 471w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Build-only-view-PE-300x143.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Build-only-view-PE-150x72.png 150w\" sizes=\"(max-width: 471px) 100vw, 471px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Locating the build folder<\/figcaption><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"471\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8235\" data-id=\"8235\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Debugger-config-PE-1024x471.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Debugger-config-PE-1024x471.png 1024w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Debugger-config-PE-300x138.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Debugger-config-PE-150x69.png 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Debugger-config-PE.png 1062w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Configurating the debugger<\/figcaption><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"209\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8236\" data-id=\"8236\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Success-debug-config-PE-e1673284015316-1024x209.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Success-debug-config-PE-e1673284015316-1024x209.png 1024w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Success-debug-config-PE-e1673284015316-300x61.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Success-debug-config-PE-e1673284015316-150x31.png 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Success-debug-config-PE-e1673284015316-1200x244.png 1200w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Success-debug-config-PE-e1673284015316.png 1257w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Console message on successful debugger configuration<\/figcaption><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"638\" height=\"443\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8243\" data-id=\"8243\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Debug-folder-visible-PE.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Debug-folder-visible-PE.png 638w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Debug-folder-visible-PE-300x208.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Debug-folder-visible-PE-150x104.png 150w\" sizes=\"(max-width: 638px) 100vw, 638px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Debug folder visible in the project<\/figcaption><\/figure><\/li><\/ul><a class=\"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white\" role=\"button\"><\/a><a class=\"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white\" role=\"button\"><\/a><a aria-label=\"Pause Slideshow\" class=\"wp-block-jetpack-slideshow_button-pause\" role=\"button\"><\/a><div class=\"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white\"><\/div><\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading level_2\" id=\"4_Launching_OpenOCD\">Launching OpenOCD<\/h3>\n\n\n\n<p> In this example we are going to use an <a rel=\"noreferrer noopener\" href=\"https:\/\/www.analog.com\/en\/design-center\/evaluation-hardware-and-software\/evaluation-boards-kits\/sdp-k1.html\" target=\"_blank\">Analog Devices SDP-K1<\/a>. The board comes with the CMSIS-DAP debugger and an STM32F4 microcontroller. <\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Connect microcontroller to your PC <\/li>\n\n\n\n<li>Click <strong>External Tools<\/strong> menu (downward facing black arrow)<\/li>\n\n\n\n<li>Choose <strong>OpenOCD on CMSIS-DAP (prompts for .cfg target configuration)<\/strong> (Note: the menu entry depends on the debugger in use)<\/li>\n\n\n\n<li>Follow this path: <em>C:\\ChibiStudio\\tools\\openocd\\scripts\\boards<\/em><\/li>\n\n\n\n<li>Select the configuration source file <strong><em>adi_sdp_k1.cfg<\/em><\/strong> (Note: the script file depends on the microcontroller in use) <\/li>\n\n\n\n<li>Read successful message on the Console <\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-jetpack-slideshow aligncenter\" data-effect=\"slide\"><div class=\"wp-block-jetpack-slideshow_container swiper-container\"><ul class=\"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper\"><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"983\" height=\"1024\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8304\" data-id=\"8304\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Launch-config-PE-1-983x1024.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Launch-config-PE-1-983x1024.png 983w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Launch-config-PE-1-288x300.png 288w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Launch-config-PE-1-144x150.png 144w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Launch-config-PE-1.png 1004w\" sizes=\"(max-width: 983px) 100vw, 983px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Creating the launch configuration<\/figcaption><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"813\" height=\"344\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8239\" data-id=\"8239\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Listening-on-port-PE.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Listening-on-port-PE.png 813w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Listening-on-port-PE-300x127.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Listening-on-port-PE-150x63.png 150w\" sizes=\"(max-width: 813px) 100vw, 813px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Console message on successful launch configuration <\/figcaption><\/figure><\/li><\/ul><a class=\"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white\" role=\"button\"><\/a><a class=\"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white\" role=\"button\"><\/a><a aria-label=\"Pause Slideshow\" class=\"wp-block-jetpack-slideshow_button-pause\" role=\"button\"><\/a><div class=\"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white\"><\/div><\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading level_2\" id=\"5_Flash_Run_the_project\">Flash &amp; Run the project<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click <strong>Debug<\/strong><em> <\/em>menu (downward facing black arrow)<\/li>\n\n\n\n<li>Select <strong>&lt;&hellip;<em>ProjectName<\/em>&hellip;&gt; (build-ch.elf)(OpenOCD, Flash and Run)<\/strong>. You will be transferred to the Debug Perspective. <\/li>\n\n\n\n<li>Press the <strong>Resume<\/strong><em> <\/em>button. The project is now being flashed and running on your microcontroller.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"681\" height=\"365\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Flashing-and-running-PE-1.png\" alt=\"\" class=\"wp-image-8247\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Flashing-and-running-PE-1.png 681w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Flashing-and-running-PE-1-300x161.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Flashing-and-running-PE-1-150x80.png 150w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\"><figcaption class=\"wp-element-caption\">Flashing &amp; Running a project in ChibiStudio<\/figcaption><\/figure>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This article is a step-by-step guide showing how to reliably flash and run a project in ChibiStudio. Step by step procedure Creating the launch configuration Launching OpenOCD In this example we are going to use an Analog Devices SDP-K1. The board comes with the CMSIS-DAP debugger and an STM32F4 microcontroller. Flash &amp; Run the [&hellip;]<\/p>\n","protected":false},"author":21,"featured_media":7416,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1270],"tags":[1302],"coauthors":[1272],"class_list":["post-7302","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-tos","tag-toolchain","green"],"views":5176,"jetpack_featured_media_url":"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/ChibiStudio-with-ADI-SDP-K1-PE.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts\/7302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/comments?post=7302"}],"version-history":[{"count":0,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts\/7302\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/media\/7416"}],"wp:attachment":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/media?parent=7302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/categories?post=7302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/tags?post=7302"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/coauthors?post=7302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}