Skip to content

Portage of Oberon system to stm32f429i-disco board

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
license.txt
Notifications You must be signed in to change notification settings

ef15c/oberon_stm32f4

Repository files navigation

Oberon STM32F4

Portage of Oberon system to stm32f429i-disco board

Version 11 released!

MSP430:

add example MSPEXP430G2 "Out of the box".

Oberon System:

Add support of 64 bit integers in the candidate compiler OM4P2. LONGINT type is devoted to 64 bit signed integers and is no longer a synonym of INTEGER type.
Add a file comparison command System.CompareFiles.
System.Free command has been improved.
Add a Hash map module UTHash based on uthash from Troy D. Hanson.
Add a trace module SystemLog.
Add a fixed size font Mono10.Scn.Fnt
Correction of OM4A code generator and modules TextFrames and FontUtils
Add several 64 bit integer test programs based on Advent Of Code 2024

Starting wiht the release 9, it is now easy to launch user actions immediately after system startup. Put your code in the initialization section of the OnStartup module and compile it.

OberonMSP430compiler


QWERTY keyboard can be activated by middle clicking on the text "OM4P.Compile InputQwerty.Mod ~"
displayed in yellow in the middle of the System.Tool window. Restart the system to load the updated Input module.

System_Tool

OberonRunningR3

OberonRunningR2

Changes in oberon 07 compiler:

Registers usage control in procedures
Cortex M4 microcontrollers save automatically a set of registers on stack when servicing an interruption. If an Oberon exception handler contains too complicated expressions, there is a risk that a non saved register is used. To prevent that case to happen, I introduced a new notation ^n after the PROCEDURE keyword:

PROCEDURE^3 handler;
BEGIN ....
END handler;

With this information, the compiler can check that no more than n registers are used. The save/restoration instructions are automatically generated according to the declared number of used registers.

Unsafe local variables marking
This Oberon compiler allow allocation of unitialized pointers on stack. Those pointers are not checked at runtime, so they are not safe until they are properly intialized.

I made a change in the compiler to allow detection of the declaration of local variables containing pointers. The developer must check the code to be sure that no bad use is made with these variables.

For example, assume that a Files.Rider is declared as a local variable. Using of the "file" member (eg. via Files.Base) is unsafe until the rider has been initialized with Files.Set.

When the developer has determined that the code usage of the local variable is safe, he or she must mark the variable with an exclamation mark (!) in its declaration.

Oberon runs now on the STM32F429I-DISCO base board:

OberonRunning

Hardware side:

equippedBaseBoard

populatedBaseBoard