Hi All
I have successfully compiled one of the demo projects in James Lynch's tutorial package but am still waiting to receive the Olimex JTAG debugger. I have had to change for the ARM-USB-Tiny (rather than the ARM-USB-OCD) due to the fact that the local supplier has only the Tiny in stock and Olimex is on holiday until the beginning of September. Never mind - I don't expect any disadvantages with it.
Here is a guide as to
how to create a project in Eclipse for the uTasker. There are in fact different ways to do it (like importing all files to the Eclipse workspace) but this is the one that I prefer because it uses the project files directly -
one word of warning is that the project view in Eclipse is not a project view as in VisualStudio (which users' of the uTasker simulator know well) where the project folders are virtual folders and the files are those included in the project (their actual location can be anywhere), but this is the REAL FILE SYSTEM on your PC.
If you delete a file from the project it will be deleted from your hard disk, and not simply removed from the project!! You need to be a bit careful at the beginning but once you realise this you can use it as a sort of explorer to manipulate things on the hard drive.
1. Start Eclipe and set the working directory to anywher you would like it to be (this will be used as scratch pad and not for real project files).
2. File | New | Project...
Choose standard make C project
3. Enter the project name - such as "uTaskerV1.3" (without the quotes)
but uncheck "use default location" and set the uTasker directory as location. This will use the real directory directly rather than making a copy to the local workspace.
4. The further settings seem to be fine without any further configuration changes so click on "Finish" and the uTasker project will magically appear in the project view.
If you expand the project directory you will see that it contains all files and documents, etc. Don't worry that the project is going to build everything seen there because we will specify a make file to be used which defines the build details.
5. If you expand the sub-directories in the project view: Applications .. uTaskerV1.3 .. GNU_SAM7X the make file will be seen (it is called makefile and must have this name to work with Eclipse - as far as I can see).
Unless you have received a version of the project with GNU support from me directly (this is not yet included in the standard project and service packs) the GNU_SAM7X sub-directory will not be there. You can get a zipped version of this directory from the following link:
http://www.uTasker.com/software/SAM7X/GNU_YAGARTO.zip This also includes a startup file for use with GNN called startup_gnu.s and a development version of SAM7X.c. Place these in your directory \Hardware\SAM7X
To set this as the make file for building the project do the following:
In the make view (on the right hand side) expand the sub-directories again to the GNU_SAM7X directory and then right click your mouse.
Choose "Add make target" to make an 'all' build. This will allows a standard build, which will involve compiling only files which need to be compiled since they have either been modified or a header that they depend on has.
A green target will appear with the name 'all'
Then repeat but name the make taget 'clean' (make name and make target in the create dialog).
A second green target will appear with the name 'clean' and can be used to delete all objects in preparation for a re-build of the project.
6. Double click on the 'all' to build the uTasker project using the GNU compiler.
This will generate an S19 output and a binary output and show the size of the code and RAM use.
It also creates a project map file in the target directory Applications\uTaskerV1.3\GNU_SAM7X
The memory script file used for the build is called uTaskerV1.3.ld, also in the target directory.
Note that you may get a warning or two when compiling the standard project, which have been resolved in my working version. These are not serious warnings and just point out that parentheses could be used to help code clarity.
I don't know yet whether this build actually runs on the target - this will be the next thing to find out!
Good luck!!
Mark
Added note on 14.8.2007:
One small change to the standard Eclipse set up which I found useful was the following:
Initially changed files were not being saved when I compiled, and this can cause silly operator errors when not noticed (new build not including latest changes...).
So that modified files are automatically saved when rebuilding, the set up can be modified by opening
Windows | Preferences -> in Preferences dialog expand "General" and select "Workspace" then check "Save automatically before build".
Save this setting and then modified files are automatically saved when the project is built.