The MPE Forth 7 cross compiler for the ARM Cortex-M family consists of five portions which will have been installed for you.
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.
The mechanics of compilation are covered in the general cross-compiler manual, xc7man.pdf. This section covers how to launch the cross itself.
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
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
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.
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.
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:
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.