Tutorial 1 : Installation (AVR Mega series controllers) - sudeshmoreyos/Morey_os-demo-1.0 GitHub Wiki

Home 1 Next >>

In order to run our code, we need to follow three basic steps:

  1. Write our code following morey_os coding style
  2. Compile the code
  3. Program the controllers/boards

Step-1 will be covered in very detail in Tutorial-3. In this tutorial we will cover the installation process required for step-2 and step-3. This tutorial covers installation process for AVR Mega series Micro-controllers. Since Arduino Uno is based on atmega328p, same installation will work for Arduino Uno also. So our installation involves installing following utilities:

  1. Install Git Bash for windows
  2. Install GNU Make utility
  3. Download AVR GCC Toolchain
  4. Download AVRDUDE utility to program AVR controllers
  5. Updating the environment variables
  6. Cloning the Morey_os embedded operating system files to your computer system

Let us do it all step by step:

1. Git Bash Installation:

Download latest git bash for windows from here Git Bash. Follow the standard steps and complete the installation. Run it by searching in the windows search option. You should see such window when you run git bash:


2. GNU make Installation for windows:

Next step is to install GNU make utility. You can download make-3.81.exe version for windows from here GNU Make. PLEASE NOTE DO NOT DOWNLOAD SED-4.2.1-SETUP.EXE. Select the default installation location as shown below:

Follow the standard installation steps.

3. AVR toolchain Installation:

Next is to install AVR toolchain. You can download the latest toolchain for AVR 8-bit controllers from here: AVR toolchains. Extract the files. To avoid long folder name, rename the extracted folder to “avr8-gnu-toolchain”. Sometimes when you extract files, some extra folders are created inside which extracted content is copied. If extra folders are created, rename and copy only the innermost folder which contain the content as shown below :

Copy this “avr8-gnu-toolchain” folder to the location “C:\Program Files”.

4. AVRDUDE Installation:

We will download AVR-DUDE in this step. You can find the latest AVR-DUDE version for windows here : AVRDUDE . Typically the download file name should be avrdude-X.x-mingw32.zip where X.x should be the latest version. Download the latest version and extract it. To avoid longer folder names, we can rename extracted folder as “avrdude”. Sometimes when you extract files, some extra folders are created inside which extracted content is copied. If extra folders are created, rename and copy only the innermost folder which contain the content as shown below :

Copy this “avrdude” folder to the location “C:\Program Files”.

5. Update Environment Variables:

Now we need to update the environment variables in windows so that we can run make utility, AVR-toolchain utilities and avr-dude from GIT Bash. Follow the steps :

a. On the Windows taskbar, right-click the Windows icon and select System.

b. In the Settings window, under Related Settings, click Advanced system settings.

environment-2

c. On the Advanced tab, click Environment Variables.

d. Go to “Path” under User variables and click “edit”

e. Click new and add user variable for make utility as shown below:

f. Similarly, click new and add user variable for avr toolchain as shown below:

g. Again click new and add user variable for avrdude as shown below:

Press Ok and save the settings.

6. Check for successful Installation:

To check if you have done the installation of make utility, AVR toolchain and AVR Dude correctly you may check in git bash by typing:

a. Make utility : make -v

b. Avr toolchain: avr-gcc --version

c. Avrdude : avrdude

7. Clone Morey_os:

Finally you need to clone the Morey_os files on your system. This can be done by

a. downloading the zip files from here Morey_os Demo

b. running commands in git bash

Great! You are done with morey_os installation process. Now its time to try out your first example in morey_os. So lets proceed to Tutorial-2.

Home 1 Next >>