wiki:Docs/825gen2/Dev/GettingStarted

Version 24 (modified by Don Wilson, 12 months ago) ( diff )

--

Getting started with 825 app development

825 app development is done in a preconfigured Linux virtual machine.

Be sure that a good deal of disk space is available for the virtual machine. The download is a 7-zip compressed archive that is over 17G.

The VMWare virtual machine can be downloaded from Teams:

After downloading the file use 7-zip to un-compress the virtual machine. The uncompressed VM is around 35G. During operation additional space will be needed.

Open the virtual machine using VMWare Workstation or VMWare Player.

Login with user password: new825

Toolbar at the bottom of the screen is configured with icons to open helpful programs for 825 development.

Fedora "Application Launcher"
Firefox Web Browser
Chromium Web Browser
Dolphin File Manager
KCalc Scientific Calculator
Konsole Terminal
Eclipse IDE (Integrated Development Environment)
825 Simulator
825 Simulator for debugging an app
Legacy 825 Simulator
Legacy 825 simulator for debugging an app
DB Browser for SQLite
MySQL Workbench
Meld Diff Viewer (Tool for comparing files or directories)
PuTTY terminal
Discover Software Center
GIMP (GNU Image Manipulation Program) Image Editor

The Eclipse IDE is used for developing 825 apps.

The "Project Explorer" shows existing projects in the current workspace.

These existing projects in the VM may be out of date. To update them make sure the VM is properly configured to have internet access.

Right-click on each project name, select "Team", and then "Update to HEAD". You may be prompted for login

Contact Cardinal for login to the server.

The projects with names starting "lib" are libraries that are used by apps. The most common library that is used for an 825 app is lib825ev.

A good way to learn is to view code, build and modify existing projects.

Build configurations

Right-click on a project and select "Build Configurations", "Set Active" to see possible build configurations.

For developing for new 825 use "Debug-ARM825". Debug builds often have additional diagnostic messages that are output to the terminal.

Right-click and select "Clean Project" to remove intermediate files and the executable for the selected project.

Right-click and select "Build Project" to compile and link all modules to create the executable for the selected project.

The GCC ARM 64-bit compiler compiles each source file and then the linker links the objects to create the executable file. In the above example the executable file is /srv/nfs/arm825_nand/apps/ids_dbg

The "File Manager" may be used to view this.

In this case use the change directory "cd" command to select the output directory. The "file" command can be used to provide information about an executable file.

ids_dbg: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, with debug_info, not stripped

Note the ARM aarch64 indicates the file is for 64-bit ARM architecture.

The file may be copied to the 825 using the scp command such as:

scp /srv/nfs/arm825_nand/apps/ids_dbg admin@10.1.0.176:/mnt/nand/apps/ids

However, it is often useful to not copy the file to the 825 every time. Instead the 825 can mount the VM drive with NFS so that the file can be run while still in the VM.

Connect to the 825 with ssh

ssh can be used from the terminal in the VM or if you have multiple monitors it can be convenient to use ssh from Windows powershell in another monitor.

First time for each session:

source test825 <ip address of VM>

The "source" command is used so that the test825 script runs in the current environment. This is helpful because after mounting to the NFS server the test825 script changes directory to the NFS directory. Without the source command test825 could not change directory for the current environment. The period character "." is a shortcut for source command.

For example:

. test825 10.1.5.157

(a space is necessary after the period)

Then from ssh into the 825 make sure appropriate directory is selected such as:

cd /mnt/nfs/arm825_nand/apps

Run the app

./ids_dbg

It is best to exit the app when done instead of Ctrl-C. If the app is terminated with Ctrl-C it may not cleanup and leave mainboard communications in an undesirable state.

It is sometimes also useful to run an app so that the shell prompt returns and other commands can be performed while the app is running. This can be achieved by adding the ampersand character such as:

./ids_dbg &

Be sure to exit the app before starting another app that does mainboard communications. Multiple apps doing mainboard communications could cause problems.

Attachments (27)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.