User`s guide

www.uTasker.com
µ
Tasker – AT91SAM7X Tutorial
V1.4
uTaskerV1.4_SAM7X.doc/0.03 4/36 31.07.2009
2. Getting Started
You are probably itching to see something in action and so why hang around. Let’s start with
something that will already impress you and your friends – no simple and basically useless
demo which blinks an LED in a forever loop but something seriously professional and for real
life projects very handy.
First I will assume that you have VisualStudio installed on your PC since we will first simulate
everything – but don’t worry, we are not going to see something attempting to interpret the
instructions of the processor and requiring 2 minutes to simulate a couple of seconds of the
application, instead we will see your PC operating in “real time” as the target processor. Your
PC will not realise that the processor is simulated and so when you try contacting it by
pinging it or browsing to it with your web browser, we will see that your PC will sends IP
frames to the network and will see answers on the network from the simulated device. Other
PCs or IP enabled embedded devices on the network (as well as further simulated devices)
will also be able to communicate with this simulated device. You can also capture the frames
using a sniffer tool (we will use Wireshark) for further analysis and playback…. Getting
excited? In a few minutes you will see it in action!
If you haven’t VisualStudio (6.0 or newer) then there are trial versions and the free Express
version [http://msdn.microsoft.com/vstudio/products/trial/or
http://www.microsoft.com/express/] and you can probably pick up a 6.0 version for
very little cash on Ebay. VS 6.0 is adequate for our work as are the Express editions. It contains a
world class C-compiler and editor as well as loads of other tools which make it a must, even for
embedded work.
The simulator requires also WinPCap to be installed (from http://www.winpcap.org) which is
an industry-standard tool for link-layer network access in Windows environments. It is also
used by the network sniffer Wireshark, which every Ethernet designer really should have.
Therefore it is simplest to install Wireshark since this includes WinPCap, saving a step, and
making for simplest installation. Wireshark can be downloaded from
http://www.wireshark.org/ and is discussed towards the end of the document.
If you don’t want to see the simulator in action – which would be a big mistake as you will
miss the opportunity to save many hours of your own project time later – there is target code
which can be loaded to the target and will also run. This is also detailed later on in the
tutorial.
You will find that the simulator is useful for most real embedded work. First, it allows testing
things which you may not already have available as hardware (even if you have no
evaluation board and cross compiler for it yet, you can start writing and testing your code) – it
will allow you to use a matrix keyboard, LCDs, I
2
C EEPROM or SPI FLASH (and more)
connected to the virtual target without having to get your soldering iron out to connect it. And
it is so accurate that you can then cross compile to the target and it will (almost certainly)
work there as well. This is the last time I will say it … don’t make the BIG MISTAKE of
taking a short cut when starting and diving into coding on the target. If you are an
embedded SW professional you will be missing the chance of saving enough time in a year
for a couple of months extra vacation. If you are a hobby user, you will be missing the
change to get out more…!
So...