Table of Contents |
---|
...
|
...
|
Introduction
In this document we shall provide a basic overview of how to develop C# .NET applications for ATM on a Windows development machine. The following areas will be covered:
Configuring the development environment
Writing a demo console application
Deploying to ATM
Debugging
Prerequisites
You will need to download and install the following applications:
Xamarin Studio for Windows. This is called MonoDevelop on Linux and to alleviate any incompatibility issues, please download the Windows version from:
- http://www.npackd.org/p/monodevelop/5.10.1.6
At the time of writing the latest version of Xamarin Studio was incompatible with the pdb2mdb tool required later on so do not allow the IDE to upgrade
We will need the Putty SSH tools for automating some remote tasks such as copying files and running the remote debugger
Installing and Configuring the Tools
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 device. This is simply a matter of setting the variable MONODEVELOP_SDB_TEST to 1.
...
then follow the instructions to save the key.
Your First Linux C# Application
So now Xamarin Studio is installed lets use it to build a traditional HelloWorld application:
First create a new solution from the File menu or from the left hand shortcut pane
Choose Console Project using C#
Name your project 'HelloWorld' and select a Project folder if you prefer to change the default location
Click 'Create' and the project framework will be generated which will form our Hello World example as is.
Deploying and Debugging Your Application
You have two choices when it comes to debugging your application:
...
Note that the configuration below only needs done once per project
PDB to MDB Conversion
Before you can debug applications on Linux, you will need to convert the standard Windows debugging file format to a Mono compatible one. Specifically we are going to convert the .pdb file into a .mdb one.
...
You should end up with the following:
Configure the Remote Debugger
Remotely debugging your application on your ATM device involves the following:
...
These commands use Putty SSH client to send over the files then run a remote command to start the debugger on ATM. 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.
Running the Debugger
Now that everything is configured you can start your debugging session.
...