This version (03 May 2018 22:32) was approved by Brandon.The Previously approved version (18 Sep 2017 18:12) is available.Diff

This page is being phased out as of October 30th 2017.

We are moving the EVAL-ADICUP360 tools support over to CrossCore Embedded Studios(CCES). You should consider migrating to CCES at your earliest convenience. We will be removing support for the legacy tools April 30th 2018.

We have removed the ADUCM360-IDE Download from the web. We are going to keep this user guide available for customer documentation until September 30th 2018. At that time, we will be removing this page and tool completely and the only option moving forward will be to use CrossCore Embedded Studio.

Here is a link to download and install CrossCore Embedded Studios.
And here is a link to use CrossCore Embedded Studios.

Tool Chain Setup User Guide

This page provides detailed information about using the ADuCM360 customized Eclipse IDE, in particular, the process of importing, building, debugging, and creating user applications for the ADuCM360 microcontroller.

This page will outline:

  1. How to import existing projects into your workspace
  2. How to build the .elf files, for programming the ADuCM360
  3. How to configure the debug session for a particular user application
  4. How to start a debug session
  5. How to create a new project

Workspace and Projects

The workspace is a folder where Eclipse can access local copies of user application projects. When starting Eclipse, a prompt will ask you for a location of this folder. This is the location where all the ADuCM360 user applications will be stored.

Using the Tool Chain

The instructions below have been tested in Windows XP and Windows 7, on both 32-/64-bit machines.

Importing a Project

There are 2 methods for importing existing programs:

  • Examples that come with the installer package.
  • Examples which are in our GIT repository (most up to date content).

Only one method is needed to get started with the EVAL-ADICUP360.

How to Import Existing Projects within the Installer Package

  1. From the menu located in the tool bar, select the File → Import option.
  2. A window will pop-up with several importing options, select General → Existing Projects into Workspace.
  3. Select Browse in the dialog window and search for the local copy of where the ADuCM360-IDE examples are. If you used the default directory that can be found here: C:\Analog Devices\ADuCM360-IDE\Examples
  4. Make sure that the check-box Copy projects into workspace is checked (this creates a local copy of the projects and preserves the original versions) and press Finish .
If you imported the example programs from the installer, you can skip ahead to “Building the .ELF/.HEX Files” section. The only time you will need to import from the GIT repository, is if you want to look for newly released/updated programs.

How to Import Existing Projects from the GIT Repository

  1. Open the GIT perspective window by navigating the menu near the tool bar. File → Perspective → Open Perspective → Other → GIT and the press “OK”.
  2. Clone the Git repository which contains all the latest code and projects associated with the ADuCM360. Populate the URI field with the following address.
    1. Click Next → Next → Finish
  3. In the Git Repositories window, Right Click on Projects folder and select the Import option.
  4. Select the radio button for Import existing Eclipse projects and click on the projects folder as the destination.
  5. Click Next → Finish

Building the .ELF/.HEX Files

It's important to build your project before setting up the debug configuration. This will allow the debug configuration to automatically populate the appropriate fields.

  1. Starting on the C/C+ + perspective, select the project you want to debug in the Projects Explorer Window.
  2. Right click on the project and select the Build Project option.
    • Could also go up to the tool bar and click on the Hammer icon.

Setting up a Debug Configuration for the Project

A new debug configuration must be set up for EACH application you intend on developing/debugging. So you will have many different debug configurations, depending on the number of programs you create/debug.
  1. Go to the menu bar and follow this path, Run → Debug Configurations…
    • Alternatively, locate the small bug icon in the tool bar and click the small downward facing arrow to the right, and select the Debug Configurations… option from the menu.
  2. Double click the GDB OpenOCD Debugging configuration from window.
  3. The necessary input fields should be populated, assuming that you built your project in the previous step. The following images should be used as a reference if some of the fields are blank.
  4. Next, switch to the Debugger tab and ensure the following required GDB commands are present.
  5. Finally, click the checkbox in the Common tab --> Display in Favorites Menu to make the created debug configuration appearing in the Debug Configurations section of the menu: Click “Apply”, then “Close”.

