What is Mara ?
Mara is a programming language dedicated to 8bit ATMEL AVR microcontrollers with a focus on simplicity and productivity.
It provides to AVR architecture some features that high-level programming languages have introduced on 32/64 bits processors, such as classes and type inference.
Thus, the goal of this project is to simplify the programming of these microcontrollers for all those who do not wish to use (or learn) the C or assembly language.
Some features of Mara :
- Simple and structured syntax
- Type inference
- Classes and objects
- Explicit error messages
- Standard library containing usual data structures
- Inline assembler
- Finite-state machines
A simple Mara syntax example:
# fact.mr
begin lib
func fact_rec(n)
return n = 0 ? 1 : \
(n * fact_rec(n - 1))
end
func fact_it(n)
var a <- 1
for i <- 1 to n do
a ** i
done
return a
end
end
# main.mr
using fact
begin setup
PORTD.set_mode(0xFF)
PORTD.write(fact_it(3)) # print 6
end
begin loop
end
Changelog
Revision 8 (2013-04-29)
- Improved error messages
- Added term mode (including umara compiler and VM)
- AVR-GCC is now executed properly by marac
- Improved string parsing
- Improved standard library (EEPROM, string, ...)
- Fixed many bugs...
Revision 5 (2013-04-15)
- Added Finite-State Machine
- Improved compound assignment
- Added Website
- Removed all ocamlyacc reduce/shift conflicts
- Fixed many bugs