{"id":4351,"date":"2016-11-13T17:05:52","date_gmt":"2016-11-13T16:05:52","guid":{"rendered":"https:\/\/playembedded.org\/?p=4351"},"modified":"2017-04-12T23:01:06","modified_gmt":"2017-04-12T21:01:06","slug":"development-version-chibios","status":"publish","type":"post","link":"https:\/\/playembedded.org\/blog\/development-version-chibios\/","title":{"rendered":"How to switch to the development version of ChibiOS"},"content":{"rendered":"<h3 id=\"1_Trunk_\" class=\"level_1\">Trunk!<\/h3>\n<p>First time I started to deal with a software a little bit more complicated than the one used to print &ldquo;Hello World&rdquo;, I have encountered some words like &ldquo;versioning&rdquo;, &ldquo;revision&rdquo;, &ldquo;diff&rdquo;, &ldquo;branch&rdquo;, &ldquo;trunk&rdquo;, &ldquo;checkout&rdquo; and I heard about certain software like &ldquo;svn&rdquo;, &ldquo;git&rdquo;, &ldquo;mercurial&rdquo;.<\/p>\n<p>Do you keep in mind when your friends knows something you don&rsquo;t know and they continuously talk about that making you feel like a complete dumbass? Well that was my feeling! It is much simpler than how it seems: there are certain programs which purpose is to keep trace of every single&nbsp;character edited&nbsp;in your code. They are&nbsp;named&nbsp;version control software (as example&nbsp;<strong>git&nbsp;<\/strong>or&nbsp;<strong>subversion <\/strong>also know as<strong>&nbsp;svn<\/strong>).&nbsp;ChibiOS is versioned through subversion even if the <a href=\"https:\/\/sourceforge.net\/p\/chibios\/svn\/HEAD\/tree\/\" target=\"_blank\">svn repository<\/a> is also unofficially mirrored (in read only) to a <a href=\"https:\/\/github.com\/ChibiOS\">git repository<\/a>.<\/p>\n<p>I will summarise subversion&nbsp;in few lines&nbsp;in order to at least give an idea of what you&rsquo;re going to do. With subversion&nbsp;code is saved on a remote repository identified by an URL. The operation of creating a local copy of the whole repository is usually known as <strong>checkout <\/strong>while updating that copy is known as<strong> update<\/strong>. The developer which has also read permission of the repository can save code through the <b>commit<\/b>&nbsp;operation: each commit is like a &ldquo;snapshot&rdquo;&nbsp;of the versioned folder&nbsp;(files, hierarchy, content) and this snapshot, known as <strong>revision<\/strong>,<strong>&nbsp;<\/strong>is saved on the remote repository. In subversion, revisions are identified by a progressive number (as example r9901).<!--more--><\/p>\n<p>Versioning produce enormous advantages: as example if with the latest commit developer has introduced catastrophic mistakes he&nbsp;would be able to <strong>revert<\/strong> to an older revision of the project at any time, or if at a certain moment he&nbsp;would&nbsp;create a copy of the whole repository to do some test code or to develop an&nbsp;uncertain feature he could <strong>branch<\/strong> the main&nbsp;<strong>trunk <\/strong>(you should imagine the repository like a growing tree). A branch could be eventually <strong>merged<\/strong> with another one or with the trunk. The word <strong>trunk <\/strong>usually&nbsp;refers to the main development branch of the whole repository.<\/p>\n<p>Concluding, subversion&nbsp;is a command line executable but there are also programs which extend it&nbsp;by adding a GUI like Tortoise SVN.<\/p>\n<h3 id=\"2_Updating_trunk\" class=\"level_1\">Updating trunk<\/h3>\n<figure id=\"attachment_4362\" aria-describedby=\"caption-attachment-4362\" style=\"width: 165px\" class=\"wp-caption alignright\"><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/11\/svn.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-4362\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/11\/svn.jpg\" alt=\"Svn context menu\" width=\"165\" height=\"108\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/11\/svn.jpg 282w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/11\/svn-150x98.jpg 150w\" sizes=\"auto, (max-width: 165px) 100vw, 165px\"><\/a><figcaption id=\"caption-attachment-4362\" class=\"wp-caption-text\">New svn related voices in context menu<\/figcaption><\/figure>\n<p>In what follow, we are going to install Tortoise SVN, we will checkout to the latest revision of ChibiOS trunk, we will switch the ChibiStudio workspace in order to work with the most recent development version of ChibiOS.<\/p>\n<p>First step is download and install <a href=\"https:\/\/tortoisesvn.net\/\" target=\"_blank\">Tortoise SVN<\/a>&nbsp;choosing the latest version for your OS. Once you have installed it you will see new voices in the window context menu (see Fig.1). Now we can proceed to update trunk right clicking on the folder <em>C:\/ChibiStudio\/chibios_trunk<\/em> and choosing <strong>SVN Checkout<\/strong>.<\/p>\n<figure id=\"attachment_4360\" aria-describedby=\"caption-attachment-4360\" style=\"width: 187px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/11\/Chechout.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-4360\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/11\/Chechout.jpg\" alt=\"Chechout\" width=\"187\" height=\"155\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/11\/Chechout.jpg 465w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/11\/Chechout-150x124.jpg 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/11\/Chechout-300x248.jpg 300w\" sizes=\"auto, (max-width: 187px) 100vw, 187px\"><\/a><figcaption id=\"caption-attachment-4360\" class=\"wp-caption-text\">Starting the checkout<\/figcaption><\/figure>\n<p>On the newly open window (see Fig.2) we have to ensure that URL of repository is <em>http:\/\/svn.code.sf.net\/p\/chibios\/svn\/trunk<\/em> and Checkout directory is <em>C:\/Chibistudio\/chibios_trunk<\/em>.<\/p>\n<p>We need also to check &ldquo;HEAD revision&rdquo; if you want to update our copy to the latest available repository. We need also to un-check &ldquo;omit externals&rdquo; if we want also update the community folder.<\/p>\n<p>Note that the URL&nbsp;of repository has been copied by the the ChibiOS main repository which is currently on <a href=\"https:\/\/sourceforge.net\/p\/chibios\/svn\/HEAD\/tree\/\">sourceforge<\/a>&nbsp;(see Fig.3).<\/p>\n<p>Once the procedure as terminated our source code will be updated to the latest <strong>revision<\/strong>. Note that we can update again our folder right-clicking on it and choosing <strong>SVN Update<\/strong>.<\/p>\n<figure id=\"attachment_4361\" aria-describedby=\"caption-attachment-4361\" style=\"width: 1050px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/11\/Repository.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4361\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/11\/Repository.jpg\" alt=\"ChibiOS repository\" width=\"1050\" height=\"568\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/11\/Repository.jpg 1050w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/11\/Repository-150x81.jpg 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/11\/Repository-300x162.jpg 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/11\/Repository-1024x554.jpg 1024w\" sizes=\"auto, (max-width: 1050px) 100vw, 1050px\"><\/a><figcaption id=\"caption-attachment-4361\" class=\"wp-caption-text\">A screenshot of the ChibiOS repository<\/figcaption><\/figure>\n<h3 id=\"3_Switching_workspace\" class=\"level_1\">Switching workspace<\/h3>\n<figure id=\"attachment_4363\" aria-describedby=\"caption-attachment-4363\" style=\"width: 274px\" class=\"wp-caption alignright\"><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/11\/Switch-workspace.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-4363\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/11\/Switch-workspace.jpg\" alt=\"Switching workspace\" width=\"274\" height=\"257\"><\/a><figcaption id=\"caption-attachment-4363\" class=\"wp-caption-text\">Switching to workspace_trunk<\/figcaption><\/figure>\n<p>ChibiStudio has a workspace for each version of ChibiOS currently supported. We can switch workspace from the menu <em>file-&gt;switch workspace<\/em>. We should choose <em>workspace_trunk<\/em>. If you cannot find this voice just choose other and browse the folder of <em>workspace_trunk<\/em> which is located at <em>C:\/ChibiStudio\/workspace_trunk<\/em>. Eclipse will automatically restart with the projects of chibios_trunk.<\/p>\n<p>Note that certain imported project could be out of sync after the update. In that case a good idea is to delete all the projects from the workspace deselecting &ldquo;Delete project contents on disk&rdquo; and re-import them. The project to re-import usually are under<\/p>\n<ul>\n<li>C:\/ChibiStudio\/chibios_trunk\/demos<\/li>\n<li>C:\/ChibiStudio\/chibios_trunk\/testhal<\/li>\n<\/ul>\n<p>and eventually<\/p>\n<ul>\n<li>C:\/ChibiStudio\/chibios_trunk\/testex<\/li>\n<\/ul>\n\n","protected":false},"excerpt":{"rendered":"<p>Trunk! First time I started to deal with a software a little bit more complicated than the one used to print &ldquo;Hello World&rdquo;, I have encountered some words like &ldquo;versioning&rdquo;, &ldquo;revision&rdquo;, &ldquo;diff&rdquo;, &ldquo;branch&rdquo;, &ldquo;trunk&rdquo;, &ldquo;checkout&rdquo; and I heard about certain software like &ldquo;svn&rdquo;, &ldquo;git&rdquo;, &ldquo;mercurial&rdquo;. Do you keep in mind when your friends knows something [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":4364,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1221],"tags":[],"coauthors":[241],"class_list":["post-4351","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-further-readings","pumpkin"],"views":6355,"jetpack_featured_media_url":"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/11\/Chibios-update.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts\/4351","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/comments?post=4351"}],"version-history":[{"count":0,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts\/4351\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/media\/4364"}],"wp:attachment":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/media?parent=4351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/categories?post=4351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/tags?post=4351"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/coauthors?post=4351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}