Installing Atmel SAM-BA on Ubuntu 14.04 Playing with a SAMA5D3 XPLAINED board and want to setup the ATMEL SAM-BA tool so I can update the linux version. The following steps are taking from this pdf link and this link. Dows NT / 2000 / XP and Linux as well. FLIP User’s Manual. 2 xxxxE–8051–02/02. Windows Installation • Copy the Flip_.zip file to an empty temporary directory. One of them has been developed by ATMEL and must be connected to the PC RS232 port; the last one is.
Programming AVR is easy with Atmel Studio. But same time moving to an Eclipse IDE (Integrated Development Environment) could be logical step. Eclipse has several advantages over Atmel’s provided tools. Eclipse is free IDE and you will be able to work easier and with range of tools inside the same program. Eclipse IDE is very efficient and provides great features for code reuse along with advance functions such as refactoring and code analysis. You can use Eclipse to develop software for Arduino, AVR, and ARM.
These features make eclipse, programmers preferred choice to develop software for microcontrollers. In this tutorial we’ll going to setup Eclipse under Linux for AVR Microcontrollers. This is step-by-step instruction guide. This entire process tested with Ubuntu distribution of Linux. Procedure remains the same with other distributions of Linux and Mac PCs. Downloading and Installing Eclipse & Plug-Ins All we need is to install these two software’s:. Eclipse C/C CDT.
Extreme Burner Before we install Eclipse C/C CDT, on LINUX it is necessary to install the packages; however it’s not much different. We require following packages:. gcc-avr. binutils-avr. avr-libc (Standard AVR C Library).
avrdude (basic package that transfer you.hex file into MCU) We have to manually install these packages from terminal by running following command: Open Terminal – sudo apt-get install gcc-avr avr-libc binutils-avr avrdude After running command on terminal we would get installed all libraries and packages required for Eclipse to work under Ubuntu Linux. Next step is to install Eclipse C/C CDT and eXtreme burner (which load hex file to AVR microcontroller). Installation of Eclipse is quiet simple: Go to Ubuntu Software Center – search for Eclipse (Eclipse Integrated Development Environment) – Install Here at this point we have done with installing software components, now let’s configure Eclipse for AVR MCUs. Open Eclipse by: From main menu find Programming – hit on Eclipse to open application Once we open Eclipse then hit on, Help – Install New Software – Insert link to work with box – hit on Select All – click on Next – follow instructions until we get Finish button and hit on it. Update Plug-Ins Eclipse Let’s Make Fresh New Project: This is a step-by-step process to create fresh new project in Eclipse. After opening an Eclipse, make sure preferred location of your working directory i.e. Then hit on File – New – Project – C/C – C Project – then hit on Next – give project name BlinkTest, make sure Project Type and Toolchains has been chosen properly as shown in figure – hit on Next – Next – choose MCU Type in our case ATmega32 and MCU Frequency(Hz) 1000000 – Finish.
Create New Eclipse Project At this point we have successfully created new project called BlinkTest under Eclipse. Let’s add source file to write C code. File – New – Source Folder – name folder as Source (in this case) – hit on Finish Next step is to add C source file to project where your real task begins, Right click on Source – New – Source File – give it name, in our case its main.c – hit on Finish Create Source File Write Program Here we’ll find C source file been created in our project directory. Let’s write simple LED blink program and test on real hardware, copy following code snippet into main.c file, crayon-5c478feb1366/ Now we have almost done everything to successfully develop software for your ATMEL AVR device in Eclipse. To build your project, simply click on the hammer in the tool bar or press Ctrl-B or Command-B. Eclipse will the compile your project and generate the necessary firmware files.
In our project folder. We’ll find file named BlinkTest.hex file to program microcontroller. Please refer figure: Generate.hex File Under Eclipse Congratulation.!!! We have done with most of a part. Only thing left is to load this BlinkTest.hex file into microcontroller. Now we have to look at installation of eXtreme Burner.
Load HEX File into AVR MCU To get installed eXtreme burner on Ubuntu Linux, we need to download eXtreme Burner from, We’ll download xAVRUbuntu.tar.gz file. Just unpack this file on desktop:.
Open Terminal and Run Command. sudo su and then insert user password to enter into super user mode. Go to xAVR folder on your desktop (through terminal browse xAVR folder). type./avrprog on terminal and hit enter After entering this command on terminal Graphical User Interface will pop up on our screen. The interface is very easy to understand as like Windows. Please, take a reference of provided screenshots, Open eXtreme Burner under Ubuntu Linux eXtreme Burner GUI under Ubuntu Linux Finished! The rest is up to you.
Now you got everything to develop AVR programs with all the comfort Eclipse offers.
Here is a 'generic' step-by-step to getting an AVR development platform going on your computer using the free AVR toolchain (avr-gcc, avr-libc and avrdude) Pretty much every project uses this toolset so its a good way to get going. Every Linux/Unix distribution is slightly different. This particular example is for Ubuntu but should be easily adaptable to your OS. I use the photos from the old Mac OS X setup but dont let that confuse you. You can also, which does it all for you.
However, I havent tried it and your mileage may vary. This is a very generic tutorial which will work on any Unix type OS.
Its long and tedious and will get you the bleeding-edge development environment for advanced hackers. If you have a modern PC with, say, Ubuntu, you can probably get ready made packages for all this stuff! Check your distribution's package library for avr-gcc and avrdude! 99% of Unix distros have /usr/local/bin in the default $PATH. But if it isn't then you can use this technique to add it.
Open up a Terminal or xterm program, you'll be using this to do most of this stuff. In Ubuntu its under 'Applications' In the new Terminal window, type in echo $SHELL and press return If the output is /bin/bash then type the following command: echo 'PATH=$PATH:/usr/local/bin' /.bashprofile all on one line. Press return.
If the output is /bin/csh or /bin/tcsh then type the following command: echo 'set path = ($path /usr/local/bin)' /.cshrc all on one line. Press return. Close any Terminal windows and open up a new one. This makes sure the.bashprofile or.cshrc is reloaded.
Now type in echo $PATH (for bash) or echo $path (for t/csh) you should get something like the following: The important thing is that somewhere in the line of text you see /usr/local/bin. Download and install the developer tools You'll need the following packages: flex, byacc, bison, gcc, libusb and libusb-dev (for USB avr programmers) In Ubuntu, you can just use the package manager or use the command apt-get install flex byacc bison gcc libusb libusb-dev gcc is probably already installed, but just in case, get the latest version. Libusb may be in a 'universal' repository. If you're not using a usb programmer (such as a AVRISP mk ii or a usbtiny) then its ok if you dont have libusb installed. Otherwise you may have to modify your repository list to include the 'universal' repositories.
Check out your distro's documentation on how to do this. For some unfathomable reason, Ubuntu does not include essential headers for libc development so also apt-get install libc6-dev Step 2. Download & install binutils (an essential utility for the C compiler) Download the current release of binutils from: (you can also go For these examples, we'll be using binutils-2.17.tar.gz but you should use whatever is most recent. Save it into your home directory, not the desktop. Decompress the downloaded file and double click on it to decompress it (Ubuntu has a decompressor built in).
You should now have a folder called binutils-2.17 which you should drag into your Home directory (or Desktop) Open up a Terminal window and navigate to the binutils directory. Type: cd binutils-2.17 (or whatever you downloaded) then type in ls to verify everythings there Configure binutils for AVR. Type:./configure -target=avr -program-prefix='avr-' this will start a long process that will spit out a lot of text. Once its done, compile binutils. Type: make this will start an even longer compilation process Once that's done, install binutils. Type: sudo make install You will be prompted to enter your password.
Only administrators can install software thats why the password is necessary. Download & install gcc (the C compiler) First, download the current release of gcc from: currently thats gcc 4.2.0 (some people argue for the 3.4.x versions that seem to optimize the code to be smaller and faster. But really, whichever you want, just make it recent) Decompress the downloaded file and put the decompressed folder in your home directory.
Open up a new Terminal window in your home directory, type cd gcc-4.2.0 and then ls to verify its all in there. Next, c reate another directory to install gcc into. To go back into the home directory, then type: mkdir avrgcc-4.2 (substituting your gcc version for the 4.2) Navigate to the folder you created.
Type: cd avrgcc-4.2 (or whatever you named your folder) C onfigure gcc for AVR. Type:./gcc-4.2.0/configure -target=avr -enable-languages=c -disable-libssp (substituting the name of the folder you decompressed for the gcc-4.2.0).thanks to for the -disable-libssp ti p Once the configuration is done, compile gcc. Type: make CC='cc -no-cpp-precomp' Note: It seems like the -no-cpp-precomp may not be a good idea, if you are having problems maybe leave it off? This will take a long time so go have a sandwich When its done and you've washed your plate and silverware, install gcc. Type: sudo make install and enter your password when prompted Step 4. Download and install avr-libc (an essential C library for AVR chips) Download the current release of avr-libc from: Decompress the downloaded file and put the decompressed folder in your home directory In a new Terminal window, navigagte to the avr-libc directory. From your home directory type: cd avr-libc-1.4.6 (or whatever you downloaded) Configure avr-libc.
Type:./configure -host=avr Compile avr-libc. Type: make Install avr-libc. Type: sudo make install Step 5. Download and install avrdude (the software that loads programs from your machine onto the chips) Download the current release of avrdude from (v5.5 or higher): Uncompress the sources (this screenshot says 'usbtiny' but just ignore that) Make sure you have libusb and libusb-dev installed! Type in sudo apt-get install libusb libusb-dev Type in./configure Look for this in the output checking for usbgetstringsimple in -lusb. Yes if you don't see that (or it says no) check again, make sure libusb and libusb-dev are installed!
OK now type in make Next, its time to install, type in sudo make install For some unknown reason, to talk to the USB devices, you must be sudo'd. Here is me testing a USB programmer (usbtinyisp) with it attached to a attiny2313 target board. If you don't have a target attached you'll get Initialization failed: rc = -1 which means that the programmer is working but it could not find a chip to program!
Yay all the software is installed! Can't get it working?
Dont worry, help is available in!