CVS and SVN are wonderful collaboration and version-tracking tools
If you were suggested to get firmware from CVS, you are lucky:
We use the released firmware version that can be simply downloaded from GenBoard/UnderDevelopment/FirmwareChanges (instead of CVS).
It is generated from SVN repository
Note that firmware is NOT maintained in CVS any longer but SVN ! Subversion (== SVN) is an improved version tracking system similar to CVS (user commands are mostly compatible with CVS). See SubVersionSvn and [SVN book].
Version tracking tools makes your life nicer if you:
- work on a set of files (sourcecode, webpage, CAD-files, etc...) on more than one computer
- work on a set of files with more than one people (collaboration)
- like the possibility to go back to earlier revisions (without manual hassle), or examine changes or make similar subtrees with some difference: called branches: same software/doc/whatever with small changes here and there (for whatever reason, eg. shipped to different customers, or deployed to different servers, etc... )
With the full power utilized, version tracking system can substitute
- file-share (file-share is only better for static files like videos, CD-archives, etc...). For changing, evolving content version tracking system makes your life much better and your work cleaner
- with some rules and helper scripts, version tracking system can be suitable for project-tracking/overview/management. While powerful tools (like ofbiz.org) are often better for complex scenarios, version tracking tools are million times better than simple file-shares (often used) in any case when files evolve
More about this in [Meta Wiki]
CVS head daily snapshot - not supported now, as it could confuse users. Only developers need the CVS anyway.
The .tar.gz or .tgz (which is the same compressed format just .tgz is a shorter filename extension) file can be unzipped by running
gzip -d <vems_fw_snapshot.tar.gz |tar xvf -
Alternatively winzip can also open tar.gz compressed files.
Sourceforge has a [CVS guide] Read it if you have problems.
Getting CVS client
In order to download the MS-AVR source files from sourceforge.net, you must have a CVS client (linux, win32, mac), you can install in 2 minutes. See
You can find a binary under 500kbyte here:
unzip the downloaded file and rename it to simply 'cvs.exe' if it has additional numbers in the filename.
Windows will sometimes hide the file extension. Verify that this feature is turned off.
move the cvs.exe file to your c:\windows folder or any other directory pointed to by the PATH
Read-only and read-write cvs access
There are two types of access to the Sourceforge repository depending on whether you are a user or a developer. Read-only access is for users and read-write access is for developers.
good to know when working with inferior systems
Skip this section if you work on an advanced OS, like Unix (eg. Linux).
From Windows, there are two different command line interpreters (shells) that can be used. One is the standard windows shell ( named either command or cmd depending on your version of Windows ) and the other is the sh shell that is in the AtMega/WinAvr? package(see AtMega/AvrGccFAQ). The first step is to create a directory ( folder in windows terminology ) to put the files in. To do this, start Windows Explorer, with C: selected do File->New->Folder and name the folder something appropriate, like MSAVR. Now double click on the folder to get into the empty folder. From Windows, open a command prompt (start menu/run/cmd)or (start menu/run/command). The command prompt should show the name of your new firmware folder. At this point you have two choices, some people have better results using one method or the other. You can either enter sh at the prompt and follow the instructions for sh ( export... ) or you can do nothing and follow the instructions for command or cmd ( set... ). Obviously, you must be on-line in order to download with cvs command. The set / export command needs no online access, they just adjust some environment variables in the given shell (window) that cvs will use later. If you go to another sh (or cmd) window, you'll have to issue the export (or set) commands again.
Avoid commiting files after moving between broken and proper systems. Win32 broken line endings might sneak into the CVS. It is not impossible to do right, but the easiest way is to checkout a different working directory instead of binary copying the files.
read-only cvs access under unix or sh shell on win32:
cvs co firmware
read-only cvs access - this should work on any system
cvs -d :pserver:email@example.com:/cvsroot/megasquirtavr co firmware
read-only cvs access from windows, cmd:
set CVSROOT=:pserver:firstname.lastname@example.org:/cvsroot/megasquirtavr <enter>
set HOME=c: <enter>
cvs login<enter> ( <enter> again for password, ignore any error messages )
cvs checkout firmware <enter>
For win32 users that find the above hard: a possibly faster way:
In the [files area] you will find the getfirm.zip file. This contains a .bat file that will set up a file directory and perform the set and cvs commands. It works well on Win98, but has not been tested on every version of windows. Try it, it may save you a lot of typing (typing? Copypaste works even in mswindows. For cmd it's clumsy - like most things on win32, but works: you need to paste from the menu hidden at upper left corner of cmd window.)
An sh shell is recommended even for windows for compiling the firmware (for cvs commands it does not matter). The cmd interpreter is severely broken in many ways (surprised??). Also make does not work well with cmd.
For read-write cvs access (only needed for developers) you must
- register on http://www.sourceforge.net/
- ask some of the core developers to add write-access for you
- generate a keypair with ssh-keygen or putty (without passphrase!!)
- not absolutely sure that this is needed, but it cannot hurt: ssh ONCE to cvs.sf.net with that account. (it'll punt you immediately) this creates your homedir for dropping ssh keys there.
- upload your public key to your sourceforge user-admin page (then wait 6 hours)
- export CVSROOT=:ext:email@example.com:/cvsroot/megasquirtavr
- make a plink_key.bat file somewhere in your PATH, that has: plink -i C:\path\ssh\RSH0304.PPK %1 %2 %3 %4 %5 %6 %7 %8 %9
- export CVS_RSH=plink_key.bat
- you need to store the public key of the remote sourceforge server as trusted. One way is to ssh interactively (eg. using putty on win32) to shell.sourceforge.net and answer yes for accepting and storing the key of the previously unknown host. Failing this, you'll get errors similar to: http://www.vems.hu/files/Gabor/cvsproblem.txt
The last 3 steps are somewhat different for ssh, very easy to find out.
Recent issue with cvs.sourceforge.net
- typical error message: "ssh_exchange_identification: Connection closed by remote host"
- The problem is [reported]. It's a load problem. Not ssh-key related at all.
CVS WRITE ACCESS PROBLEM
Thanks Marcell, for the previous help, it was useful. Now I have some problems with write access: http://www.vems.hu/files/Gabor/cvscommitproblem.txt OK, you are near the finish. I checked you definitely have "Allow access to CVS repository (developer access) " checked. Sprockets says there are CVS issues at sourceforge, and it's on "the site status page" (I couldn't find). Try again later.
What is the best way to make bin/binary.pl from HEAD show up in the STABLE1_0 branch ? Do I have to cvs add bin/binary.pl and commit to the -r STABLE1_0 directory, or a better way is recommended so they are stored on server more efficiently ?
wincvs and other CVS clients with GUI
- if you can use wincvs, you can use command-line cvs as well
- command-line cvs is smaller
- command-line cvs can be used from scripts
- I had problems with wincvs (:ext: access method) even after using commandline cvs without problems for years (wincvs could not connect via external plink program)
- if you happen to need help, someone can help you with commandline stuff with a few lines in email. For gui stuff the same costs 20 times (!!) more labor both on the helper and help-receiver side, and wastes a lot of bandwidth.
- gui is very good for 3D modelling, it's a very bad choice for cvs-client
- http://www.tortoisecvs.org/ is similar to wincvs, with some advantages.
- http://www.eclipse.org/ has a proven (GUI based) CVS client (plugin) that works very well. Overhead (disk + memory) is a bit prohibitive if you otherwise don't need JAVA environment.
TortoiseCVS? windows setup
After Tortoise is installed it is accessible in your 'right click' drop down menu for all folders on your system, so you would right click the folder you made for the MS-AVR files and select 'CVS checkout' to get started.
- Now your CVSROOT will be ':ext:firstname.lastname@example.org:/cvsroot/megasquirtavr' (without the quotes)
- Protocal ':ext:'
- Server 'cvs.sourceforge.net'
- Repository Directory '/cvsroot/megasquirtavr'
- Your username will be the same as used in the CVSROOT and the Module needs to be 'manual' to fetch list, after list is fetched it will be in your specified folder and a simple right click will give you the option to 'CVS update'.
Quick (well, not too quick) and dirty viewing
Only useful for viewing, for downloading it's not sane:
I think it's delayed somewhat, but it helps developers in moments when they cannot access CVS (stupid firewalls), when they know what was updated.