What is Mara ?

atmega8

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 :

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)

Revision 5 (2013-04-15)