Debugging an Application

  1. Make sure the EVAL-ADICUP360 board is connected to the computer via the DEBUG USB port. (The micro USB connector closest to the DC barrel jack)
  2. Using the tool bar, navigate to the small Debug icon and click on the downward arrow to the right. Select the debug configuration you want to download to the ADuCM360.
  3. If this is the first time you have launched OpenOCD, the Windows Firewall may pop-up a window asking for access. Click on “Allow Access”.
  4. If everything goes fine, in the Console window, you will see a report without errors.
    • As a reference, the full text should be similar to:
      Open On-Chip Debugger 0.10.0-dev-00025-g81cc011-dirty (2015-08-17-13:23)
      Licensed under GNU GPL v2
      For bug reports, read
      Info : only one transport option; autoselect 'swd'
      adapter speed: 5000 kHz
      adapter_nsrst_delay: 100
      cortex_m reset_config vectreset
      Started by GNU ARM Eclipse
      Info : CMSIS-DAP: SWD  Supported
      Info : CMSIS-DAP: Interface Initialised (SWD)
      Info : CMSIS-DAP: FW Version = 1.0
      Info : SWCLK/TCK = 0 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
      Info : CMSIS-DAP: Interface ready
      Info : clock speed 5000 kHz
      Info : SWD IDCODE 0x2ba01477
      Info : aducm360.cpu: hardware has 6 breakpoints, 4 watchpoints
      Info : accepting 'gdb' connection on tcp/3333
    • The relevant EEPROM sectors of ADuCM360 are erased and the microcontroller is programmed. You can follow the progress in the Console window. As an approximate reference you will see something similar to:
      target state: halted
      target halted due to debug-request, current mode: Thread 
      xPSR: 0x81000000 pc: 0x00000a94 msp: 0x20001fe0
      semihosting is enabled
      RESET: ADI halt after bootkernel
      breakpoint set at 0x000001f5
      Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
      target state: halted
      target halted due to debug-request, current mode: Thread 
      xPSR: 0x01000000 pc: 0x000001f4 msp: 0x20002000, semihosting
      flash 'aducm360' found at 0x00000000
      Info : Padding image section 0 with 3 bytes
      RESET: ADI halt after bootkernel
      breakpoint set at 0x000001f5
      Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
      target state: halted
      target halted due to debug-request, current mode: Thread 
      xPSR: 0x01000000 pc: 0x000001f4 msp: 0x20002000, semihosting
      RESET: ADI halt after bootkernel
      breakpoint set at 0x000001f5
      Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
      target state: halted
      target halted due to debug-request, current mode: Thread 
      xPSR: 0x01000000 pc: 0x000001f4 msp: 0x20002000, semihosting
      ===== arm v7m registers
      (0) r0 (/32): 0x40002800
      (1) r1 (/32): 0x00000001
      (2) r2 (/32): 0x00000064
      (3) r3 (/32): 0x00000000
      (4) r4 (/32): 0x00000000
      (5) r5 (/32): 0x00000000
      (6) r6 (/32): 0x00000000
      (7) r7 (/32): 0x00000000
      (8) r8 (/32): 0x00000000
      (9) r9 (/32): 0x00000000
      (10) r10 (/32): 0x00000000
      (11) r11 (/32): 0x00000000
      (12) r12 (/32): 0x00000000
      (13) sp (/32): 0x20002000
      (14) lr (/32): 0xFFFFFFFF
      (15) pc (/32): 0x000001F4
      (16) xPSR (/32): 0x01000000
      (17) msp (/32): 0x20002000
      (18) psp (/32): 0x6A850410
      (19) primask (/1): 0x00
      (20) basepri (/8): 0x00
      (21) faultmask (/1): 0x00
      (22) control (/2): 0x00
      ===== Cortex-M DWT registers
      (23) dwt_ctrl (/32)
      (24) dwt_cyccnt (/32)
      (25) dwt_0_comp (/32)
      (26) dwt_0_mask (/4)
      (27) dwt_0_function (/32)
      (28) dwt_1_comp (/32)
      (29) dwt_1_mask (/4)
      (30) dwt_1_function (/32)
      (31) dwt_2_comp (/32)
      (32) dwt_2_mask (/4)
      (33) dwt_2_function (/32)
      (34) dwt_3_comp (/32)
      (35) dwt_3_mask (/4)
      (36) dwt_3_function (/32)
  5. The user application execution is then stopped automatically at the first breakpoint at the beginning of main() loop. From this point on, you can use the debug functions and features of the Eclipse environment. (Such as stepping through, breakpoints, register reads, variable values, etc.)
  6. When finished, the debugger has to be stopped. Click on red Stop button up in the tool bar, then right click on the debug application in the “Debug” window, and select the Terminate and Remove option.

