How to switch to the development version of ChibiOS
First time I started to deal with a software a little bit more complicated than the one used to print “Hello World”, I have encountered some words like “versioning”, “revision”, “diff”, “branch”, “trunk”, “checkout” and I heard about certain software like “svn”, “git”, “mercurial”.
Do you keep in mind when your friends knows something you don’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 character edited in your code. They are named version control software (as example git or subversion also know as svn). ChibiOS is versioned through subversion even if the svn repository is also unofficially mirrored (in read only) to a git repository.
I will summarise subversion in few lines in order to at least give an idea of what you’re going to do. With subversion 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 checkout while updating that copy is known as update. The developer which has also read permission of the repository can save code through the commit operation: each commit is like a “snapshot” of the versioned folder (files, hierarchy, content) and this snapshot, known as revision, is saved on the remote repository. In subversion, revisions are identified by a progressive number (as example r9901).
Versioning produce enormous advantages: as example if with the latest commit developer has introduced catastrophic mistakes he would be able to revert to an older revision of the project at any time, or if at a certain moment he would create a copy of the whole repository to do some test code or to develop an uncertain feature he could branch the main trunk (you should imagine the repository like a growing tree). A branch could be eventually merged with another one or with the trunk. The word trunk usually refers to the main development branch of the whole repository.
Concluding, subversion is a command line executable but there are also programs which extend it by adding a GUI like Tortoise SVN.
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.
First step is download and install Tortoise SVN 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 C:/ChibiStudio/chibios_trunk and choosing SVN Checkout.
On the newly open window (see Fig.2) we have to ensure that URL of repository is http://svn.code.sf.net/p/chibios/svn/trunk and Checkout directory is C:/Chibistudio/chibios_trunk.
We need also to check “HEAD revision” if you want to update our copy to the latest available repository. We need also to un-check “omit externals” if we want also update the community folder.
Note that the URL of repository has been copied by the the ChibiOS main repository which is currently on sourceforge (see Fig.3).
Once the procedure as terminated our source code will be updated to the latest revision. Note that we can update again our folder right-clicking on it and choosing SVN Update.
ChibiStudio has a workspace for each version of ChibiOS currently supported. We can switch workspace from the menu file->switch workspace. We should choose workspace_trunk. If you cannot find this voice just choose other and browse the folder of workspace_trunk which is located at C:/ChibiStudio/workspace_trunk. Eclipse will automatically restart with the projects of chibios_trunk.
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 “Delete project contents on disk” and re-import them. The project to re-import usually are under