Version 29 (modified by 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.
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.
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.
Attachments (27)
- 825vmlogin.png (120.3 KB ) - added by 13 months ago.
- 825vmtoolbar.png (26.0 KB ) - added by 13 months ago.
- 825vmicon_applauncher.png (1.9 KB ) - added by 13 months ago.
- 825vmicon_calc.png (1.2 KB ) - added by 13 months ago.
- 825vmicon_chromium.png (1.9 KB ) - added by 13 months ago.
- 825vmicon_db_browser.png (2.4 KB ) - added by 13 months ago.
- 825vmicon_eclipse.png (1.5 KB ) - added by 13 months ago.
- 825vmicon_filemanager.png (1.4 KB ) - added by 13 months ago.
- 825vmicon_firefox.png (2.6 KB ) - added by 13 months ago.
- 825vmicon_gimp.png (2.2 KB ) - added by 13 months ago.
- 825vmicon_legacy_simulator.png (1.1 KB ) - added by 13 months ago.
- 825vmicon_legacy_simulator_debug.png (1.2 KB ) - added by 13 months ago.
- 825vmicon_meld.png (1.6 KB ) - added by 13 months ago.
- 825vmicon_mysql_workbench.png (2.4 KB ) - added by 13 months ago.
- 825vmicon_putty.png (1.7 KB ) - added by 13 months ago.
- 825vmicon_simulator.png (1.4 KB ) - added by 13 months ago.
- 825vmicon_softwarecenter.png (1.6 KB ) - added by 13 months ago.
- 825vmicon_terminal.png (1.3 KB ) - added by 13 months ago.
- 825vmicon_simulator_debug.png (1.0 KB ) - added by 13 months ago.
- 825vmeclipse_workspace.png (46.1 KB ) - added by 13 months ago.
- 825vmrepo_login.png (15.9 KB ) - added by 13 months ago.
- 825vmeclipse_build_configs.png (21.4 KB ) - added by 13 months ago.
- 825vmeclipse_build_finished.png (104.5 KB ) - added by 13 months ago.
- 825vmeclipse_build_finished2.png (47.8 KB ) - added by 13 months ago.
- 825vmeclipse_clean_finished.png (33.8 KB ) - added by 13 months ago.
- 825vmterminal_file_cmd.png (50.6 KB ) - added by 13 months ago.
- 825vmfilemanager_apps.png (42.1 KB ) - added by 13 months ago.
Download all attachments as: .zip