Installation

Prerequisites

Charm may be installed on any member of the RISC PC family including the ARMini and the RISC PC emulator (RPCEmu), and works with RISC OS 2 through 5. In case you have less than 5MB of free memory you will need to edit the !Charm !Boot file to reduce the memory allocated by wimpslot -next 5000K (500K is sufficient for most things except multiple large file edits)

If Charm is to be run on a RISC OS installation emulated under Windows or Linux, version 0.8.9 of RPCEmu can be installed from:

In my experience of testing with the emulator, the dynamic recompiler version is considerably faster and now as stable as the standard version, and I would  recommend using it.

In order to unpack the Charm zip download under RISC-OS you will need a copy of !SparkPlug. If you do not already have this, a free self extracting version (splug.bas) can be obtained from:

In order to install this, copy it to the root of the RISC OS hard drive, set its file type to Basic and double click on it. Once this has been installed, you may optionally also download  and  use the following extract only version of !SparkFS:

SFS142RO.zip SFS142RO.zip
Size : 341.36 Kb
Type : zip

Again, copy this to the root of the RISC OS hard drive. change its RISC OS file type to Zip or Archive using the file menu and extract it using the previously installed !SparkPlug application. Please note simply unzipping using Windows or Linux into the HostFS directory will lose all RISC OS file type associations and so the application will not run correctly.


Downloads

Charm is supplied under the conditions of the GNP GPLv3 license:

Please do not remove the GPL headers from the supplied source files, and add your name and contact details if modifying them. Refer to the license a copy of which is also included under the charm directory in the download for further information.

