There are some essential tools that any developer will require. These include a compiler, a linker and an editor. All of these tools together are known as the toolchain.
Syllable uses a combination of the familiar GNU toolchain along with its own powerful and easy to use editors and applications. The GNU toolchain includes GCC, BinUtils, GDB, GNU Make and the GNU AutoTools (AutoMake and AutoConf).
On Syllable these tools are combined to create several packs. The Developer's Delight pack contains the essential GNU tools, as well as tools such as the Concurrent Versioning System (CVS), DoxyGen, SPLint and CScope. The Developer's Delight pack also contains Builder, a Syllable application that can build and pack software.
Depending on your goals, you may also need to install the other packs. The Perl Pit pack contains the Perl scripting language and the GNU
AutoTools that are necessary for reconfiguring ported software.
Installing these packs is simple. First, you must log in as the root user. Then unzip the pack and run the install.sh script which will install the individual packages for you:
The Perl Pit and other collection packs can be installed in the same way.
You can verify the installation if you wish:
Syllable has several different editors and an Integrated Development Environment (IDE) available.
Syllable has its own IDE called sIDE. sIDE includes a programmers editor (Sourcery) and a GUI editor (Layout Editor).
sIDE keeps your project files organised for you, and comes with various "templates" for different types of Syllable applications, including GUI and CLI based applications in C++ and C. sIDE can also create projects that use Layout Editor.
Sourcery has been designed for developers and its features include line numbering, syntax highlighting, code folding and automatic indenting. Sourcery is the default editor for use with sIDE, or you can use Sourcery without sIDE if you prefer.
Layout Editor makes it easy to design the GUI for your application. It has a preview window that shows you what your GUI looks like as you make changes within Layout Editor, from which it will automatically generate the C++ code that creates and displays the GUI at run time. Using Layout Editor saves you the hassle of having to manually layout the GUI and can significantly speed up development time. If you prefer you can create an sIDE project without using Layout Editor.
AEdit is the default text editor that comes with Syllable. It is not a full-featured programmers editor. If you prefer a simpler editor than Sourcery, AEdit may suit you.
Although an old version of XEMacs (19.34) was once available for Syllable, it no longer runs on newer releases. There is no port of EMacs currently available for Syllable.
If none of the above are what you are looking for in an editor, you may find something else in the Builder recipes.
There are several tools and techniques you can use to debug your software.
The GNU debugger (GDB) is a well known debugger. If you have developed on other systems such as Linux or *BSD then you may have already used GDB, or a similiar Unix debugger.
GDB on Syllable currently only supports real-time debugging, as crashed applications do not generate a "core" file (crash dump). Real-time debugging using GDB on Syllable is fairly complete, although some support for multi-threaded applications has not yet been implemented.
GDB is a powerful dubugging tool, so unless you are already familiar with it you should read the GDB manual. GDB is included in the Developer's Delight pack.
STrace allows you to see what system calls your application is making, as it runs. This can be very useful for understanding what is happening "under the hood" of your application, and can also help with profiling. You can trace an application that is already running, or start an application under the control of STrace.
STrace is very simple to use. It's options are:
|-o||Switch tracing "On"|
|-f||Switch tracing "Off"|
syscall groups to include in the trace. The groups are: |
|-e||Exclude a given syscall from tracing. The syscall can be given by name, e.g. -e lock_semaphore will exclude all calls to lock_semaphore() from the trace.|
|-i||Include the given syscall. The oposite of -e.|
|-t||The thread ID (TID) to trace. You can use this to begin tracing an application that is already running.|
|-r||Run an application with the supplied tracing arguments. You must specify the full path to the application you wish to run.|
As an example, let's say you wanted to trace thread #41 and see what I/O and process syscalls it was making:
As a real example, let's trace a simple "Hello World" application:
This produces the following trace:
As the application is traced the syscall information is printed by the kernel debugger. You can watch the trace happening by watching the kernel log.
The Syllable kernel includes a simple, but very useful, kernel debugger. While Syllable is running, the output from the kernel debugger is written to the "kernel log". The kernel log file is /var/log/kernel.
It is a simple matter of using the tail command to read the kernel log as it is being written by the kernel debugger:
This will display the kernel log in the terminal. This can be used to watch the output produced as you use STrace, but the kernel can also provide useful debugging information of its own. If an application crashes the kernel will produce a "stack trace" that shows the processor registers, memory area information and a backtrace of the functions that were called upto the point of the crash.
The following example application will cause a segmentation fault:
If we compile and run this application it will crash with a segmentation fault. The following output is produced in the kernel log:
The kernel log can be a very powerful debugging tool once you are familiar with it.
Builder is a powerful application for Syllable developers that can be used to build both third-party applications and Syllable itself, from source code. To do this, Builder uses "recipes" which tell it what steps are required to download, unpack, patch, configure, build, test, install, register and package the software on Syllable.
Using Builder is incredibly easy. From a Terminal you simply run build <recipe>, and Builder will do the rest. You can then run build install <recipe> to install the new software. An example of building GNU Gettext is:
Builder is intended as a developer tool only and will not attempt to perform any dependendency management for you, so you should not use it to attempt to upgrade individual system components. You may also find that many of the packages or libraries you require are already available as binaries from the Syllable resource package downloads.
If you are porting software to Syllable, you are strongly encouraged to write a suitable Builder recipe for it. This makes it much easier to maintain and upgrade the software. There are a large number of existing recipes already available, and the skeleton recipe details every option currently available.