This is the 3rd iteration of a development platform which I intend to use for my microcontroller development. Previous iterations have been successfully ported to ESP-8266 (Wemos D1 Mini) and a runtime for a subset of the language (Zopper) runs on a simple Z80 machine.
I've done a preview release of the development environment to let the language breathe a little and get some architectural input and refinements into the design of the language and the platform.
https://github.com/sillycowvalley/Hopper
Motivation and ChoicesWe have the Arduino development experience to thank for all this: using a real IDE for the last few decades with a first class debugging experience has motivated me to seek out a better development environment for microcontrollers.
In terms of language design, semi-colons and curly braces are an easy choice for me (C, C++, Java, JavaScript, C#..). Throw in managed memory like Java and C#, add some compound types (strings, dictionaries, arrays and lists) and it starts to look like a useful language.
So what is Hopper? Think of it as C# but without classes. For encapsulation we have units, which, along with how projects are structured - are tried and tested ideas I've borrowed from good old Turbo Pascal.
The runtime is a simple stack machine with 8-bit opcodes and 16-bit stack slots which makes porting to smaller platforms viable. The only non-Hopper code is the runtime - all the rest of the tools and platform, including the compiler, the editor and the shell are written in Hopper (all ~35,000 lines of Hopper source are browsable on GitHub).
TLDRHello World in the Hopper environment
Available TodayTwo runtimes are currently being maintained:
- a C version with 16 bit stack slots which is relatively easy to port to microcontrollers
- a C# version which takes full advantage of the Windows host machine for more efficient development on desktop machines
The C# version is the one currently available on GitHub and the repo includes:
- Windows runtime (delivered as a stand alone.NET exe)
- compiler and disassembler modules (with Hopper source code)
- IDE / Editor (Hopper source)
- command line console / shell (Hopper source)
- test suite (Hopper source)
- Zopper compiler which generates Z80 machine code (Hopper source)
- some Z80 firmware, drivers and runtime (Zopper source)
- Full source-level debugging experience (again.. 2nd iteration had this)
- Microcontroller port (again..) starting with ESP (then ARM)
- Remote development and debugging..
- Refresh Zopper subset for Z80 again..
Comments
Please log in or sign up to comment.