Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this document we shall provide a basic overview of how to develop C# .NET applications for ATM ATDM on a Windows development machine. The following areas will be covered:

  • Configuring the development environment

  • Writing a demo console application

  • Deploying to ATMto ATDM

  • Debugging

Prerequisites

You will need to download and install the following applications:

...

Run the installer to install Xamarin. Once this is done you need to configure the environment to support remote debugging so you can debug applications running on your ATM ATDM device. This is simply a matter of setting the variable MONODEVELOP_SDB_TEST to 1.

...

You will need to run putty manually to set up the ssh key for the connection to your ATM ATDM device. Run 'cmd' from the Start menu and type:

...

  1. Debug the application locally on your development machine
  2. Remote debug your application on your ATM ATDM device

Using method 1 is fine if your application is generic enough and doesn't use ATM ATDM specific hardware or drivers however in most cases you will want to run your application directly on the ATM ATDM hardware. Debugging locally is simply a matter of running the application from the 'Run' menu or by pressing the 'Run' button on the toolbar. Debugging remotely requires some setup which is explained in the following section.

...

Remotely debugging your application on your ATM ATDM device involves the following:

...

  • Right click on the project from the solution explorer

  • Click 'Custom Commands' under 'Run'

  • Select 'Before Execute' from the 'Select a project operation' menu

  • Add the following command:

    • pscp -scp "${TargetDir}\*" root@192.168.1.100:~/

    • Replace the IP address with that of your ATM device

  • Now add a new 'Before Execute' command:

    • plink -ssh root@192.168.1.100 "export DISPLAY=:0; mono --debug --debugger-agent=transport=dt_socket,address=0.0.0.0:2,server=y ${TargetName} > /dev/ttymxc3 &"

    • Replace the IP with that of your ATM ATDM device and replace 2 with the port you wish to use.

...

These commands use Putty SSH client to send over the files then run a remote command to start the debugger on ATM ATDM . The 'export DISPLAY=:0' allows GUI based apps to be run remotely and can be omitted if you are not running a GUI based app. Console based apps have their output redirected to the debug terminal with "> /dev/ttymxc3" so you can watch the output from your application as it occurs.

...