Table of Contents (Continued) Section 1 Introduction......................... 1-1 General ..........................1-1 Requirements........................1-1 Section 2 Quick-start guide (short version) ................2-1 Install Hardware and software ................... 2-1 Create a demonstration project ..................2-1 Configure target MCU for a debug session using trace ............. 2-1 Start the debug session and configure AVR32 Studio 2.5 for trace........
Page 3
Table of Contents (Continued) 6.5.1 Add start and stop trace-points................6-19 Start the trace debug session ..................6-23 Modify the code and restart the debug session ............... 6-26 Section 7 Firmware Upgrade...................... 7-1 Firmware upgrade overview....................7-1 Firmware version test and upgrade ................... 7-1 Adapter in use........................
AVR32 Studio. In addition to the AVR ONE! debugger, you need the following items: – AVR32 Studio 2.5 software – AVR32 GNU Toolchain 2.4 – EVK110x Evaluation board Software and documents can be found at www.atmel.com/avrone Requirements ® ®...
Section 2 Quick-start guide (short version) Install Hardware and software Install the MICTOR38 connector on the EVK1100 board. Download and install avr32-gnu-toolchain-2.4.x and AVR32Studio-2.5.x. Connect AVR ONE! to power and USB and turn it on. Install AVR ONE! USB driver. Connect AVR ONE! to the EVK1100 using the MICTOR38 connector.
Quick-start guide (short version) Select Debugger tab and tick Stop on startup at: main. Start the debug session and configure AVR32 Studio 2.5 for trace Click the Debug-button. Now the program will be loaded into the target, and run until main(). When the program halts, add at least a trace start-point (Right-click to the left of the source code line in the source code view).
The AVR ONE! Kit contains one MICTOR38 connector for this purpose. If you need more connectors for other kits, or your own designs, you can buy more connectors from Atmel, or Tyco Electronics/AMP. The Tyco Electronics/AMP Part number is 2-5767004-2.
Page 8
Hardware preparation Unpack the Mictor38 connector and remove the pick-and-place pad Figure 3-2. Remove the pick-and-place pad Place the connector onto the footprint on the evaluation board. Make sure that the guide tab beneath the connector fits into the guide hole in the PCB. Add a fair amount of flux.
Page 9
Hardware preparation Make sure that the connector is firmly seated on the footprint, and start by soldering the corners. Figure 3-4. Soldering the corners When all corners are soldered, check that connector is still firmly seated. It is still possible to push the connector down and re-heat corner pins if you need to adjust a bit.
Page 10
Hardware preparation Solder the remaining pins. Figure 3-6. Continuing with the remaining pins After soldering, you should make sure that there are no shorts circuits between pins. Figure 3-7. All pins finished AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Page 11
Hardware preparation Turn the board and apply flux on the ground pins. Figure 3-8. Apply flux on ground pins Solder the five ground pins. Figure 3-9. Solder ground pins AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Section 4 Software Installation Download the software To use the AVR ONE!, you must download and install two software packages: avr32-gnu-toolchain-2.4.x.exe AVR32Studio-2.5.x.exe The AVR32 Toolchain is a collection of tools that are required to be able to work with the AVR ONE! It contains command-line tools for controlling the AVR ONE!, and tools to compile code for the AVR32 MCUs.
Software Installation Download the two installation files to your disk. The installation files can be found at this location: www.atmel.com/avrone Install AVR32 GNU Toolchain If you have any AVR tools connected to the USB hub, turn them off now. Otherwise the USB driver installation may fail.
Page 14
Software Installation Figure 4-3. AVR32 GNU Toolchain License Agreement form Select I accept the terms of the licence agreement, then click Next. Figure 4-4. AVR32 GNU Toolchain installation folder select Check that the installation folder is correct and click Next. AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Page 15
Software Installation Figure 4-5. AVR32 GNU Toolchain installer configuration finished Click Install. Figure 4-6. AVR32 GNU Toolchain installation progress indicator The AVR32 GNU Toolchain is now being installed. As a part of the installation process, USB drivers for all supported programming and debugging adapters are installed. AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Page 17
Software Installation Figure 4-9. USB Drivers licence agreement form Select I accept the terms of the licence agreement, then click Next. Figure 4-10. USB drivers installer configuration finished Click Install. AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Software Installation Figure 4-13. AVR32 GNU Toolchain installation complete Click Finish to complete the AVR32 Toolchain installation process. Install AVR32 Studio 2.5 Double-click on the AVR32Studio-2.5.x.exe file to start the installation process. Figure 4-14. AVR32 Studio 2.5 installer welcome Click Next. AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Page 20
Software Installation Figure 4-15. AVR32 Studio installation folder select Check that the installation folder is correct and click Next. Figure 4-16. AVR32 Studio installer configuration finished Click Install to start the installation. AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Page 21
Software Installation Figure 4-17. AVR32 Studio installation progress indicator Wait for the installation process to complete. If a suitable Java™ runtime is not installed, a Java installer wizard will guide you through the installation procedure. Figure 4-18. AVR32 Studio installation process complete Tick Create shortcut on desktop if you want a shortcut to be created.
Software Installation Connect the AVR ONE! to power and USB host Connect the AVR ONE! to power using the supplied power supply. Connect the AVR ONE! to the USB host (PC) using the supplied USB cable Turn on the AVR ONE! using the power switch next to the power connector Figure 4-19.
AVR ONE! is connected to the PC, even if the driver is the same as for all other AVR ONE!s that have been connected previously. This is a property of the operating system, and is not controlled by any Atmel software installed.
Page 24
Software Installation Figure 4-22. Hardware installation wizard configuration Select Install the software automatically and click Next. Figure 4-23. Hardware installation in progress Wait for the installation process to complete. AVR ONE! Quick-start Guide 4-13 32103C–AVR ONE!–02/10...
Section 5 Connect the AVR ONE! to the EVK1100 Connect the AVR ONE! debugger to the EVK1100 evaluation board using the MICTOR38 connector. Figure 5-1. AVR ONE! connected to the EVK1100 AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Connect the EVK1100 to power Connect the EVK1100 to power and turn it on. The easiest way to provide power is to use the supplied USB cable. Switch it on by setting the power switch to USB. Figure 5-2. Powering the EVK1100 using the USB cable AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Section 6 Create demo application Start AVR32 Studio Start AVR32 Studio. Start-up may take a while (because of all the Java libraries being loaded). Figure 6-1. AVR32 Studio splash screen Figure 6-2. AVR32 Studio workspace selection Select a suitable workspace folder for your project files. If you want to use the same folder for your work- space every time you start AVR32 Studio, you should tick the box before clicking OK.
Create demo application Figure 6-3. AVR32 Studio Welcome view Exit from the welcome screen to the workbench by clicking on the Close Page icon (Arrow). Configure adapter and target Before you can use the AVR ONE! and the EVK1100, you have to tell AVR32 Studio what type of equip- ment is connected to your PC.
Create demo application 6.2.1 Add and configure the adapter (AVR ONE!) Figure 6-4. Scan Targets Right-click in the AVR32 Target-view and select Scan Targets. Figure 6-5. Available targets Select the AVR ONE! Figure 6-6. AVR ONE! Selected AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Page 31
Create demo application Figure 6-7. Selecting the properties view Click on the Properties tab. Figure 6-8. Properties view If you have several adapters connected at the same time, this is the place where you can give them unique names. Just type the name you want to use in the Name field. AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Create demo application 6.2.2 Configure target board and MCU Select the Details tab. Figure 6-9. Setting the board and device type Set MCU to UC3A0512 or UC3A0512ES, depending on what MCU is installed on your EVK1100. Figure 6-10. MCU Markings To check which type of MCU is mounted on your EVK1100 evaluation board, you can read the part num- ber printed on the MCU.
Page 33
Create demo application Set MCU Clock source to Crystal. Adjust the JTAG Clock to a suitable value (Usually 33MHz or less. Max speed depends on target board signal quality). Click Apply. The target and adapter configuration process is now complete. AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Create demo application 6.2.3 Target MCU Chip erase If the EVK1100 evaluation board is brand new, or if it still contains the original demo application (Control Panel Demo), the FLASH lock-bits need to be cleared. Right-click on the AVR ONE! In the AVR32 Tar- get view and select Chip Erase.
Create demo application Create a demonstration project Figure 6-12. Create new project Create a new project by clicking File>New>AVR32 Example Project. Figure 6-13. Select project example Select EVK1100 – Components - DIP204 example, then Next AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Page 36
Create demo application Figure 6-14. New project name Enter a name for the project, and click Finish. AVR ONE! Quick-start Guide 32103C–AVR ONE!–02/10...
Page 37
Create demo application Figure 6-15. Build project Right-click on the project in Project Explorer-view and select Build Project (or press CTRL+B). Figure 6-16. Project build progress Wait for the project build process to finish. AVR ONE! Quick-start Guide 6-10 32103C–AVR ONE!–02/10...
Create demo application Figure 6-17. Console view The console shows output from the compiler. Make sure that this ends with a “Build complete ...” mes- sage (Except for the “Time consumed” message). If something is not working, you will see error messages in this view.
Create demo application 6.4.1 Create a new debug launch configuration In the Debug Configurations view, select AVR32 Application and right click and select New. A new launch configuration will be created and default values will be filled into all applicable fields. Select the Debugger tab and tick the Stop on startup at: main option.
Create demo application 6.4.2 Configure the target trace module for program trace Figure 6-20. Debug configurations, Trace tab Select the Trace tab and click Enable Trace. AVR ONE! Quick-start Guide 6-13 32103C–AVR ONE!–02/10...
Page 41
Create demo application Figure 6-21. Preferred Trace method Select the preferred trace method. In this case we want Buffered AUX Trace. AVR ONE! Quick-start Guide 6-14 32103C–AVR ONE!–02/10...
Page 42
Create demo application Figure 6-22. Trace buffer size Select Buffer Size. We select 16kB for a quick test. Figure 6-23. Buffer full action Selected the preferred action when buffer is full. In this case we choose Break, read out and halt. AVR ONE! Quick-start Guide 6-15 32103C–AVR ONE!–02/10...
Create demo application 6.4.3 Configure the target trace module for data trace We would like to keep an eye on one of our variables. To do this, we configure a data trace range. In our case, we want a trace message each time the program writes to a variable called display. Figure 6-24.
Create demo application Figure 6-27. Configured data trace range Start a debug session and configure the debugger for trace Figure 6-28. Starting a debug session Click the Debug button. Now the program will be loaded into the target, and run until main(). AVR ONE! Quick-start Guide 6-17 32103C–AVR ONE!–02/10...
Page 45
Create demo application Figure 6-29. Switching perspective When the debug session starts, AVR32 Studio 2.5 will change to the Debug perspective (desktop layout designed for use during debug sessions). You should click Yes. To avoid being asked every time you start a debug session, you should also click the Remember my decision box before answering Yes.
Create demo application 6.5.1 Add start and stop trace-points Figure 6-31. Source code editor Scroll down to and select line 356 in the file DIP204_Example.c and then select Run>Toggle Trace Point. AVR ONE! Quick-start Guide 6-19 32103C–AVR ONE!–02/10...
Page 47
Create demo application Figure 6-32. Tracepoint (Start) Set Tracepoint Configuration values: – Set Trigger Event to Program Counter – Set Trace Operation to Start Trace – Set Tracepoint type to both Program trace and Data trace – Click OK This will create a tracepoint that starts both program and data trace when the program counter hits this code line.
Page 48
Create demo application Figure 6-33. Tracepoint (Stop) Set Tracepoint Configuration values: – Set Trigger Event to Program Counter – Set Trace Operation to Stop Trace – Set Tracepoint type to both Program trace and Data trace – Click OK This will create a tracepoint that stops both program and data trace when the program counter hits this code line.
Page 49
Create demo application Figure 6-34. Source editor with tracepoint indicators The source editor now has two tracepoint indicators next to the respective code lines. Figure 6-35. Trace data view (empty) Click on the Trace Data tab to bring the trace data view to the front. AVR ONE! Quick-start Guide 6-22 32103C–AVR ONE!–02/10...
Create demo application Start the trace debug session Figure 6-36. Resume debug session Make sure that the main() process is still selected in the Debug view before pressing the Resume button. Figure 6-37. LCD Display showing original message The display should look like this. Push the joystick button on the EVK1100 evaluation board a few times, until the trace buffer is full and the target stops (6-7 button operations should be enough).
Page 51
Create demo application Figure 6-38. Target stopped because trace buffer full Figure 6-39. Trace data view (not empty) Have a look at the trace data collected by clicking on a trace frame. Figure 6-40. Changing trace view format Change the format of the code view by opening the trace format menu (click the small arrow). AVR ONE! Quick-start Guide 6-24 32103C–AVR ONE!–02/10...
Page 52
Create demo application Figure 6-41. Set trace view format to Mixed source and Disassembly Figure 6-42. Viewing Mixed source and disassembly trace data Double-click on a trace frame to highlight source code in the source editor. AVR ONE! Quick-start Guide 6-25 32103C–AVR ONE!–02/10...
Create demo application Figure 6-43. Trace frame highlighting source code in the editor Modify the code and restart the debug session If we want to make changes to our code, we must stop the debug session, edit, rebuild and start the debug session again.
Page 54
Create demo application Edit the source code. This example changes the cursor position in line 342 from (6,3) to (1,3), then the text in line 343. Figure 6-45. Editing source code line 343 AVR ONE! Quick-start Guide 6-27 32103C–AVR ONE!–02/10...
Page 55
Create demo application Figure 6-46. Source code edit finished Start a new debug session. AVR32 Studio uses the previous Launch Configuration if you just press the Debug button. Figure 6-47. The Debug button Figure 6-48. Save edited source code dialog Confirm saving the edited source code file.
Page 56
Create demo application Figure 6-49. Resume button Click “Resume” to start the application. Figure 6-50. LCD Display showing edited message The LCD display should now contain the edited message. Congratulations! You have now created your first AVR32 application and collected real time trace data from the target MCU running your program using the AVR ONE! AVR ONE! Quick-start Guide 6-29...
Section 7 Firmware Upgrade Firmware upgrade overview The tools (adapters) used to provide the physical connection between PC and target MCU contains firm- ware. This firmware needs to be compatible with the gnu toolchain and AVR32 Studio installed on the When AVR32 Studio is started, or when a new adapter is detected, AVR32 Studio will perform a firm- ware version check to determine if the adapter firmware needs to be upgraded.
Firmware Upgrade Firmware upgrade progress can be monitored by activating the Progress view. Figure 7-3. Firmware upgrade progress A firmware upgrade report can be found in the Console view. Figure 7-4. Firmware upgrade report Adapter in use The firmware version test is a process that is running in the background. This may cause a situation where the adapter is busy (debug session active) when AVR32 Studio determines that the firmware should be upgraded.
Page 59
Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDI- TIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY...
Need help?
Do you have a question about the AVR ONE! and is the answer not in the manual?
Questions and answers