Wiki

This version (06 Apr 2021 09:10) was approved by Darius B.The Previously approved version (19 Mar 2021 12:16) is available.Diff

ADRV9009/ADRV9008 No-OS System Level Design Setup

Supported devices

Supported evaluation boards

Supported carriers

Project layout

The project is located under no-OS/projects/adrv9009 and has the following layout, with source code under the src subdirectory and reference profiles obtained with TES software under profiles subdirectory.

$ tree
no-OS/projects/adrv9009
├── Makefile
├── profiles
│   ├── tx_bw100_ir122p88_rx_bw100_or122p88_orx_bw100_or122p88_dc122p88
│   │   ├── talise_config_ad9528.h
│   │   ├── talise_config.c
│   │   └── talise_config.h
│   ├── tx_bw200_ir245p76_rx_bw200_or245p76_orx_bw200_or245p76_dc245p76
│   │   ├── talise_config_ad9528.h
│   │   ├── talise_config.c
│   │   └── talise_config.h
│   └── tx_bw400_ir491p52_rx_bw200_or245p76_orx_bw400_or491p52_dc245p76
│       ├── talise_config_ad9528.h
│       ├── talise_config.c
│       └── talise_config.h
├── src
│   ├── app
│   │   ├── app_clocking.c
│   │   ├── app_clocking.h
│   │   ├── app_config.h
│   │   ├── app_jesd.c
│   │   ├── app_jesd.h
│   │   ├── app_talise.c
│   │   ├── app_talise.h
│   │   ├── app_transceiver.c
│   │   ├── app_transceiver.h
│   │   └── headless.c
│   ├── devices
│   │   └── adi_hal
│   │       ├── adi_hal.h
│   │       ├── common.h
│   │       ├── LICENSE.txt
│   │       ├── no_os_hal.c
│   │       └── parameters.h
│   └── README
└── src.mk

The ADRV9009 driver may be found under no-OS/drivers/rf-transceiver/talise/api and the firmware files under no-OS/drivers/rf-transceiver/talise/firmware.

TES artefacts

You may use the TES software to generate profiles and corresponding Stream Binary by graphically selecting Tools → Create Script → Init .c Files. This will generate a directory containing the following files:

├── headless.c
├── headless.h
├── talise_config_ad9528.h
├── talise_config.c
├── talise_config.h
└── TaliseStream.bin

Profiles

Using the new profile can be achieved by creating a new directory under no-OS/adrv9009/profiles directory and copying the 3 talise_config* files to it and selecting it in the build system.

Let's say our profile directory is called new_profile, we may select it for build by making sure the PROFILE make variable in src.mk file points to it:

PROFILE = new_profile

Stream binary

After obtaining a TaliseStream.bin file from the TES GUI, this can be converted to a header file via this Linux command.

$ xxd -i TaliseStream.bin > talise_stream_binary.h

Should you want to use this generated file, replace no-OS/drivers/rf-transceiver/talise/firmware/talise_stream_binary.h with it.

Build

NO-OS Project Build Guide

NOTE: This build guide is valid for the projects found in the no-OS/projects folder. If your project resides elsewhere under the no-OS repository tree, it is a legacy project. A build guide for legacy projects can be found Build no-OS with GNU make.

Clone NO-OS with the --recursive flag:

git clone --recursive https://github.com/analogdevicesinc/no-OS

If however you've already cloned NO-OS without the --recursive flag, you may initialize all the submodules in an existing NO-OS clone with:

git submodule update --recursive

Build Prerequisites

Prior to building a no-OS project, it is required to set up some environment variables so that the build process may find the necessary tools (compiler, linker, SDK etc.).

Use the following commands to prepare your environment for building no-OS projects:

Linux (Click to expand)

Linux (Click to expand)

Intel (Click to expand)

Intel (Click to expand)

Assuming the SDK is installed at this path:

/path/to/intel
└── intelFPGA
    └── 18.1

Run:

$ source no-OS/tools/scripts/platform/intel/environment.sh /path/to/intel/intelFPGA 18.1

Xilinx (Click to expand)

Xilinx (Click to expand)

Assuming the SDK is installed at this path:

/path/to/xilinx
└── Xilinx
    ├── DocNav
    ├── Downloads
    ├── SDK
    │   ├── 2017.4
    │   └── 2018.3
    ├── Vivado
    │   ├── 2017.4
    │   └── 2018.3
    └── xic

Run:

$ source /path/to/xilinx/Xilinx/SDK/2018.3/settings64.sh

For more information, consult the support/answers/47821.html.

STM32 (Click to expand)

STM32 (Click to expand)

