You can now add up to ten new menu commands of your own choice to the Astrobe Tools Menu. These can be used to launch a Windows application, a command-line console application or a DOS command.
You can include the following context-sensitive parameters in the commands:
They are substituted with values corresponding to the file currently showing in the editor.
You can also use the parameter
as the working folder or parameter for the command. The name of the folder where the Astrobe configuration files, library modules and examples are located is substituted when the command is executed. This is the folder which you specified when you installed Astrobe e.g.
You can create new menu items by editing a Tools.ini text file which is located with the configuration files in the Astrobe Configs folder. The ini file supplied with Astrobe includes three commands:
Open Containing Folder ...
Open Examples Folder ...
View Map File
These commands perform the following functions:
The bitfield extract and insert procedures BFX and BFI are predefined procedures which generate efficient inline code for common shift and mask operations. They are replacements for SYSTEM.UBFX and SYSTEM.BFI. For example:
SYSTEM.UBFX(bitfield, word, msb, lsb);
SYSTEM.BFI(word, msb, lsb, bitfield);
should now be written as:
bitfield := BFX(word, msb, lsb);
BFI(word, msb, lsb, bitfield);
The latest version of the Oberon Language Report is dated May 2016. A copy of the report is included in the Astrobe distribution.
The internal format of symbol files has been changed to remove some of the restrictions on imported items:
The following language rules are now verified:
SYSTEM.VAL can be used to typecast REALs to INTEGERs.
INTEGERs and BYTEs are already assignment compatible with each other so ORD is not required.
SET items can be typecast to INTEGER using ORD before shifting and typecast back to SET using BITS after shifting.
The following are implementation restrictions:
Pointer types declared in an external module can only be extended in a client module if they point to a named record.
Pointers to anonymous records cannot reference themselves.
Anonymous records should be declared as named types instead to avoid these problems and ensure compatibility with Project Oberon.
For example, if B imports A, and C imports both A and B, then A must appear before B in C's IMPORT list. If it does not, the error is detected and reported with a compiler error message.
Library Pathnames are used by Astrobe to search for dependent module files when compiling, building and linking applications. The number of these pathnames that you can define for each application has been increased from five to ten.
The foldername parameter
%AstrobeM4% has replaced the parameter
%astrobe% to allow for several different versions of Astrobe to co-exist on a single PC. It is substituted with the name of the folder where the Astrobe configuration files, library modules and examples are located. This is the folder which you specified when you installed Astrobe for Cortex-M4 e.g.
A new Auto Reset checkbox appears when UART0 is selected for the Upload Type configuration option. The checkbox controls whether or not the MCU is automatically reset whenever an upload to the device via the UART is completed. The default value is On which is consistent with the behaviour of previous versions of Astrobe. Clear this checkbox if you prefer to manually reset the MCU with the Astrobe Terminal Reset button.
The following Cortex-M4 microcontrollers from STMicroelectronics are now supported:
New library modules and examples that target these devices are included:
The corresponding Nucleo-32, Nucleo-64 and Nucleo-144 development boards from STMicroelectronics which use these microcontrollers have been added to our list of supported boards.
The error codes used in ASSERT statements in the library modules have been rationalised and are now referenced by named constants. These are defined in the Error library module e.g. Error.timeout. Each error code is associated with an error message that is displayed when the assertion is handled by the Traps module.
The common modules HCDrive, HCDir and HCFiles used by HCFiler, the SDHC Filesystem, are now included with the General library modules.
A ASSERT statement with a code in the range 200 .. 255 can now be assigned a user-defined trap handler. A new example, UserTraps, shows how it can be used.
The new Bits module can be used to perform bitwise operations on INTEGERs.
The size of the array Reserved which is declared in LinkOptions for use with NXP IAP functions has been reduced to 32 bytes because the remainder is allocated from the stack.
An identical implementation of the LinkOptions module is now common to all Cortex-M4 MCUs to simplify the linking process. The declaration can be commented out or removed if you do not use the NXP IAP functions.
The STM32 library modules have been reworked for greater consistency to make it easier to develop applications for multiple targets.
A single SPI module for each target microcontroller is now used for all examples. e.g. HCFiler now uses the standard Astrobe library SPI module.
All transfers are assumed to be 8 bits. The nBits parameter has been removed from SPI.Init whose signature is now:
PROCEDURE Init*(bus: INTEGER; ConfigurePins: ConfigurePinsProc);
The length parameter is no longer required on the SPI Send and Receive functions for STM32 targets. The number of bytes transferred by these functions will correspond to the size in bytes of the variable that is passed as a parameter.
The unreferenced MCU module has been removed from the import list.
The GPIO module is now located in the General library folder.
The Main and MCU modules all configure the HSE oscillator, PLL, AHB and APB clocks in a similar way to the corresponding STM32 modules in Astrobe for Cortex-M3 and Cortex-M7.
Subscribe to the Cortex-M4 Source code examples of the Astrobe forum to receive notification of the availability of new source code examples.