Skip to content

windows installation

kgcooke edited this page Nov 2, 2014 · 12 revisions

#Installing on Windows This document details the requirements for getting all of the MoMo software installed on Windows. In general you should follow the instructions on Getting-Started, but there are a few windows specific things that need to be taken care of, which are listed here. We recommend running the MoMo support software using the bash command interpreter (called Git Bash) that comes with git for Windows. It's much better than Windows' built-in command line. All of the programs that come with MoMo should work either with Git Bash, the standard Windows command line or Cygwin. A known issue on Cygwin is that modtool cannot guess what USB port your MoMo is plugged into so you'll have to specify it. The easiest and in our opinion best option is Git Bash so we'll describe that here.

##Step 1 - Install Git Bash Download Git For Windows. Install it using the graphical installer. You should choose 'Check out using Windows line endings, commit using Unix' when prompted and unless you have a reason to choose otherwise, you should make the installed programs accessible only from Git Bash.

##Step 2 - Install and Configure Console2 (optional) If you don't want to use the pretty bad built-in windows cmd.exe program, a nice free alternative is Console2. You can download it from the website. It does not need to be installed, just copy it somewhere convenient and run it. To configure Console2 to use bash rather than the standard DOS prompt, click on Edit -> Settings and under Console type the following into Shell: (on 64 bit windows)

C:\Program Files (x86)\Git\bin\sh.exe --login -i

(on 32 bit windows)

C:\Program Files\Git\bin\sh.exe --login -i

If you have a nonstandard Windows installation you may have to modify the above link to point to your Git installation from Step 1. Don't forget to append --login -i to the command name. In the following steps, either open Console2 to type the commands or run Git Bash from the start menu.

##Step 2 - Clone the MoMo distribution (optional) If you haven't already installed the MoMo distribution from github, clone it into ~/Documents/momo by executing the following in your Git Bash terminal.

cd ~/Documents
git clone https://github.com/WellDone/MoMo-Firmware.git
mv MoMo-Firmware momo

##Step 3 - Install Python 2.7 and easy_install If you do not already have Python 2.7 on your computer, you'll need to install it. We recommend the latest 2.7 release (2.7.6 currently). Run the installer to install Python for all users. You will then need to download and install setuptools, which contains the easy_install script for automatically installing python packages. Download it to your Desktop from this link Simply double click the file on your desktop to install it. Make sure that you don't save it with an extra .txt extension. Now add python to your PATH:

export "PATH=\$PATH:/c/Python27:/c/Python27/Scripts" >> ~/.bashrc
source ~/.bashrc

Make sure you can access Python:

$ python --version
Python 2.7.6

If you can't access Python, make sure the above path is correct for your computer.

##Step 4 - Add MoMo tools to your path Open up the bash terminal that you just installed. Throughout this document we will assume that you have cloned the MoMo repository to '~/Documents/momo'. In all of the subsequent commands, replace this path with the location of your momo installation:

$ ls ~/Documents/momo
config  doc  momo_modules  pcb  README.md  tools

All of the tools that you will need to run are located in the tools/bin folder so lets add that to our $PATH:

echo "export PATH=\$PATH:${HOME}/Documents/momo/tools/bin" >> ~/.bashrc
source ~/.bashrc

Check to make sure that it worked by trying to run pcbtool:

$ pcbtool
Traceback (most recent call last):
  File "/opt/momo/tools/bin/pcbtool", line 12, in <module>
    import cmdln
ImportError: No module named cmdln

If you see an error like the above, everything's on track. If it says that pcbtool cannot be found, make sure you added the correct directory to your path. We still need to install all of the dependencies for MoMo's tools.

You should now have all of the windows specific things out of the way. Follow the instructions on Getting-Started to install the required python modules and check that everything works.

Clone this wiki locally