Download your relevant STM32Cube package by cloning from STMicroelectronics github repo:

$ cd /path/to/stm32cube
$ git clone https://github.com/STMicroelectronics/STM32CubeF4.git
$ tree .
/path/to/stm32cube
├── STM32CubeF0
├── STM32CubeF4
├── STM32CubeL0
└── STM32CubeL1

Run:

$ export STM32CUBE=/path/to/stm32cube

ADuCM3029 (Click to expand)

ADuCM3029 (Click to expand)

Common Issues with environment setup:

  • Makefiles searches for the CCES_HOME in its default installation directory. It may happen that multiple version are installed and may not work. To select a CCES_HOME run export CCES_HOME=/opt/analog/cces/2.9.2

Windows (Click to expand)

Windows (Click to expand)

Intel (Click to expand)

Intel (Click to expand)

Assuming the SDK is installed at this path:

C:\
└── intelFPGA
    └── 18.1

Run:

> .\no-OS\tools\scripts\platform\altera\environment.bat C:\intelFpga 18.1

Xilinx (Click to expand)

Xilinx (Click to expand)

Assuming the SDK is installed at this path:

C:\
└── Xilinx
    ├── DocNav
    ├── Downloads
    ├── SDK
    │   ├── 2017.4
    │   └── 2018.3
    ├── Vivado
    │   ├── 2017.4
    │   └── 2018.3
    └── xic

Run:

> C:\Xilinx\SDK\2018.3\settings64.bat

For more information, consult the Xilinx support support/answers/47821.html.

Note that Xilinx SDK versions 2018.3 or earlier don't properly set up the Windows PATH so that you may use make command provided with the SDK from the shell.

If this is the case, please manually add the following to your Windows PATH or install make for Windows of your choice:

C:\Xilinx\SDK\2018.3\gnuwin\bin

ADuCM3029 (Click to expand)

ADuCM3029 (Click to expand)

Common Issues with environment setup:

  • Makefiles searches for the CCES_HOME in its default installation directory. It may happen that multiple version are installed and may not work. To select a CCES_HOME run set CCES_HOME=c:\Analog Devices\CrossCore Embedded Studio 2.8.0
If using PowerShell instead of cmd, open another shell instance after running the above scripts.

Building a project

Go in the project directory that should be built.

Linux (Click to expand)

Linux (Click to expand)

$ cd no-OS/projects/project_name/
$ tree
.
├── builds.json
├── Makefile
├── src
└── src.mk

Intel (Click to expand)

Intel (Click to expand)

Copy the .sof and .sopcinfo to the project folder.

$ ls
Makefile  profiles  src  src.mk  system_bd.sopcinfo  adrv9009_a10gx.sof	
$ make

# Alternatively you may select a .sopcinfo file explicitly by:
$ make HARDWARE=path/to/system_bd.sopcinfo

Xilinx (Click to expand)

Xilinx (Click to expand)

Copy the .hdf in the project folder.

$ ls
Makefile  profiles  src  src.mk system_top.hdf
$ make

# Alternatively you may select an .hdf file explicitly by:
$ make HARDWARE=path/to/file.hdf

STM32 (Click to expand)

STM32 (Click to expand)

$ make PLATFORM=stm32

ADuCM3029 (Click to expand)

ADuCM3029 (Click to expand)

The ADuCM3029 projects also contain a pinmux_config.c file which contains pin configuration instructions.

# build an ADuCM3029-only project
$ make

# if the platform autodetection picks the wrong platform, explicitly specify the PLATFORM
$ make PLATFORM=aducm3029

Windows (Click to expand)

Windows (Click to expand)

CMD needs to be run with administrative privileges to create a project.

If this is not possible, check the standalone section.

> cd .\no-OS\projects\project_name\

It should contain make-related files and source files:

.\no-OS\projects\project_name\
├── builds.json
├── Makefile
├── src
└── src.mk

Intel (Click to expand)

Intel (Click to expand)

Copy the .sof and .sopcinfo to the project folder and run:

.\no-OS\projects\adrv9009\
├── Makefile
├── profiles
├── src
├── src.mk
├── system_bd.sopcinfo
└── adrv9009_a10gx.sof

> make

Xilinx (Click to expand)

Xilinx (Click to expand)

Copy the .hdf to the project folder and run:

.\no-OS\projects\adrv9009\
├── Makefile
├── profiles
├── src
├── src.mk
└── system_top.hdf

> make

ADuCM3029 (Click to expand)

ADuCM3029 (Click to expand)

The ADuCM3029 projects also contain a pinmux_config.c file which contains pin configuration instructions.

# build an ADuCM3029-only project
> make

