In-System Programming and Kit Connection

This video gives an overview of the Device Programming dialog box, to check the kit connection. The ATtiny817 Xplained Pro kit has an on-board embedded debugger (EDBG) which eliminates the need for a dedicated programmer/debugger. This section will also go through the process of associating the EDBG with your project.

Getting Started Topics

Video: Kit Connection and In-System Programming

Todo: Associate the EDBG on your ATtiny817 Xplained Pro kit with your project.
  1. 1.Connect the ATtiny817 Xplained Pro board to the computer using the provided Micro-USB cable. The kit page should be present in Atmel Studio as in the figure below.
    Figure 1. ATtiny817 Xplained Pro Start Page
    1. 1.1.There are links to documentation for the board and data sheet for the device.
    2. 1.2.It is possible to create an Atmel START project for the board. Clicking on the Atmel START links project links will bring you into Atmel START where you get options for this specific board.
  2. 2.Opening the Programming Dialog by Tools → Device Programming.
    1. 2.1.Select EDBG Tool and assure that Device = ATtiny817, then you may read Device Signature and Target Voltage.
    2. 2.2.Interface settings: You may see and change the interface clock frequency.
    3. 2.3.Tool information: Shows information about the EDBG tool.
    4. 2.4.Device information: Shows information about the device. Note that you can also see the silicon revision of the device. This may be useful in customer support cases.
    5. 2.5.Memories: May program the flash, EEPROM, and user signature separately from the files.
    6. 2.6.Fuses: Read and set fuses, for instance, oscillator frequency (16 or 20 MHz), brown-out voltage detection etc.
    7. 2.7.Lock bits: Lock memory.
    8. 2.8.Production file: Program the device using a production file to program flash, EEPROM, and user signatures.
    9. 2.9.Note that AVR has flash in the HEX file and EEPROM in the EEP files, while PIC has everything, even fuses, in a HEX file.
    10. 2.10.For instance, SAML21J devices don't have EEPROM (may be emulated in flash). It also has a security bit option to lock the device.
  3. 3.Create a new project by selecting File → New project, select for instance C executable project, select the device by filtering on the device name. Different project types are discussed in another Getting Started video.
  4. 4.If a project is selected, click the Tool button located in the top menu bar to open the tool dialog as indicated in the figure below.
    Figure 2. Tool Button
  5. 5.The Tool tab of the Project Properties will open. In the drop-down menu, select the EDBG tool, as indicated in the figure below. The interface should automatically initiate to UPDI (Unified Programming Debugging Interface).
    Figure 3. Select Debugger/Programmer in Project Properties
    Tip: The serial number of the tool will accompany its name in the drop-down menu. This serial number is printed on the backside of each tool, allowing differentiation when more than one is connected.
Tip: These steps can always be repeated if a different tool should be used for the next debug/program session.
Warning: On the ATtiny817 Xplained Pro, the EDBG is permanently connected to the target MCU, but for a custom hardware solution it is necessary to ensure the target device is powered and properly connected before a debug session can be launched.
Result: The tool to be used by Atmel Studio when a debug/programming session is launched, has now been specified.

Settings Verification

This section is a guide to verifying the tool and project configuration setup by compiling the empty project and writing it to the ATtiny817.

Todo: Verify the tool and project configuration setup done in the previous sections.
  1. 1.Click the Start Without Debugging button located in the Debug menu, as shown in the figure below. This will compile the project and write it to the specified target MCU using the configured tool.
    Figure 4. Start Without Debugging
  2. 2.When Atmel Studio 7 builds the project (automatically done when pressing Start Without Debugging), several generated output files will show up in the Solution Explorer window. The following output files are generated:
    1. 2.1.EEP file: EEPROM content written to the device.
    2. 2.2.ELF file: Contains everything written to the device, including program, EEPROM, and fuses.
    3. 2.3.HEX file: Flash content written to the device.
    4. 2.4.LSS file: Disassembled ELF file.
    5. 2.5.MAP file: Linker info, what did the linker do, decisions about where to put things.
    6. 2.6.SREC file: Same as HEX but in Motorola format.
Info: If there is new firmware available for the selected tool, the Firmware Upgrade dialog will appear, as depicted in Figure 5. Click the Upgrade button to start the firmware upgrade.
Figure 5. Firmware Upgrade Dialog
Depending on the state of the connected tool and the actual firmware upgrade, the upgrade may fail on the first attempt. This is normal and can be resolved by disconnecting and reconnecting the kit before clicking Upgrade again. After the upgrade has completed, the dialog should say 'EDBG Firmware Successfully Upgraded'. Close the dialog box and make a new attempt at programming the kit by clicking the Start Without Debugging button again.
Result: By compiling the empty project and writing it to the ATtiny817 the following has been verified:
  • The project is configured for the correct MCU
  • The correct tool has been selected
  • The tool's firmware is up-to-date
Under View > Available Tools you are able to see a list of available or recently used Tools. Here you can specifically ask Atmel Studio 7 to upgrade the firmware for a tool.
Figure 6. Atmel Studio 7 Available Tools (on view menu)