UG-1308
Rev. A | Page 8 of 24
GETTING STARTED WITH THE TOOL CHAIN
DOWNLOADING THE INTEGRATED
DEVELOPMENT ENVIRONMENT (IDE)
The
firmware examples use either the IAR
Embedded Workbench® or Keil μVision® IDEs to run the
firmware. Ensure that a full or evaluation version of either
software is downloaded and installed to run the example
applications. IAR Embedded Workbench supports the
with Version 8.32.1 and later for ARM. Keil μVision
supports Version 5.28 and later.
SUPPORT PACKAGE
The
firmware examples are source controlled on
www.GitHub.com. To clone the repository, execute the
following command of the Git command line:
git clone --
recursive https://github.com/analogdevicesin
c/aducm355-examples.git
This command downloads the main repository and the
submodules. If the code from the web browser downloads, the
examples/ad5940lib
folder does not download automatically and
compilation errors occur. Download the code manually from
GitHub in the shared library file that contains the
examples and the
example. Both devices have the same
analog front end.
When using Keil μVision, the
can be downloaded as part of a Cortex® microcontroller
software interface standard (CMSIS) pack. Download the pack
from GitHub.
The sample firmware contains the following folders:
The
common
folder contains all library files common
to all applications.
The
examples
folder contains specific example
projects. This folder is divided into the following three
subfolders:
The
AnalogDie
folder contains example projects that
demonstrate how to use specific blocks on the analog die.
The
DigitalDie
folder contains examples that
demonstrate how to use the digital die and peripherals
such as SPI or I
2
C.
The
ApplicationExamples
folder contains application
level examples such as
M355_ECSns_DualWE
, which
demonstrates how to configure a dual working electrode
sensor and calculate gas parts per million (PPM)
readings.
The
inc
folder contains files included for the
microprocessor.
RUNNING A GPIO EXAMPLE IN IAR EMBEDDED
WORKBENCH
The
CMSIS pack is not supported for IAR
Embedded Workbench. To use IAR Embedded Workbench,
clone the repository from the GitHub directory, as described in
the Installing the ADuCM355 Support Package section. To run
the general-purpose input/output (GPIO) example, navigate to
examples
>
DigitalDie
>
M355_GPIO
>
iar
. Double click the
M355_GPIO.eww
file to open the project in the IAR Embedded
Workbench (see Figure 8).
168
87-
00
8
Figure 8.
M355_GPIO.eww
File Location
Project Folder Structure
The IAR Embedded Workbench project folder structure is
shown to the left of the IAR Embedded Workbench window
(see Figure 9). The
app
folder contains files specific to the open
application. In Figure 9,
M355_GPIO.c
is the example shown.
The
common
folder contains the required library files for the
open application. For the GPIO example, the library files are
ad5940.c
,
ClkLib.c
,
DioLib.c
,
IntLib.c
, and
UrtLib.c
. The
startup
folder contains start-up files for the microprocessor, and
the
Output
folder contains the files that are autogenerated by
the IDE. All subsequent firmware examples follow this folder
structure in the IAR Embedded Workbench.