# if the platform autodetection picks the wrong platform, explicitly specify the PLATFORM
> make PLATFORM=aducm3029

The build process creates a build directory in the project folder:

build
├── app
├── bsp
├── obj
├── release.elf
└── tmp

Debugging/Running

Once the .elf or .hex file has been generated, make sure the board is powered on, JTAG cable connected and use the following commands to upload the program to the board or debug.

Uploading the binary to target is generically achieved with:

$ make run

However, debugging interface might be different across platforms and the specifics are documented below.

Linux (Click to expand)

Linux (Click to expand)

Xilinx (Click to expand)

Xilinx (Click to expand)

Use the following command to launch XSDK to be able to debug graphically by clicking the debug button.

$ make develop

A debug configuration is created automatically, debugging should work out of the box.

ADuCM3029 (Click to expand)

ADuCM3029 (Click to expand)

Use the following command to launch CCES to be able to debug graphically by clicking the debug button.

$ make develop

However, a debug configuration must be created first by following the debug session configuration section of this guide.

STM32 (Click to expand)

STM32 (Click to expand)

In order to run/debug on STM32 from command line, the makefile targets make use of the STM32CubeIDE modified version of openocd and a stock arm-none-eabi-gdb. Make sure you have them installed.

Assuming you've installed the STM32CubeIDE to /opt/stm32cubeide directory, use (and possibly adapt) the following commands:

$ export OPENOCD_BIN=/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.linux64_1.5.0.202011040924/tools/bin
$ export OPENOCD_SCRIPTS=/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.debug.openocd_1.5.0.202011091203/resources/openocd/st_scripts

Now you may run/debug with:

$ make PLATFORM=stm32 run
$ make PLATFORM=stm32 debug
17 Mar 2021 10:27 · Darius B

Build Switches

The project builds by default for ADRV9009-W/PCBZ with whatever carrier is specified in the hardware files (.hdf or .sopcinfo/.sof).

AD-FMCOMMS8-EBZ support on ZCU102 may be enabled by adding -DFMCOMMS8_ZCU102 compiler flag or uncommenting the define in src/app/app_config.h.

ADRV9009-ZU11EG support on ADRV2CRR-FMC may be enabled by adding -DZU11EG compiler flag or uncommenting the define in src/app/app_config.h.

Legacy build instructions

We strongly recommend you use the command line build instructions above but if you would like to perform a manual and graphical project configuration, you may follow the following legacy build guides for Intel platforms or Xilinx platforms.

Demo Applications

DAC_DMA_EXAMPLE demo

DAC_DMA_EXAMPLE is a standard example, provided in all no-OS projects, that sends a sinewave on Tx channels using DMA from a lookup table. If you physically loopback a Tx channel to an Rx channel via an electrical wire, you may run the DAC_DMA_EXAMPLE and read the received data at a predefined DDR memory address. You may retrieve the data on the computer for processing/plotting either graphically by using the memory viewer of the SDK or via command line using tickle scripts.

To build the DAC_DMA_EXAMPLE demo, edit the Makefile and add -DDAC_DMA_EXAMPLE to CFLAGS and rebuild. Alternatively, you may simply add a #define DAC_DMA_EXAMPLE in-code and rebuild.

18 Mar 2021 08:51 · Darius B

TINYIIOD demo

TINYIIOD demo is a standard example, provided in all no-OS projects, that proposes a TINYIIOD server on the board so that the user may connect to it via an IIO client. Using iio-oscilloscope, the user can configure the DAC and view the ADC data plotted graphically.

To build the TINYIIOD demo, add the following flag when invoking make which will build the tinyiiod server and the IIO section of the driver.

make TINYIIOD=y

When running the TINYIIOD demo, you should first connect to the board via UART to see the runtime output messages. The UART settings for this are:

Baud Rate: 115200bps
Data: 8 bit
Parity: None
Stop bits: 1 bit
Flow Control: none

However, connecting an IIO client to the board is also performed via UART. After the chip initialization is done, the TINYIIOD server is executed and it awaits for a client connection on UART with the following settings:

Baud Rate: 921600bps
Data: 8 bit
Parity: None
Stop bits: 1 bit
Flow Control: none

Consequently, you first need to connect a UART terminal to your serial port using 115200 baud rate, wait for the driver to initialize correctly, disconnect the serial terminal, and reconnect with 921600 baud rate from an IIO client application (such as iio-oscilloscope) using serial backend.

18 Mar 2021 09:00 · Darius B
resources/eval/user-guides/adrv9009/no-os-setup.txt · Last modified: 06 Apr 2021 09:10 by Darius B