Tuesday, November 5, 2013

e-Gizmo AVR32 GCC IDE:Bootloading &Programming

AVR32 Module e-Gizmo


Hello Dabarkads;maybe a week ago or so that our familiar local geek's store (e-Gizmo) had cooked another gadget for us -a considerable cheap,powerful and fast MCU which has a promising wide applications.This is an AVR32 (AT32UC3L0128) with 50MHZ clock,SPI,I2C,128KB(Flash) and more  in  a sort dongle type of modular package .So let's  again give some important tips & tricks of creating  a gcc IDE using an  Eclipse development environment. This post in my blog details the steps used to get gcc running in our own workspace.  Unfortunately, setting up Eclipse as an environment to develop gcc is non-tasky. To tell you folks, having a GUI to some CLI based compilers such as SDCC,GCC/G++ (Unix) ,C/C++ is not any more a problem or hinder to simulate our code instead of a console interface. In this scratch article ,running the source program  in  an Atmel  variants and other brand of MCUs could be made  possible   using    eclipse IDE as a slight editor.We will discuss here the customization of  an Eclipse  C/C++ environment as a requirements of compiling source code fitted  in our AVR32 board. An Eclipse editor needs an  installed Atmel GNU tool chain: avrdude,avr32-gcc,avr-gcc and other required libraries to run/compile  code in AVR32.

There are miscellaneous software programmer for  AVR32 module:(1) Flexible In-system Programmer version  III or FLIP3 (flip.3.x.xx.tar.gz)    bundled with batchISP as tool to program parts containing an embedded Atmel ISP. This software has a version for both Linux and Windows OS See this article for further  technical details: (1) http://datasheet.octopart.com/ATEVK1101-Atmel-datasheet-166485.pdf.(2)http://www.atmel.com/Imag /avr32studio_release_notea_2.6.0.pdf‎. 

While in Linux ,(2) we can use DFU programmer as a replacement for FLIP3 in windows as well. It is a command line tool for for the flash memory on Atmel AVRs:AVR , AVR32 and 8051  based micro controllers which ship with a USB boot loader. Though DFU programmer is a command line tool it is very easy to install and use.Here is some further infos about DFU: (1) http://linux.die.net/man/1/dfu-programmer  (2)http://www.technoburst.net/2013/04/atmel-dfu-programmer-tutorial-for-linux.html

Hence ,we only need  an AVR32 module  connected to our PC via  USB-Serial  interface-that's all our simple development for now.

All these utilities  are free to download and can be run in Linux.

The author would like to acknowledge Sir Henry of e-Gizmo store for the samples of AVR32 module.Thank you very much Sir Henry & e-Gizmo staffs pinoy geeks owe alot of priceless stuffs from your company-Mabuhay! Kudos! Aja!

1) To create gcc IDE for AVR32  by using C/C++ Eclipse editor 
2) To learn how-to program (compile,flash,fuse,boot-load)  in an ATmel  AVR32
3) To explore the potential use of AVR32 for variety of embedded applications


USB to Serial converter
e-Gizmo AVR32 module (http://www.e-gizmo.com/KIT/AVR32.html)

Linux OS : Ubunto /Fedora 1X

AVR32  plugin  (UC32XX,AVR32 GNU tool chain,batchISP and more)

AVR32 GNU Tool chain (32/64 bit Linux)
JAVA SDK Environment -installable in Linux Shell




Miscellaneous Documents

1) Install avr-gcc compiler and other libraries
root@localhost# yum install  gcc-avr avr-libc avrdude

2)Installing DFU programmer
root@localhost# yum install dfu-programmer

3) Install Java SDK
root@localhost# sudo apt-get install openjdk*

4) Download and install the Eclipse editor
root@localhost#  sudo apt-get  install eclipse-platform eclipse-jdt eclipse-cdt

5) Download and install AVR32 plugin
Click "Window" -> "Install Software" ->

6) Configure AVR32 (AT)  setting in the GCC-IDE

7) Create a simple circuit  configuration for the AVR32 module

8) Compile and run the program

9) Load the code in the AVR32 board

10) Test the expected output of the code in the AVR32 circuit  


Detail(1) AVR32 GNU tool chain

Detail(2)Launching Eclipse editor

Detail(3) Eclipse Platform

Detail(4)AVR32 Plugin to Eclipse

Detail(5)AV32 Utilities and Tool chain

Detail(6)  Installing AVR32  plugin (Utilities & Tools)

Detail(7) Restart to update Eclipse editor

Detail(8) AVR32 Software Licenses


Detail(9) Installed AVR32 utilities and tool chain

Detail(10) AVR32 Tool chain setting

Detail(11) Selecting a workspace

Detail(12) Device Selection

Detail(13)AVRdude configuration

Detail(14) Create a C/C++ source file

Detail(15)  simple GCC-IDE (Non-Trivial)

Detail(16)AVR32 GCC IDE with sample code...

..to be continued

Software programmer options : FLIP3 or DFU (Linux)

Just KISS (..keeping it simple and stupid)