Creating a New Project

The customized Eclipse IDE that you installed for EVAL-ADICUP360 offer the possibility to create 2 types of projects: Empty Project and Hello World Project. Both C and C++ formats.

The idea of these templates is to have at the end a functional ADuCM360 project which can be run on the target. The basic system configuration is the same for both:

- startup code

- memory map and linker script

- system clock configuration

- disabling watchdog

- enabling clocks for all peripherals

- low drivers libraries for ADuCM360 microcontroller

The differences are regarding the complexity of the main() function: the Empty template provide an empty main() function, being in this way a good choose when you want to start your ADuCM360 project from the scratch; the Hello World template is for more complex projects. It provide 1 sec time base and different possibilities to display an output message to the user.

See below how to create the C projects for EVAL-ADICUP360 board. The same steps being available for C++ projects as well.

  1. To create a new project, go to the menu bar and find File → New → C Project.
  2. Provide a name for your project, and then choose Project Type: Executable → ADuCM36x C/C+ + Project , with the Toolchains: Cross ARM GCC. Press Next.
  3. Choose as Processor core: ADuCM360.
  4. Select which type of project do you want: Content: Empty (add your own content) or Hello World (with 1s timer).
  5. The Use system calls and Trace output options are available for Hello World template only.
  6. You can select various settings for your project (which can be changed later, in the project settings, or as different pre-processor definitions).
  7. Select both the configuration check boxes you want to deploy on.
  8. On the next page select the compiler toolchain. It should will automatically selected, just check or enter the right path to it.
  9. Finally, press Finish and the project will be created and you can begin programming.

Options available for "Hello World" template only

Use system calls available options are (see GNU ARM Eclipse support page):

  • Freestanding - a typical embedded configuration, that does not use the POSIX system calls (open, close, read, write, etc).
  • POSIX (retargetting) - a more elaborate embedded configuration where the application makes use of these calls, but redirects the file descriptors to local devices or files, by providing custom implementations for the system calls (like _open, _close, _read, _write etc). This configuration allows to port POSIX programs easier.
  • Semihosting - a special testing configuration, that bridges all system calls to the host operating system where the GDB server runs. This configurations is particularly interesting for running test programs that can leave the test results in a file stored on the host, for automated integration in a test suite.

Trace output available options are:

  • None (no trace output) - a basic configuration that doesn't use trace output messages.
  • ARM ITM (via SWO) - a specific configuration that help to print information via SWO pin when using J-Link.
  • Semihosting STDOUT stream - a more complex configuration that configure stdout to use a physical serial connection as UART or any other peripherals that offer the possibility to output messages.
  • Semihosting DEBUG channel - a debug specific configuration which enable semihosting in DEBUG mode and offer the possibility to use resources from the development platform n the embedded target via debugger. This can help the user to send trace stream to debugger console (like trace_printf, trace_puts etc).

Assign Device to the Project using Packs

This step will allow you to access the ADuCM360 registers in debugger mode. In order to see the device list it is required to have Packs plug-ins installed. This is already done by the installer, however you do need to update the Packs list, and then install a particular family of devices.

  1. To update your Packs library, go to the menu and Choose WindowPerspectiveOpen PerspectiveOther
  2. Click on “Packs”. Once open, find the Packs window, and click on the Update arrow in the upper-righthand corner.
  3. After updating has completed, find the folder for Analog Devices and navigate down to the latest version of ADuCM36x and right click and hit Install.

To assign device to your project:

- Select your project in the Project explorer view

- Go to Project tab from Eclipse menu and select Properties

- Go to C/C+ + BuildSettings

- Select the desired configuration

- Click on Device tab and expand the Analog Devices node

- Select ADuCM360 as a device and press OK

End of Document

resources/eval/user-guides/eval-adicup360/quickstart/eclipse_user_guide.txt · Last modified: 03 May 2018 22:32 by Brandon