Using SAM-BA for Linux on SAMA5D3 Xplained

TRAINING MANUAL

Using SAM-BA for Linux on SAMA5D3 Xplained AN-8995

Prerequisites ? Hardware Prerequisites ? Atmel? SAMA5D3 Xplained ? USB serial TTL adapter (optional) ? FTDI TTL-232R-3V3 USB to TTL serial cable ? Software Prerequisites ? Linux? Ubuntu? 12.04 LTS ? Estimated completion time: 15min

Introduction

The goal of this hands-on is to:

? Get Started on SAM-BA? for Linux, the Atmel In System Programming tool for

Atmel ARM?-based MPUs

? Use SAM-BA Graphical UI to connect to the SAMA5D3 Xplained board ? Use SAM-BA Command Line mode to program a SAMA5D3 Linux demo

42328A-06/2014

Table of Contents Prerequisites .....................................................................................1 Introduction .......................................................................................1 Icon Key Identifiers ...........................................................................3 1. Introduction to SAM-BA..............................................................4 2. Setup..........................................................................................5 3. Assignment 1: Install SAM-BA on Ubuntu 12.04 LTS ................6 4. Assignment 2: Connect SAM-BA GUI to SAMA5D3 Xplained ...7

4.1 Understand SAM-BA GUI Main Window .............................................7 4.2 Connect to the Board ........................................................................... 8

5. Assignment 3: Use SAM-BA in Command Line Mode to Program a Demo......................................................................11

6. Conclusion ...............................................................................17 7. Revision History .......................................................................18

AN-8995 ? Using SAM-BA for Linux on SAMA5D3 Xplained: 42328A-06/2014 Page 2 of 19

Icon Key Identifiers

Delivers contextual information about a specific topic. Highlights useful tips and techniques. Highlights objectives to be completed. Highlights the expected result of an assignment step. Indicates important information. Highlights actions to be executed out of the target when necessary.

AN-8995 ? Using SAM-BA for Linux on SAMA5D3 Xplained: 42328A-06/2014 Page 3 of 19

1. Introduction to SAM-BA

The SAM-BA GUI tool provides a means of easily programming various Atmel ARM processor-based microcontrollers. SAM-BA GUI Key Features:

? Performs in-system programming through JTAG, RS232 or USB interfaces ? On-device and on-board memories programming solutions

? May be used via a Graphical User Interface or started in batch mode from a command line ? Memories and peripherals display content ? User scripts executable from SAM-BA GUI or a shell ? Runs under Windows? or Linux OS

SAM-BA for Linux supports only the USB interface. SAM-BA and its patches are available from Atmel web site at the following address: . SAM-BA has been validated on different Linux distributions such as Ubuntu, Debian?, Fedora?, openSUSE? but it will certainly work on other distributions as well. Tested distributions are referenced on Linux4SAM web site, which is the main starting point for Linux OS on the Atmel ARM-based MPUs, at the following link: . Ubuntu 12.04 LTS will be used as the Linux distribution reference for the next assignments.

AN-8995 ? Using SAM-BA for Linux on SAMA5D3 Xplained: 42328A-06/2014 Page 4 of 19

2. Setup

With Ubuntu distributions, a user has to be member of the dialout group to access serial devices like RS232 serial port, USB serial, serial modem, etc. As SAM-BA uses the USB serial class driver to connect to the SAMA5D3 Xplained board, it is important to enable serial devices access to the Ubuntu user.

Enable access to serial devices.

? Add current "user" to dialout group:

# cd ~ # sudo adduser at91sam dialout # cat /etc/group | grep dialout dialout:x:20:at91sam

? Log out from Ubuntu and log in again to make the changes effective and access the serial port

Logging out from Ubuntu is mandatory to have the user added to the dialout group. Current user has now access to serial devices including the USB serial port.

AN-8995 ? Using SAM-BA for Linux on SAMA5D3 Xplained: 42328A-06/2014 Page 5 of 19

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download