MAS OpenArbor

From DDCIDeos
Jump to navigationJump to search

Useful Links

  • The Open Arbor User Guide can be located in the /desk/help folder (openarbor-user-guide.htm)
  • Deos Maintainer Build in OA - contains instructions on how to configure OA for DDCI engineers

Create an OpenArbor Workspace

Cygwin

When Cygwin is used to create the project, it also creates the OpenArbor workspace and creates a shortcut to the OpenArbor tool. An OpenArbor workspace can also be created from a bash window.

Create from Cygwin:
To create an initial OpenArbor workspace, see Initial Cygwin Launch.

Create from bash window:
Another method is to launch the cygwin tool from the bash window:

Launching OpenArbor

Docker/WSL

To launch OpenArbor from a docker container, use the following command:

nohup /OpenArbor/OpenArbor &

A better solution is to create the following alias in your .bashrc file:
alias oa="nohup /OpenArbor/OpenArbor &"

Cygwin

When you created a project via Cygwin, you automatically get the OpenArbor shortcut to launch the tool.


Maintenance of OpenArbor Projects

License File (FLEXNET)

The OpenArbor tool uses FLEXNET licenses. When the license expires, you need to install a new license file (all_prods.lic).
See FLEXNET User Guide for more information.

Cygwin

Generally, the license file is located here:
C:\home\YOURUSERNAME

Docker

TBD


Deleting Old Projects

Docker

See Delete Old Project

Cygwin

Delete the following folders:

  • C:\cygwin\projectName - this is the desk area that cygwin created
  • C:\OpenArbor\workspaceName - this is the corresponding OpenArbor project

Create a New OpenArbor Workspace

Follow the instructions as provided in #Create an OpenArbor Workspace

DESKHOME

For unknown reasons, a project may be created where the paths and symbols property within OA does not work. The symbols need to be changed to use the full path. An example is shown below:

      Old                            Replace with this
------------------------------------------------------------------------------------
${DESKHOME}\arm\include            C:\cygwin\europa_ioi_bm\desk\arm\include
${DESKHOME}\include                C:\cygwin\europa_ioi_bm\desk\include
${DESKHOME}\include\sys            C:\cygwin\europa_ioi_bm\desk\include\sys
${DESKHOME}\src\test-component     C:\cygwin\europa_ioi_bm\desk\src\test-component


OpenArbor Examples

See OpenArbor Examples for the steps to load and run OpenArbor examples.

Edit and Debug Examples

Modifying the source code for examples is similar to modifying a component's source code (or test procedure). The example folder will contain a /code folder containing the source code for the example. Use the OA editor to modify the code.

Building the Example Code

Unless you have modified the preferences, the example code will be rebuild each time you save the file.

  • The OA editor will indicate errors in the source code
  • OA will also provide a summary of the errors in the "Problems" tab at the bottom of the OA window
  • For more information about the error, use the "DDC-I Console" at the bottom of the OA window

If the example code builds with no errors, then it will be apparent in any of the 3 windows listed above.

NOTE: At times, the example will not build correctly after modifications are made. Using the Project:Clean... option will force OA to delete the existing object files and do a full rebuild of the example.

Create a New Example

TBD

Build Variants

