This version of Astrobe is supported on Microsoft Windows 10 and Windows 11 with the Microsoft .NET Framework 4.x.
This is a summary of the new features and restrictions in Astrobe for Cortex-M0 compared to Astrobe for Cortex-M3.
Cortex-M0 Support
Astrobe for Cortex-M0 has a completely new code generator which allows you to target Cortex-M0 and M0+ devices using the 16-bit ARM Thumb instruction set.
Thumb code is upwards-compatible with the 16/32-bit ARM Thumb-2 instruction set so Astrobe for Cortex-M0 can also potentially be used to target Cortex-M3, M4 and M7 boards. Examples that can be compiled for the STM32L152 Cortex-M3 device are included.
Astrobe for Cortex-M0 is designed to be generally source code-compatible with Astrobe for Cortex-M3, M4, M7 and RISC5. Any differences are summarised below.
Project Menu
Disassemble Module
The Module Disassembler has been rewritten to disassemble the code after it has been generated not while it is being generated. The disassembly is now more accurate as it can show resolved internal backward and forward references.
Built-in Procedures
FILL
The built-in procedure FILL initialises every word in a record or an array variable v to the specified value x.
FILL(VAR v: <record or array type>; x: <word type>)
It is primarily designed to be used to simplify and optimised the code required to initialise complex data structures. An example of its use can be seen in the procedure InitHeader in the HCFiler library module HCDir.
SYSTEM Procedures
SYSTEM.ALIGN
PROCEDURE ALIGN()
ALIGN inserts a NOP instruction if necessary at the current code location to ensure that the next instruction is aligned on a word boundary.
SYSTEM.EMIT
PROCEDURE EMIT(instruction: INTEGER)
EMIT inserts the constant value instruction, which represents a 32-bit ARM Thumb-2 instruction, at the current code location.
SYSTEM.EMITH
PROCEDURE EMITH(instruction: INTEGER)
EMITH (EMIT Halfword) inserts the constant value instruction, which represents a 16-bit ARM Thumb instruction, at the current code location. A compilation error results if the value is not a valid 16-bit positive integer.
Oberon Language Extensions
ARRAY OF BYTE
An existing Oberon language extension allows a procedure with a formal parameter which is an array of bytes with a fixed size to accept actual parameters of any type, except POINTER, whose size is the same number of bytes.
The converse situation is now also catered for i.e. a procedure with a formal parameter of any type, except POINTER, can accept an actual parameter which is an array of bytes of the same size.
These extensions are primarily designed to simplify and optimise the code required for tasks such as de-serialising / serialising complex data structures for Input / Output operations. An example of its use, ByteArrays.mod, is included with the General examples supplied with Astrobe.
Dynamic Local Arrays
Dynamic local array variables are deprecated and have not been implemented for Cortex-M0.
Examples
All of the Cortex-M3 examples for the STM32L152 have been ported to Cortex-M0. In addition:
Info
Information about the configuration and status of the various clocks and PLL is included.
ByteArrays
A new example which shows how structured variables can be interpreted as arrays of bytes and vice versa.
Development Boards
Example source code and configuration files are included for use with the currently supported development boards. More Cortex-M0 microcontroller boards are planned for later.
Limitations
A few of the advanced features are only available in the Professional Edition of Astrobe for Cortex-M0. See the feature summary for more information.
The following limitations may be removed in future releases.
Number of parameters
The maximum number of parameters that can be passed to a procedure is eight due to the number of registers readily available. Some parameters, e.g. arrays and records, require two registers.
Leaf procedures
Leaf procedures can be used to disable runtime array index bounds checking at the procedure level. No other optimisation is performed.
Configuration
The Configuration option Line Numbers checkbox is disabled. The setting is always on.
Problems fixed
v8.1.1
- The Application Disassembler works properly with a wider range of code offsets
- The Traps module performs additional validation of traceback addresses to minimise spurious results.
- Corrected the OutHex procedure in the ByteArrays example.