Download the following zip archive (set its RISC OS file type to Zip (a91) or Archive (ddcif zip is not recognised) and unpack the charm directory it contains into the root directory (or directory of your choice) of the RISC-OS hard drive (HostFS or ADFS) using either the !SparkPlug or the !SparkFS application.If you already have user projects in $.charm.user be sure to save these before replacing your old installation and to copy them back after. You will also need to recompile and link against the new libraries, and may need to make source code modifications to accommodate API changes. 

CharmV2.5.4.zip CharmV2.5.4.zip
Size : 1508.858 Kb
Type : zip

Further information about the author is available from: http://www.qu-bit.co.uk

Directories

The files for each Charm project are normally housed under a suitably named project directory e.g. edit for the Charm editor.

Charm uses the following disc sub-directories within a project directory  :-

  • src Compiler source files
  • arm Assembler source files
  • obj Compiler or assembler object files
  • lst Compiler or assembler list files

In the above diagram map is an optional text file containing program linkage information and program is either a RISC OS application or module file. The other boxes represent project sub-directories.

Charm source code files are held in the src directory.  These are read by the compiler and compiled into assembler source files which may be written into the arm directory.

Assembly source code files are held in the 
arm directory.  These are read by the assembler and assembled into object files which are written into the obj directory.  If a list file is requested, it is written into the lst directory.

Object files are held in the 
obj directory.  These are read by the linker and linked into programs.

As an optimisation, armc may (and usually does) invoke arma internally without the need for assembler source to  be created in files in the arm directory : 

Apart from the above sub-directories, the project directory usually contains a 'build file which tells the Charm shell which order to compile modules and the linker how to build the program.

You can use the supplied !NewProject utility to quickly create conforming skeleton user projects.Version 2.4 is the first 32 bit compatible Charm release, and such the recommendation is to install it under RISC OS 5 and StrongARM SA-110 or later, although it is backwards compatible with RISC OS 2, 3 and 4 running 26 bit ARM cores (e.g. ARM3).

If the Shift key is held down, Text and Obey files are loaded into the Charm editor (be sure to increase Applications Tasks Next before editing a large quantity of text to avoid heap exhaustion).

Those of you wishing to use third party editors such as !StrongEd and throwback must ensure the DDEUtils module is loaded (select Throwback option on main menu):

Setup


Run the !Charm application and drag source files, directories or !build files on to the Charm icon to build them. While a compilation, assembly or link is in progress, the Charm shell icon will change colour from blue to either yellow, red or green respectively. The Charm log window if displayed shows build progress.

User project directories are typically sub-directories under the top level user charm directory e.g. $.charm.user.MyProject already contains a simple project generated using the !NewProject application. It is however also possible to create Charm project directories anywhere on the same filing system, with the advantage that installing a new Charm release does not required the user to backup and restore existing user projects in order to retain them.

The following Charm system variables to point to directories in which common files are stored :-

  • Charm$Home      charm root installation directory
  • Charm$Path      same as above (allows charm: to be used as a filing system prefix)
  • Charm$Dir      charm home directory of !Charm application
  • Charm$AppsDir   charm applications directory
  • Charm$DemosDir  charm demos directory
  • Charm$Edit      the editor help file edithelp

Hard disc users are recommended to use the application versions of the Charm utilities.  The following aliases are required to run the utilities :-

  • Alias$Edit editor <Charm$AppsDir>.edit
  • Alias$Armc compiler <Charm$AppsDir>.armc
  • Alias$Arma assembler <Charm$AppsDir>.arma
  • Alias$Arml linker <Charm$AppsDir>.arml
  • Alias$Search search <Charm$AppsDir>.search

It is also possible to edit source files using the Charm editor by dragging them or their containing directories on to the Charm icon while holding down the Shift key.

In addition, It is possible to drag a selection of files and/or directories on to the Charm icon in order to compile, assemble or edit a group of files.

Contents

The following development utilities are provided in the installation archive :-

  • edit Source code editor
  • armc Charm high level language compiler
  • arma ARM assembler
  • arml Linker
  • search Search utility
  • !Charm Desktop shell

Both module and application versions are supplied except for the shell and search application.

Although the Charm utilities may be run from the command line, they are more simply executed from the desktop using the Charm shell with which they are integrated to provide build logging pop-up window error handling.

History

  • May  7th 2011 [V2.0  ] First GNU GPL release.
  • Jun 18th 2011 [V2.1  ] New Mandelbrot demo and compiler fix for local real assignments. 
  • Jul 15th 2011 [V2.2  ] Reorganised run time libraries into record trees.
  • Aug 21st 2011 [V2.3  ] Add new run time libraries and ARM assembler inlining.
  • Aug 25th 2011 [V2.3.1] Support drag and drop of directories and fix compiler issue.
  • Aug 31st 2011 [V2.3.2] Support larger stack based local variable arrays.
  • Sep  4th 2011 [V2.4  ] Backward compatible 32 bit release for RISC OS 5 and on.
  • Sep 10th 2011 [V2.4.1] Maintenance release for ARMini with working !Decapedes demo.
  • Sep 13th 2011 [V2.4.2] Fix heap error on creating new file.
  • Oct  2nd 2011 [V2.4.3] Convert !Decapedes demo to high resolution screen mode.
  • Oct 17th 2011 [V2.4.4] Improve Chinese Checkers demo play.
  • Nov 13th 2011 [V2.4.5] Add string to real library support.
  • Nov 26th 2011 [V2.4.6] Improve error handling.
  • Dec  1st 2011 [V2.4.7] Extra compiler checks and new project utility.
  • Dec 11th 2011 [V2.4.8] Allow local variable declarations anywhere in procedure.
  • Dec 21st 2011 [V2.4.9] Add string escape sequences and improve global register allocation.
  • Feb  5th 2012 [V2.5.0] Add module name spaces.
  • Feb 25th 2012 [V2.5.1] Add Charm shell command logging and popup error boxes.
  • Mar  9th 2012 [V2.5.2] Use braces to delimit Charm constructs.
  • Mar 18th 2012 [V2.5.3] Implement new and delete operators for records.
  • Apr 30th 2012 [V2.5.4] Use import and export for public declarations instead of include.

This free website was made using Yola.

No HTML skills required. Build your website in minutes.

Go to www.yola.com and sign up today!

Make a free website with Yola