OA defaults the build variant to "diagnostic" (which is equivalent to "debug") to allow the video to show up in the video stream. OA supports the following variants:

  • Production (aka "release")
  • Diagnostic (aka "debug")
  • Instrumented
  • Instrumented ABC Compliant (aka "instrumented_optimized)

To change/enable different build variants, use the following steps:

  1. From the DDC-I Project Window, select the example (demo653, interrupt, etc)
  2. Right click, and select Properties
  3. Select the Configurations tab
  4. Select the appropriate build configuration(s)
  5. Select "Apply and Close"

NOTE: if Build Automatically option is selected for your OA environment, then the code is rebuilt for each of the build variants selected.


Running on Actual Hardware

The qemu platforms are generally useful for most type of debugging, but software that requires precise timing or specific hardware configurations require the use of actual hardware. The following steps can be followed to allow OA to run tests on an actual hardware target.

  • Use the X9 Wiki to lock and power the hardware (see General Steps in Using Hardware).
  • Within OA, use the File:New: DDC-I Deos Platform Project and select the desired hardware target
    • NOTE:If you don't see the hardware platform you want, it is because it was not installed in your /desk. You will need to exit OA, install the platform, and then launch OA again.
  • After the platform has been imported (e.g. it shows up in the DDC-I Project Window) AND after it finishes building, then add the hardware platform to the Target manager:
    • From the Target Manager, select the New Remote Target
    • Set Hostname to the IP address specified on the X9 page
    • Press OK

If you plan on building and running tests via the command line, then refer to General Steps in Using Hardware.

If you are using OA to build and execute the software on actual hardware, then modify the Build (Incremental Build) command line as follows:

  • From the DDC-I Project Window:
    • Select the project folder
    • Right click and select Properties
    • Select C/C++ Build, and then select the Behavior tab
    • Modify the Build (Incremental Build) command line to specify the appropriate BSP name
  • Select Run:Run Configurations...
    • Select the Arguments tab and modify the "Program arguments:" command to list the appropriate BSP name
    • Select the Environment tab and create a new environment definition for the specified hardware by providing the DESK_IP_ADDR and IP address. Example:
variable = DESK_IP_ADDR_zcu102
value = 10.0.1.54

At this point, you can build and execute software on the hardware target. Use the Target Manager window to active the Ping, Load List Manager, Status Monitor, or Video Stream as needed.


Tips and Tricks

Quick Start

From a completely blank (empty) OA environment (i.e. the DDC-I Project Window is blank), you can quickly set up your OA projects by using the following steps:

  • File → New → DDC-I Deos Quickstart
  • Select the platform
  • Next*>
  • Select the examples you want
  • Finish

The above will populate your OA environment with the selected examples and hardware target.

DDC-I Console

The Console window provides detailed build information for modified source code (examples or deos source code). It is one of the primary mechanisms in debugging source code.

Here are some additional useful things to know about the console window:

  • Right click the tab and select "clear" to remove all current messages
  • Double click the tab name (DDC-I Console) to make it full screen. Double click it again to return it to its tiny original size.

OpenArbor Preferences

These are the personal preferences that I use for OA projects.

Transfer Your Preferences to Another Workspace

It is painful to go through an update your settings every time you create a new OA workspace. Here are the steps to create a new workspace and include your carefully selected preferences:

  • File:Switch Workspace:Other…
  • Enter the name of the new OA Project (C:\OpenArbor\workspace_newBlah)
  • Copy Settings
    • Select all 3 settings (Workbench Layout, Working Sets, Preferences)

Convert Tabs to Spaces

  • Window:Preferences:C/C++:Code Style:Formatter:Import (C:\Users\msygrove\Desktop\Work\marks_awesome_profile.xml)
  • Window:Preferences:General:Editors:Text Editors
    • Displayed tab width: 2
    • Insert spaces for tabs (check)

Improve Build Performance

  • Window:Preferences:DDCI
    • Check Enable parallelized builds
    • Number of simultaneous jobs: 4 (or whatever number of processor cores you have)

Improved Console Window (launched from OA)

  • Window : Preferences : Terminal : Local Terminal
    • Initial Working Directory: Eclipse Workspace
    • Add…
      • Name: Terminal Window
      • Path: /bin/bash
      • Arguments: -il

Dictionary/Spelling

  • Window: Preferences : General : Editors : Text Editors : Spelling
    • Select spelling engine to use: “C/C++ spelling engine”

Enable Dark Mode

  • Window:General:Preferences:Appearance:Theme:Dark

Additional Dark Mode Modifications

I don't like some of the Dark Mode color settings, so I also make the following updates:

  • Window:Preference:C/C++:Build:Console
    • Output text color: light gray
    • Information message text color: white
    • Background color: Set custom color = black
    • Background color for build errors: black
    • Background color for build warnings: black
    • Background color for build informational messages: black
  • Window:Preference:C/C++:Build:Makefile Editor
    • Keyword = orange
    • Macro reference = dirt
    • Others = light gray
  • Window:Preference:C/C++:Editor:Syntax Coloring
    • Comments = light gray
  • Window:Preference:C/C++:Editor:Mark Occurrences
    • Uncheck “Mark occurrences of the selected element in the current file”
  • Window:Preference:Run/Debug/Console
    • Background color = black

Launch A Terminal Window from OA

Many developers use OA with a separate linux/BASH (e.g. terminal) window. However, you can actually launch a terminal window from WITHIN OpenArbor.

Steps to launch a Terminal Window from within OA:

  • From your OA window, select the terminal icon along the top bar of icons (it is generally the 5th one from the left and looks like a monitor on a stubby stand).
    TIP:You can also launch a terminal icon using Control-Alt-Shift-t
  • Confirm the following selections:
    • Choose Terminal: Local Terminal
    • Encoding: Default (ISO-8859-1)
  • Select OK

Faster qemu-arm

All qemu targets have "less than ideal" timing and the expectation is that timing-dependent tests run on a qemu target will often fail. The preference is to use an actual hardware target.
For the qemu-arm, you can use the following approach (although you are advised to use actual hardware target instead):

  • From within OA
    • Select the “qemu-arm” project (in the DDC-I Project Window)
    • Right click, and select “properties”.
    • Select the “Deos” tab and then select the “Boot Image” tab
    • Enter the following bash command into the “Command:” box:

startqemu --qemu-args='-icount align=off,shift=0,sleep=off'

    • Select “Apply and Close”:
  • From a linux window:
    • Navigate to the /PROJECT/qemu-arm/output folder in your OpenArbor workspace
    • Enter the following command:
startqemu --qemu-args='-icount align=off,shift=0,sleep=off'