{"id":7315,"date":"2022-02-08T16:25:03","date_gmt":"2022-02-08T15:25:03","guid":{"rendered":"https:\/\/playembedded.org\/?p=7315"},"modified":"2024-02-04T12:22:10","modified_gmt":"2024-02-04T11:22:10","slug":"how-to-duplicate-a-project","status":"publish","type":"post","link":"https:\/\/playembedded.org\/blog\/how-to-duplicate-a-project\/","title":{"rendered":"How to duplicate a project in ChibiStudio"},"content":{"rendered":"<h2 class=\"wp-block-heading level_1\" id=\"1_Introduction\">Introduction<\/h2>\n\n\n\n<p>The easiest way to start a new development in ChibiOS is to duplicate a previous project. So make sure to have an <a rel=\"noreferrer noopener\" href=\"https:\/\/playembedded.org\/how-to-import-a-project\/\" data-type=\"URL\" data-id=\"https:\/\/playembedded.org\/how-to-import-a-project\/\" target=\"_blank\">imported project<\/a> in your Project Explorer before proceeding. This guide will demonstrate how to duplicate a project.<\/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_Clean_the_project\"><strong>Clean the project<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Right click on the project and select&nbsp;<strong>Clean Project<\/strong><\/li>\n\n\n\n<li>Check the console when the cleaning task is completed<\/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=\"651\" height=\"499\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8245\" data-id=\"8245\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Cleaning-PE.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Cleaning-PE.png 651w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Cleaning-PE-300x230.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Cleaning-PE-150x115.png 150w\" sizes=\"(max-width: 651px) 100vw, 651px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Cleaning a Project in ChibiStudio<\/figcaption><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"762\" height=\"342\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8246\" data-id=\"8246\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Console-after-cleaning-PE.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Console-after-cleaning-PE.png 762w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Console-after-cleaning-PE-300x135.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Console-after-cleaning-PE-150x67.png 150w\" sizes=\"(max-width: 762px) 100vw, 762px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Clean task complete in the Console window<\/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_Duplicate_the_project\"><strong>Duplicate the project<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Right click on the project and select <strong>Copy <\/strong>(or CRTL+C)<\/li>\n\n\n\n<li>Right click in the Project Explorer and select <strong>Paste <\/strong>(or CRTL+V)<\/li>\n\n\n\n<li><strong>Name <\/strong>the new project or leave the default name<\/li>\n\n\n\n<li>Right click on the old project and select <strong>Close Project<\/strong><\/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=\"1616\" height=\"671\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8344\" data-id=\"8344\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Copy-and-paste-PE.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Copy-and-paste-PE.png 1616w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Copy-and-paste-PE-300x125.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Copy-and-paste-PE-1024x425.png 1024w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Copy-and-paste-PE-150x62.png 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Copy-and-paste-PE-1536x638.png 1536w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Copy-and-paste-PE-1200x498.png 1200w\" sizes=\"(max-width: 1616px) 100vw, 1616px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Copy and paste a project in ChibiStudio <\/figcaption><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"896\" height=\"544\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8252\" data-id=\"8252\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/3-Naming-a-project-PE.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/3-Naming-a-project-PE.png 896w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/3-Naming-a-project-PE-300x182.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/3-Naming-a-project-PE-150x91.png 150w\" sizes=\"(max-width: 896px) 100vw, 896px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Naming a project in ChibiStudio<\/figcaption><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"655\" height=\"622\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8345\" data-id=\"8345\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Close-project-PE.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Close-project-PE.png 655w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Close-project-PE-300x285.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Close-project-PE-150x142.png 150w\" sizes=\"(max-width: 655px) 100vw, 655px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Closing a project in ChibiStudio <\/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_Fix_the_Makefile\">Fix the Makefile<\/h3>\n\n\n\n<p>If the project you have duplicated was not located in the workspace folder you need to change a line in the Makefile otherwise the build procedure will fail. If you <a href=\"https:\/\/playembedded.org\/how-to-build-a-project\/\" data-type=\"post\" data-id=\"7372\">try to build<\/a> the project then you will get the error <strong>&ldquo;No rule to make target&rdquo;<\/strong> in the console log.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1012\" height=\"242\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Console-error-4.png\" alt=\"\" class=\"wp-image-8260\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Console-error-4.png 1012w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Console-error-4-300x72.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Console-error-4-150x36.png 150w\" sizes=\"auto, (max-width: 1012px) 100vw, 1012px\"><figcaption class=\"wp-element-caption\">Typical error caused by the wrong ChibiOS relative path<\/figcaption><\/figure>\n<\/div>\n\n\n<p>This issue is caused by the fact that the relative path of ChibiOS folder is different due to the relocation of the copied project. To fix the issue:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the <em>Makefile<\/em><\/li>\n\n\n\n<li>Change the relative path of <code>CHIBIOS<\/code><\/li>\n\n\n\n<li>Right click on the project and select <strong>Build<\/strong> (or click on the hammer button)<\/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=\"1024\" height=\"187\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8346\" data-id=\"8346\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Changing-makefile-PE-1024x187.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Changing-makefile-PE-1024x187.png 1024w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Changing-makefile-PE-300x55.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Changing-makefile-PE-150x27.png 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Changing-makefile-PE-1536x280.png 1536w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Changing-makefile-PE-1200x219.png 1200w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Changing-makefile-PE.png 2022w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Opening and modifying the makefile <\/figcaption><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"186\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-8348\" data-id=\"8348\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2023\/01\/Builing-a-project-PE-1-1024x186.png\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Builing-a-project-PE-1-1024x186.png 1024w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Builing-a-project-PE-1-300x55.png 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Builing-a-project-PE-1-150x27.png 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Builing-a-project-PE-1-1536x279.png 1536w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Builing-a-project-PE-1-2048x373.png 2048w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Builing-a-project-PE-1-1200x218.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"><figcaption class=\"wp-block-jetpack-slideshow_caption gallery-caption\">Building 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<p>After this fix is done the project will build successfully.<\/p>\n\n\n\n<h3 class=\"wp-block-heading level_2\" id=\"6_Example_for_fixing_the_Makefile\">Example for fixing the Makefile<\/h3>\n\n\n\n<p>Duplicate a project already available in ChibiStudio from the ChibiOS version folder (see <a href=\"https:\/\/playembedded.org\/how-to-import-a-project\/\" data-type=\"post\" data-id=\"7382\">How to import a project in ChibiStudio<\/a>).<br>For example, import and duplicate a project from chibios2111 folder (ChibiOS version 21.11.x).<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the Makefile<\/li>\n\n\n\n<li>Change the relative path of <code>CHIBIOS<\/code> to <code>..\/..\/chibios2111<\/code><\/li>\n\n\n\n<li>Right click on the project and select Build (or click on the hammer button)<\/li>\n<\/ol>\n\n\n\n<p>In example the path of the ChibiOS folder is <em>C:\\ChibiStudio\\chibios2111<\/em> while the path of the Makefile is <em>C:\\ChibiStudio\\workspace_user\\RT-STM32F469I-EVAL-SDP-CK1Z-NewPrj<\/em>. Consequently, the relative path of ChibiOS is <em>..\\..\\chibios2111<\/em> (where double dot refers to the parent folder).<\/p>\n\n\n\n<figure class=\"wp-block-jetpack-image-compare\"><div class=\"juxtapose\" data-mode=\"horizontal\"><img loading=\"lazy\" decoding=\"async\" id=\"8262\" src=\"https:\/\/i0.wp.com\/playembedded.org\/wp-content\/uploads\/2023\/01\/ChibiOS-path-wrong-PE.png?ssl=1\" alt=\"\" width=\"1938\" height=\"1007\" class=\"image-compare__image-before\"><img loading=\"lazy\" decoding=\"async\" id=\"8266\" src=\"https:\/\/i1.wp.com\/playembedded.org\/wp-content\/uploads\/2023\/01\/ChibiOS-path-right-PE-3.png?ssl=1\" alt=\"\" width=\"1938\" height=\"1007\" class=\"image-compare__image-after\"><\/div><figcaption>Fixing the Makefile when duplicating a default project<\/figcaption><\/figure>\n\n","protected":false},"excerpt":{"rendered":"<p>Introduction The easiest way to start a new development in ChibiOS is to duplicate a previous project. So make sure to have an imported project in your Project Explorer before proceeding. This guide will demonstrate how to duplicate a project. Step by Step Procedure Clean the project Duplicate the project Fix the Makefile If the [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":7622,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1270],"tags":[1302],"coauthors":[1273],"class_list":["post-7315","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-tos","tag-toolchain","green"],"views":2937,"jetpack_featured_media_url":"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2023\/01\/Duplicate-a-project-PE.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts\/7315","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\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/comments?post=7315"}],"version-history":[{"count":0,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts\/7315\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/media\/7622"}],"wp:attachment":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/media?parent=7315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/categories?post=7315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/tags?post=7315"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/coauthors?post=7315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}