wiki:Docs/825gen2/Dev/GettingStarted

Getting started with 825 app development

825 app development is done in a preconfigured Linux virtual machine. The virtual machine may be run in VMWare Workstation or Player on a Windows 10/11 PC.

Contact your Cardinal representative for download information. 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 30G.

After downloading the file use 7-zip to un-compress the virtual machine. The uncompressed VM will be more than 50G. 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

Utilities

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

The terminal is useful to run command line utilities within the VM.

The change directory "cd" command may be used 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 during development. Instead the 825 can mount the VM drive with NFS so that the 825 can run the file while it is 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.

Run the "test825" script such as "source test825 <ip address of VM> the first time for each session:

card825gen2:~$ source test825 10.1.0.70
Stopping card825 service
Exporting ... XDG_RUNTIME_DIR=/run/user/1001
Mounting nfs 10.1.0.70
/mnt/nfs/arm825_nand/apps
card825gen2:/mnt/nfs/arm825_nand/apps$

The "test825" script stops the current user session so that the 825 screen will blank.

The "source" command is used so that the test825 script runs within the current environment. This is necessary because the script has to setup some environment variables to allow apps that use the LCD screen to run from the command line.

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:

card825gen2:~$ . test825 10.1.0.70
Stopping card825 service
Exporting ... XDG_RUNTIME_DIR=/run/user/1001
Mounting nfs 10.1.0.70
/mnt/nfs/arm825_nand/apps
card825gen2:/mnt/nfs/arm825_nand/apps$

(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.

Desired changes may be made to the source code in Eclipse. Exit the app on the 825. Recompile the app in Eclipse, and then start the app again from the SSH command line. The NFS connection makes it easy to iterate making changes and testing.

Last modified 7 weeks ago Last modified on 09/26/24 08:43:38

Attachments (27)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.