Atmel Ice Driver For Mac

Hi,After a lot of help from Hein I was able to get it all running on both ASF3 and ASF4 for the SAME70-Xplained board with SAME70Q21A not B.Below are links for example projects, one using ASF3, it’s a very simple example. The second is using ASF4, aka Atmel Start.They both start looking for a DHCP server upon wake up for a valid connection, if not found they will switch to the defined static IP.Details on the ASF4 project:

  • UART using the debug board at 115200 baud, this should give you periodic statistics.
  • After TCP connection you will see the IP address, connect to it using telnet at port 2008, it has FreeRTOS+CLI implemented there, type “help” for the command list.
  • You can use Atmel Start to add drivers but make sure to do the following afterwards:
    • Never allow modifications on the FreeRTOS files even if it asks.
    • Never allow modifications on FreeRtosConfig.h
    • Modify the linker scripts as shown in directory: Device_Startup. Read “AddMeToldFiles.txt”
    • Add “#include “applicationinclude.h”” to “driverinit.h”
    • add “initapplication();” into “void systeminit(void)” in file “driver_init.c”
    • if you see file name “main.c” in root directory remove it.
If you decide to get the FreeRTOS+TCP part into your project make sure to change the linkerscript to accomedate the change, mainly defining the following right after the .text part of memory. :.firstAtmel Ice Driver For Mac

Atmel-ICE is a powerful development tool for debugging and programming ARM® Cortex®-M based SAM and AVR microcontrollers with on-chip debug capability. Official reference can be found here. Microchip Studio is an Integrated Development Platform (IDP) for developing and debugging AVR ® and SAM microcontroller applications. It merges all of the great features and functionality of Atmel Studio into Microchip’s well-supported portfolio of development tools to give you a seamless and easy-to-use environment for writing, building and debugging your applications written in C/C. Summary: Atmel-ICE is a powerful development tool for debugging and programming ARM® Cortex®-M based SAM and AVR microcontrollers with on-chip debug capability. These are step by step instructions for a beginner to learn how to use the Atmel - Ice. There are also brief instructions on how to navigate around the user.

data (NOLOAD) : { . = ALIGN(4); _firstdata = . ; (._first_data ._first_data.) . = ALIGN(4); efirst_data = . ; } > ramPlease note that the gmac driver included with FreeRTOS+TCP for SAME70 cannot run with CACHE enabled, at least not yet, maybe Hein can comment on this, and if you do get it running please let us know.I hope this benifets you.The links:ASF3: https://drive.google.com/open?id=1WBOGMzwHGw5X35h51ABLxd6CNs6WYmWASF4: https://drive.google.com/open?id=1gfFz7jkVkEAZap2RYFdMlC34cNfp5f9I will try to keep the links as long as possible. I have also attached the files.Thanks Hein.Atmel Ice Driver For Mac

Work from the command line on OS X or Linux, without Atmel Studio or Eclipse.

May 22, 2017

NOTE: an updated version of this article is available here

These notes describe how I program a SAMD21E17 breakout board with the Atmel ICE, using the command line on Mac OS X, without Atmel Sudio or any other IDE.I assume that the almost exact same procedure can be applied to linux.

Atmel Ice Data Gateway Driver

The board I used is a TAU (see http://rabidprototypes.com/product/tau/), but the procedure would be the same for the more popular SAMD21G18 that can be found on the Arduino Zero for example.

The ARM developper tools (arm-none-eabi) need to be installed your system.

OpenOCD

On the Mac, I used brew to install OpenOCD (see https://brew.sh/):

The first step is to set up OpenOCD correctly. For this purpose create a file called openocf.cfg, with the following content:

You should change the value at91samd21e17 to match the microcontroller you are using (e.g. at91sam21g18).

Download amped five crack. If you have several Atmel-ICE debuggers connected to your machine, you need to distinguish them by their serial number in the openocd.cfg file by adding the following line with your own serial number substitued:

On a MAC, you can find the serial number by searching through the output of the command system_profiler SPUSBDataType and on linux you would look through the output of lsusb -v.

You can test you openocd.cfg file by simply typing openocd. You should get an output similar to this:

Now you can plug the SWD header in the board you want to program (don't forget to power the board!). If you launch OpenOCD again, you should get the following output:

Now, while OpenOCD is still running, we can test that gdb works by typing arm-none-eabi-gdb -iex 'target extended-remote localhost:3333':

If you got this far, your OpenOCD is complete.

Let's blink an LED

The TAU has an LED on Pin 25, which maps to the GPIO PA27: the 27th io port on port A. We will make it blink to test our setup.If you have another board it might have an LED on a different PIN or none at all, you will need to adapt the code below (e.g. the SAMD21 Xplained pro has a led on PB30).

To compile this file, you will need a set of headers provided by Microchip/Atmel. First, download the Atmel Software Framework (ASF) from http://www.atmel.com/tools/avrsoftwareframework.aspx

When uncompressing a the file, you'll get a directory named xdk-asf-3.34.2/ or something similar depending on the version you dowloaded. Let's name ASFROOT the absolute path corresponding to that directory (e.g. ASFROOT='/Users/pannetra/Downloads/xdk-asf-3.34.2').

Go to the directory where you put the openocd.cfg file and perform the following actions:

Now the following steps will need a small customisation depending on the microcontroller you have. In my case it's a SAMD21E17A:

If you have a different microcontroller from the SAMD21E17A, you should change the file name samd21e17a_flash.ld to match your microcontroller.

The above Makefile is derived from the great work of Geoffrey Brown on the STM32.

Atmel Ice Driver For Mac

If you have a different microcontroller from the SAMD21E17A, you need to change the following two lines in the Makefile: LDSCRIPT = samd21e17a_flash.ld and PTYPE=__SAMD21E17A__, replacing references to the samd21e17a with your own.

Compiling and running the code

First we will check that the code compiles as expected.

Now, you are ready to run the program. Connect the OpenOCD and power your board. We will use gdb to load the program and run it:

Note the gdb commands (load, monitor reset, monitor halt, c..).

Let the LED blink!

The example above does not include the HAL (Hardware Abstraction Layer), which is yet part of another directory in the ASF. A topic for another post I guess.

Comments

Thanks for the great write up. I got as far as typing arm-none-eabi-gdb. Seems I have to set up a cross compile environment on my Gentoo system to get an arm build of the gdb server.

Justin, over 3 years ago

Is your solution open sourced? I am designing a network for my small RV van and would like to use something like your solution, but need much smaller boards? Can I make a smaller version of the board? How would you get compensated?

Mike Roberts, over 3 years ago

Atmel Driver For Windows 10

Leave a comment