Menu

Home Log in to Edit

The AVR-Ada project provides the gcc based Ada compiler GNAT for the AVR 8-bit microcontrollers. This includes:
- the Ada compiler (GNAT) based on the existing AVR and Ada support in gcc
- a small Ada run time system and a useful AVR specific support library
- documentation and some sample programs

The project is now superseded by the Alire crates
- AVRAda_RTS
- AVRAda_MCU
- AVRAda_Lib
- AVRAda_Examples

Start with the examples and Alire will install everything else.

Screenshot thumbnail
AVR-Ada on Arduino
Screenshot thumbnail
AVR-Ada on butterfly

The documentation about AVR-Ada is grouped in different sections

  • Installation

    • Some notes about building the cross compiler. This is the only supported way from AVR-Ada 2.0 on.
  • Old installation support instructions (for AVR-Ada 1.2.2)

  • introductory notes for using AVR-Ada

  • some more advanced issues of using AVR-Ada

  • example projects and programs using AVR-Ada

    • [Echo] an incoming character at the UART (RS232) interface
    • LCD send output to a 16x2 character LCD
    • Running a Motor with Motorshield and Pulse Width Modulation (PWM)
    • Video about AVR-Ada running on Arduino to control a stepper motor
    • Alarm Clock using Arduino, DS1307, buzzer, and LCD
  • AVR Library. The typical built-in peripherals of the AVR microcontrollers are supported by the avrlib. We apply a typical coding style for these support packages. Application programs should have with and use clauses for the parent package AVR and have only with clauses and no use clauses for the support packages. That results in calls like UART.Init or Timer2.Stop.

  • Libraries for External Peripherals and Utilities Provided by AVR-Ada

    • [OwireLib] library for searching and accessing Dallas' 1-Wire sensors and components
    • [Sensirion] library for accessing the Sensirion temperature and humidity sensors
    • [HD44780Lib] library for displaying information on text LCDs based on HD44780 controlers
    • [Debug] library for writing debug messages to the serial interface
    • [Fatfs] library that implements FAT16/32 for SD/MMC cards
    • [CRC] libraries for generating CRC8 and CRC16 values
    • [slip] protocol library for packetized I/O over streams like asynchronous serial links
    • [MCP4922] SPI support for the MCP4922 DAC chip
    • [MIDI] MIDI support for any byte stream
  • status of the development of AVR-Ada itself

  • related projects

    • Adacore provided their own version of AVR cross compiler hosted on Windows in 2011 and 2012. See the [comparison] between the two projects. For the time being don't mix Adacore's AVR compiler with AVR-Ada (unless you really know what you are doing).
    • An interesting paper explains the various difficulties and solutions for Ada on AVR.
    • An alternative way of using AVR-Ada.
    • RTEMS always supported Ada and has AVR support also since several years. Now they have a page how to use AVRTest with AVR-Ada.
    • Brian created a similar project for supporting the MSP430 chips. His project has a similar approach. We both enjoy mutually the other's experience.

Project Admins:


Related

Wiki: ADC
Wiki: CRC
Wiki: Debug
Wiki: Delays
Wiki: EEprom
Wiki: Echo
Wiki: Fatfs
Wiki: HD44780Lib
Wiki: InstallRunTimeSystem
Wiki: Interrupts
Wiki: MCP4922
Wiki: MIDI
Wiki: News
Wiki: Programspace
Wiki: Setup
Wiki: SimpleIO
Wiki: Status
Wiki: Strings
Wiki: Text_and_Numerical_IO
Wiki: Timer
Wiki: UART
Wiki: comparison