Introduction

What you get

The MPE Forth 7 cross compiler for the ARM Cortex-M family consists of five portions which will have been installed for you.

  1. AIDE front end (Windows only).
  2. Forth 7 cross compiler for ARM and Cortex-M0/M1/M3/M4/M7.
  3. Standalone Forth source code and configuration files. Note that ARM Forth Stamp compilers do not include the PowerFile target file system, PowerView GUI, PID loop controller and state machine compiler. The Stamp compiler is restricted to 120k of code space and 64k of RAM, and configurations and device drivers are only supplied for the following CPU families: NXP LPC21xx; NXP LPC17xx; Freescale Kinetis; ST STM32F4xx.
  4. Umbilical Forth source code and configuration files. The best reference for the target code is to read it yourself.
  5. Support tools - MAKE utility, Intel Hex and Motorola S-record converters plus a range of additional tools. See the TOOLS folder.

The Docs folder contains the cross compiler and CPU specific manuals. This folder also contains CPU and chip documentation, so browse it to see what is there. The Cortex/Manual folder contains a manual for the Cortex-specific target code. The Common/Manual folder contains a manual for common high-level target code used by all CPU targets.

Many folders contain release notes in files called Release.xxx.txt. These contain a change history.

Running the compiler

The mechanics of compilation are covered in the general cross-compiler manual, xc7man.pdf. This section covers how to launch the cross itself.

Package and binary naming

The compilers are named according to the pattern below. They can be found in the <target>/Compiler directory. Under macOS and Linux, there will be copies in the /usr/local/bin directory.


x<target>_<cpu>_<os>[.<bin>]

<target> = CPU for which the cross-compiler produces code, e.g.
           ArmCortex
           MSP430
           x86
           x64

<cpu>    = x86     32 bit Intel - host operating system CPU
           x64     64 bit AMD/Intel
           arm     32 bit ARM
           aa64    64 bit ARM

<os>     = win     Windows 32/64 - host operating system
           lin     Linux 32/64
           mac     OS/X and macOS 32/64

<bin>    = exe     Windows 32/64 - host operating system file type
           elf     ELF 32/64, e.g. Linux
           mo      Mach O for Mac OS/X

Under macOS and Linux, the installation script will produce a link of the form

  x<target>

The links are the recommended way to run the compiler. Under Linux and OS/X, the links are symlinks in the /usr/local/bin directory. Under Windows (must be 7+) these are symlinks in Windows\System32, e.g.

  mklink xArmCortex.exe x:\buildkit.dev\software\COMPILER\xArmCortexHfp_x86_win.exe

Launching the compiler

At launch time, the cross-compiler is a normal Forth system. When it executes the word CROSS-COMPILE, it "pulls down the shutters" and reconfigures itself as a cross-compiler. When you run the cross-compiler you can pass Forth commands on the command line, e.g.

  xArmCortex  include MyControlFile.ctl

Downloading the target image

If the board you are using does not have a pre-installed Forth kernel, you will have to program the image produced by the cross compiler using a suitable bootloader or JTAG unit.

Most ARM and Cortex targets supported by MPE include a utility word REFLASH ( -- ), which will download a new image into the target and reboot the board. The REFLASH tools are documented in the target code manuals.

The Segger JLink tools are supported for Flash programming and debugging. See the separate chapter for more details.

Supported Cortex CPUs and hardware

The Cortex family of CPUs is supplied by a large number of silicon vendors. The target code will run on any of the CPUs, and there are UART and timer drivers for several versions. Look in the Cortex/Drivers and Cortex/Hardware folders to see if your Cortex hardware is already supported.

The standard hardware boards supported by this compiler are:

Support for the following devices is planned or in preparation.

Supported ARM CPUs and hardware.

The ARM family of CPUs is supplied by a large number of silicon vendors. The target code will run on any of the CPUs, and there are UART and timer drivers for several versions. Look in the ARM/Drivers and ARM/Hardware folders to see if your ARM7/9 hardware is already supported.

The standard hardware boards supported by this compiler are:

New targets

MPE has ported the Forth system to a much wider range of ARM CPUs than the ones mentioned above, so look in the ARM/Hardware and Cortex/Hardware folders to see if your hardware is already supported.

MPE can provide assistance with board installations and drivers for new devices.