Microsoft eMbedded Visual C++
File -> New...
Project namee.g. qc_demo
Locationas the project folder. You can change this location path if you want.
Create new workspace
Win32 (WCE x86)
OKto New Project Information
This will have created a directory way down its hierarchy where
your project files are kept as defined in
Location above. It
is likely to be something like:
C:\Program Files\Microsoft eMbedded Tools\Common\EVC\MyProjects\qc_demo
Files can be created in situ in that directory by means of:
File -> New...
For any pre-existing files, either demo files or source created elsewhere, the simplest way to proceed is to copy them into this directory and then explicitly adding them one by one to the project by performing:
Project -> Add to Project -> Files...
This also applies to any object files such as the QuickCam driver that
need to be linked in to create an executable. You can verify that
files have been added to the project by expanding the hierarchy in the
FileView window. Files can be opened for editing by
double clicking the file name in that display.
A file can be removed from a project by selecting it in the FileView
window and then pressing the
Delete key. It should
disappear from the hierarchy.
Before you build your project you must configure the compiler to use the correct download protocol. You will probably only have to do this once, or you may even find that it has been done. However, you should check.
Configure Platform Manager...
ARCH1PLATFORM (Default Device)
Properties...button and in the
Device Propertiesdialogue box select
PPP Transport for Windows CE
Advancedbutton and select
OKbuttons (three times) to return to Visual Tools workspace
The compiler is now ready to build your project. When the build is complete
the the project executable file will be automatically downloaded to your
target system - the Arcom MediaGX board. If for any reason you you do not
want to download the executable after compilation you can turn this feature
off from the
To build your project i.e. compile and link it, and download the executable to the Arcom board, do:
The progress of this step is monitored in the bottom window. Any errors are reported there.
The first time a build is done, the download sequence starts by displaying a `Connecting to the device' window overlaid with a `Manual Server - Action' window. This gives you a command line finishing with four hex numbers that have to be typed in to an MS-DOS command window at the Arcom board end (see below). This process should not need to be repeated unless the host PC or the Arcom board has been rebooted.
This requires a certain amount of messy setting up before the Build process can proceed with the downloading. Proceed as follows:
Direct Cable Connectionicon on the desktop.
Make New Connection
Serial Cable on COM1:N.B. COM1: !!
File -> Closeto return to the Windows directory
cemgrc /T:TLPPP.DLL /D:xxxx
File -> Closeand up a directory level to get back to the `My Computer' directory. An icon representing the downloaded application should have appeared.
Here is a demo application program which writes a few characters of text to serial port COM2: each time the left button on the mouse is pressed: serial.c
It uses a thread to handle the comms and a semaphore to synchronise the thread with button presses.