This webinar showcases advancements in Ada and Spark technologies alongside presentations of several capstone projects from the academic community. Adore provides updates on new tools like Alire 2.0, GNAT Studio, VS Code plugins, and GNAT FSF 14, highlighting language evolutions and improved development workflows. Subsequent student presentations delve into diverse applications of Ada, including an autonomous de-mining robot for humanitarian aid, an open-source bare-metal microcontroller bootloader, a bare-metal implementation of the RINA network stack, an Ada-native machine learning engine, an embedded Flexbox UI framework, and a bare-metal implementation of the MIN communication protocol. The projects emphasize Ada's capabilities in critical, low-level, and embedded systems, demonstrating its reliability, efficiency, and safety features in practical, real-world scenarios.
0:01 Introduction & Webinar Overview: Olivier Le Gap welcomes attendees to a webinar exploring exciting capstone projects and updates on Ada and Spark for the academic community. The session is recorded and questions can be submitted via chat.
Alire 2.0 (0:03:10): Latest release includes new features like alr install --crate for system-wide installation, a publishing assistant, enhanced search, and shared builds for dependent crates, significantly improving performance.
IDEs (0:04:50): New releases of GNAT Studio (improved code navigation, Alire support) and a VS Code plugin (GPR file handling, test integration, bug fixes) are available.
GNAT FSF 14 (0:05:39): The latest version is available in Alire, offering language evolutions and experimental features (-gnatX and -gnatX0 switches) such as fixed lower bounds for array types, dot calls for untagged types, string interpolation, default for generics formal functions, and local declarations without a declare block.
Case Pattern Matching (0:11:24): An experimental feature allowing pattern matching on record elements and binding values.
Extended Control Constructs (0:13:15):exit when, return when, goto when, and exceptions can now incorporate conditional logic.
Project Goal: Develop an autonomous robot for detecting landmines and metal objects in dangerous zones to reduce de-mining costs and human risk, inspired by the context in Casamance, Senegal.
Hardware (0:22:13): Utilizes an STM32F7 Discovery board, recycled lithium batteries (13.4V), DC motors with an L298N motor driver, a Sharp sonar sensor for object detection, and high-torque servo motors for a robotic arm. A metal detector serves as the end effector.
Software Architecture (0:27:30): Built with Ada driver library, extends Olivier's STM32F7 Disco code, and integrates with existing robotic Ada projects. Features periodic tasks for position management, sonar data, scanning, and vehicle control, each with its own priority.
Challenges (0:34:51): Difficulty in sourcing materials and lack of existing Ada robotic projects.
0:37:57 Microcontroller Unit Bootloader (Xavier Zong & Alan Everett):
Objective: Create an open-source Ada bootloader for bare-metal environments, showcasing Ada's driver library and handling application booting, erasing, flashing, and verifying firmware.
Platform (0:40:21): Targets the STM32F746G Discovery board, using Alire package manager, GNAT compiler, Ubuntu, and VS Code for development.
Design (0:41:17): Aims to be invisible under normal operation, prevent running corrupted software with integrity checks, and communicate with a host CLI via UART (USB was cut).
Boot Process (0:44:02): Checks for user interruption on power-on; if none, boots the application; if interrupted, loads the bootloader for communication and operations.
Host CLI (0:45:09): Provides commands for verify, flash, erase, reset, info, and utility commands.
Future Goals (0:51:33): Utilize DMA for background memory transfer, add CRC for verification, and implement an onboard boot menu.
Portability (0:52:34): Expected to be straightforward for other STM32 MCUs due to API compatibility, but requires hardware driver adaptation for different families.
0:55:55 Bare Metal Recursive Internetwork Architecture (RINA) Stack (Mason & Anthony):
Problem with TCP/IP (0:57:11): Criticized for inefficiency (overhead), bolted-on security, and complexity (tightly coupled layers, many data formats).
RINA Objectives (0:58:29): Implements the RINA architecture, which views networking as inter-process communication (IPC) and uses a single communication protocol. Differentiated from TCP/IP by stacked "Distributed IPC Facilities" (DIFs) for flexible layering.
Implementation (1:01:46): Combines a Linux-based RINA (using C-based Rlite wrapped in Ada API) with a bare-metal Ada RINA stack on the STM32F746G Discovery board, allowing communication between them.
UI Design (1:04:31): Onboard display shows network statistics (packet count, throughput) and serves as a screen debugger, with touchscreen functionality for menu navigation (e.g., file browser).
Demonstration (1:06:10): Shows configuring Rlite, establishing connection (ARP requests, CDAP messages for policy exchange), and transferring a bitmap image from the Linux host to the embedded board, displayed on the board's screen.
Goals (1:17:11): To develop new skills in Ada, low-level bare-metal programming, and redefine networking concepts.
1:39:13 Ada Machine Learning Engine (Owen Skawski):
Motivation (1:39:39): Lack of ML implementation in Ada, despite Ada's use in industries trending towards ML/AI.
Objective (1:40:38): Develop foundations of ML in Ada by engineering components to construct and train a neural network natively, classifying points for a spiral decision boundary.
Neural Network Concepts (1:41:55): Built on perceptrons (neurons), with activation functions (e.g., ReLU) to determine neuron participation and avoid linear decision boundaries.
Techniques (1:43:40): Uses Alire for package management, AUnit for testing, implements ReLU activation, uses libraries for tensors (data storage/manipulation), Softmax loss function, and Stochastic Gradient Descent optimizer to avoid local minima.
Challenges (1:47:40): Complexity of low-level operations in Ada for data handling, calculations, and memory manipulation, contrasting with Python's simplicity for the same functions.
Architecture (1:49:38): Includes functions to create layers, propagate data (forward function), activation functions, normalization (loss), and backpropagation for model updates.
Demonstration (1:52:07): Shows the engine running in the terminal, looping through epochs and iterations, yielding a measurable accuracy better than random guessing.
Applications (1:52:57): Potential for mission-critical systems and functioning as parts of larger platforms, supporting full Ada systems or back-end calls from other languages.
Flexbox Concept (1:55:30): A responsive web page layout system for efficient, dynamic organization.
Project Goal (1:56:13): Implement a bare-metal imitation of Flexbox in Ada for embedded systems (STM32F746G Discovery board), leveraging Ada's strong typing, compile-time checking, concurrency features, and the Ada driver library.
Foundation (1:57:49): Uses a multi-way tree structure (from Ada's Containers library) to represent UI layers, allowing dynamic manipulation of widgets at runtime.
Concurrency (2:00:20): Splits into user input and render frame tasks, communicating via Ada protected objects for real-time updates.
UI Components (2:00:50): Includes standard widgets (containers), buttons (with custom event calls), image widgets (loading PNGs as source code), and text widgets.
Customization (2:01:02): Supports various sizing behaviors (pixel, percent, portion, max, content), layout directions (left/right, top/bottom), spacing (gap, buoyancy like space evenly/between), and alignment (top/bottom/left/right/center/stretch).
Demonstration (2:05:58): Shows interactive manipulation of UI elements on the board: changing alignment, buoyancy, and direction with buttons; dragging and resizing widgets with touch; and an image gallery demo cycling through and resizing images.
Development (2:09:46): Started with native X11 development for faster iteration before deploying and fine-tuning on the embedded target.
Future (2:11:02): Interest in making it a fully-fledged Ada library, potentially integrated with GNAT Studio for UI development.
2:14:50 Bare Metal Implementation of the Min Protocol (Samuel - pre-recorded):
Communication Protocol (2:15:12): A set of rules for two entities (e.1. computers) to communicate, acting as a shared language.
Min Protocol (2:15:45): Microcontroller interconnect Network, a lightweight, reliable protocol designed by Dr. Ken Tindle (2014) for MCU-to-host communication.
Serial Layer (2:16:59): Bridge to underlying serial link (e.g., UART), handling byte-by-byte transmission. Implementation differs slightly between MCU (custom) and host (e.g., GNAT Serial Communications).
Frame Layer (2:18:16): Packs/unpacks data into frames with ID, payload length, payload, and checksum for integrity. Uses start/end bytes and byte stuffing. Drops corrupted frames.
Transport Layer (2:20:34): Optional layer to ensure reliable frame delivery by requesting retransmission of lost/corrupted frames (not implemented in this project).
Project Goals (2:22:04): Provide Min protocol as an easy-to-use Ada package, learn about protocols, and familiarize with Ada.
Challenges (2:22:25): Learning Ada, adherence to existing protocol implementations, and debugging on limited embedded systems without extensive tools.
Implementation (2:23:57): Demonstrates initializing UART, Min.Init_Context, and overriding Min.Application_Handler (for received data) and Min.TX_Byte (for sending data). Shows sending a "Hello Adore" message from the MCU to a host terminal and back, visualizing byte-level communication.
Future Improvements (2:31:23): Adding the transport layer, finishing package creation/publishing on Alire, providing clear documentation, and further code optimizations.
2:33:57 Concluding Remarks (Olivier): Thanks Adore for supporting the experiments and all students for their hard work, commitment, and professionalism in tackling challenging projects with Ada. Emphasizes Ada's strictness and highlights the success of the capstones in showcasing Ada's capabilities. Encourages continued engagement with the Ada community.