RISCOS.com

www.riscos.com Technical Support:
DDE (Desktop Development Environment)

 


Working with desktop tools


This chapter provides an overview of the most productive way to work with the desktop tools to produce your programs. The chapter Installing Acorn C/C++ describes how to prepare your working environment.

Desktop tools

Acorn C/C++ includes the following tools:

  • DDT - A windowed debugger for debugging any executable image file, including the !RunImage file of a RISC OS application. DDT presents a windowed interface with RISC OS style controls.

Note that as DDT has to be capable of stopping RISC OS dead at any point in a program, for breakpoints, single stepping, etc, it cannot multitask under the RISC OS desktop.

  • Make - A desktop application for constructing programs under the management of 'recipes' stored in Makefiles. Various types of Makefile can be rapidly constructed using the desktop controls of Make, as well as being executed. This facility for constructing Makefiles is known as 'project management' on some programming systems for other types of computer.
  • SrcEdit - A text editor derived from Edit with many features for constructing program sources and other text files.
  • AMU - A compact alternative to Make for using, but not constructing, Makefiles.
  • DecAOF - A utility for examining AOF files output by language compilers or assemblers.
  • Diff - A text file comparison tool.
  • Find - A tool for finding text patterns in the names or contents of sets of files.
  • Link - A tool for constructing usable relocatable modules, program files, etc., from object files produced by language compilers and assemblers.
  • LibFile - A utility for constructing linkable library files storing general purpose routines for re-use in more than one program.
  • ObjSize - A utility to measure object file size.
  • Squeeze - A tool which compacts finished program images so that they occupy much less disc space and load faster.

Each of the tools listed above is described in more detail in its own chapter later in this volume. The language specific tools are described in the language user guides accompanying this manual.

As well as performing individual tasks, several of the desktop tools cooperate in ways designed to enhance your productivity. An example of this is throwback. When a language compiler or assembler detects an error in a program source file, it can cause throwback - opening a SrcEdit window for immediate correction of the offending program line. Another example of cooperation is the ability to drag an output file from one desktop tool to the input of another appropriate desktop tool.

Interactive and non-interactive tools

The desktop tools are divided into two categories - interactive and non-interactive. The non-interactive tools are those that have options set and then are run, without any further interaction with you until the task completes or is halted. The interactive tools are those that operate with constant interaction with you, such as the source editor SrcEdit.

In the list of tools above, the first three (DDT, Make and SrcEdit) are interactive tools, and the rest are all non-interactive. The chapters describing each tool are organised into parts of this manual describing each category of tool. The non-interactive tools all have similar user interfaces, and the features common to all of them are described in the General features.

Entering filenames

Many of the desktop tools require you to specify file or directory names. The interactive tools each have file types that they 'own', which you can double click on in directory displays to start activities. These are:

  • DebugAIF - execution of one starts a DDT session. Files of this type are displayed in directory displays with the icon:

    WORKING-2.PNG

  • Makefile - double clicking on one loads it into Make (and may start a Make job). Files of the type Makefile are displayed in directory displays with the icon:

    WORKING-3.PNG

  • Text - double clicking on one starts a SrcEdit edit.

None of the non-interactive desktop tools own a file type. Input files are specified to these tools by dragging them to their icon bar icons from a directory display or by typing their names into a writable icon in a dialogue box or menu field. When typing filenames into a writable icon, enter absolute filenames such as:

adfs::dharris.$.AcornC_C++.Examples.!TboxCalc.o.Main

To reduce the amount of typing required, any writable icon on a dialogue box that accepts a filename or directory name can be set by dragging a filename from a directory display to it. For example, dragging a filename from a directory display to the Files writable icon on the Link SetUp dialogue box adds it to the list of input files already specified:

WORKING-4.PNG

Many program source files and Makefiles contain filenames, for example in an assembler program line such as:

GET ^.h.SWINames

RISC OS provides only one current directory, but many tasks (such as assembly processes) can be multitasking, running at the same time. Thus the concept of work directory is used in Acorn C/C++. This can be considered rather like a current directory for each task, and file searching is performed relative to this. See the section on each tool to see the way the work directory is set and used by that tool. Most of the simpler tools do not require a work directory.

Working styles

The desktop tools support two main styles of working - managed and unmanaged development. These differ only in the way you construct your finished programs from sources, not the way you write or debug them, and you can mix and match the two styles as you wish.

Managed development makes use of Makefiles to manage the construction of your finished programs. A Makefile is a 'recipe' for processing your sources and linking the object files produced to form the usable program. The tools Make and AMU can both execute the commands in a Makefile running other tools to perform a make job. The tool Make also constructs Makefiles for you, avoiding the need for you to understand their syntax, and making it quick and easy to do this. The main advantages of managed development are: timestamps of files are examined during a make job and no unnecessary reprocessing of unaltered program sources is performed; programs are constructed consistently, following the same recipe each time, even when run by different people. These advantages make managed development the best style for the development of larger programs with source split into several source files.

Unmanaged development makes use of each individual tool directly to process the files as required to construct your programs. This can offer the quickest way of constructing small programs.

When Booting for unmanaged development you have to load each tool that you wish to use, but when Booting for managed development you only need to load Make (or AMU).

When working in either style, it is recommended you place each program project in a separate subdirectory, in the same way that the program examples are arranged. You can place the source, header and object files in suitable subdirectories of the project directory. See the accompanying language specific manuals for more details of subdirectory conventions. Source may be placed elsewhere, but this can make it more difficult to rename or move whole projects to other directories or filing systems.

Where to go from here

If you have studied this chapter in detail you now understand how to construct a simple runnable program from text sources. You may now wish to load various desktop tools and experiment with their use, and there are further chapters that may provide useful general information.

Each desktop tool, such as the text editor SrcEdit and debugger DDT, has a chapter describing it, either in this user guide or in one of the accompanying manuals. If you intend to make much use of any particular tool, its chapter may prove useful reading next.

A large number of the desktop tools are classified as 'non-interactive', and have similar interfaces. The General features covers the interface features of this class of tool.

This edition Copyright © 3QD Developments Ltd 2015
Last Edit: Tue,03 Nov 2015