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

Home 1 Next >>

Developing application code in Morey_os involves three fundamental steps:

  1. Write the code in accordance with the Morey_os coding style
  2. Compile the code
  3. Program the controllers/boards

Step 1 will be explained in detail in Tutorial-3. In this tutorial, we will focus on the setup and installation required for Step 2 and Step 3. This tutorial specifically covers the installation process for AVR Mega series microcontrollers. Since the Arduino Uno is based on the ATmega328P, the same setup can be used for it as well.

The installation process involves setting up the following utilities:

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

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:

The next step is to install the AVR toolchain. You can download the latest toolchain for AVR 8-bit controllers from here: AVR toolchains. After downloading, extract the archive. To keep the directory structure simple and avoid long folder names, rename the extracted folder to "avr8-gnu-toolchain".

In some cases, extracting the archive may create additional nested folders, with the actual toolchain files located inside the innermost directory. If this happens, ensure that you rename and use only the innermost folder that directly contains the toolchain files, as illustrated below:

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

4. AVRDUDE Installation:

In this step, we will download AVRDUDE. You can find the latest version for Windows here: AVRDUDE. Typically, the downloaded file will have a name similar to avrdude-X.x-mingw32.zip, where X.x represents the latest version. Download this file and extract it.

To keep the directory structure simple and avoid long folder names, rename the extracted folder to "avrdude". In some cases, extracting the archive may create additional nested folders, with the actual contents located inside the innermost directory. If this happens, ensure that you rename and use only the innermost folder that directly contains the AVRDUDE files, as shown below:

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

AVRDUDE for Atmega4809 series (17-04-2026) : To program atmega4809 controller directly from Morey_os, we will need avrdude7 which is not officially launched as on today. Unofficial link for windows build is as follows:

https://www.avrfreaks.net/sfc/servlet.shepherd/document/download/0693l00000VJNlkAAH

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 AVRDude 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 repository on your system. This can be done by

a. Downloading the zip files from here Morey_os Demo

or

b. Running commands in git bash

  • Select C drive as current directory:
cd /c
  • Clone Morey_os :
git clone --recursive https://github.com/sudeshmoreyos/Morey_os-demo-1.0

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 >>