GenBoard/FirmWare/CVSUsage (2006-03-16 04:43:08)

CVS is a wonderful collaboration and version-tracking tool, you can benefit a lot from learning how to use it, it's not that complicated.

Note that the most current version (called the CVS head) is not for driving unless you know what you are doing. We use the released version from GenBoard/UnderDevelopment/FirmwareChanges so only get the CVS version if you want to test it on table.


CVS head daily snapshot - not supported now, as it could confuse users. Only developers need the CVS anyway.

http://megasquirtavr.sourceforge.net/vems_fw_snapshot.tar.gz

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 -

in the directory you downloaded. The AtMega/WinAvr package (see AtMega/AvrGccFAQ) contains gzip and tar commands.

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

http://www.cvshome.org/

You can find a binary under 500kbyte here:

http://ccvs.cvshome.org/servlets/ProjectDownloadList

alternatively :

http://www.collab.net/developers/tools/

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:

export CVSROOT=:pserver:anonymous@cvs.sourceforge.net:/cvsroot/megasquirtavr

cvs login

cvs co firmware


read-only cvs access - this should work on any system

cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/megasquirtavr login

cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/megasquirtavr co firmware


read-only cvs access from windows, cmd:

set CVSROOT=:pserver:anonymous@cvs.sourceforge.net:/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

The last 3 steps are somewhat different for ssh, very easy to find out.

Recent issue with cvs.sourceforge.net

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


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.


Quick (well, not too quick) and dirty viewing

Only useful for viewing, for downloading it's not sane:

http://cvs.sourceforge.net/viewcvs.py/megasquirtavr/firmware/

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.


'See also