Project Lead German Rivera Location Austin, United States
This project is about developing a framework in Ada 2012 for developing the control software for the NXP cup race car. The NXP cup race car, officially known as "TFC-KIT: The NXP Cup Intelligent Car Development System", is a "toy size" race car chassis coupled with a FRDM-KL25Z board and a TFC-shield board. The car kit also includes two DC motors for the rear wheels, a steering servo for the front wheels and a line scan camera. The car runs on a white track that has turns, intersections, hills and wavy (slalom) segments, and must detect the finish line to stop. The control software for the car is stored in the flash memory of the FRDM-KL25Z board's microcontroller. The microcontroller is an NXP Kinetis KL25Z chip, with Cortex-M0+ core, 128KB of NOR flash and 16KB of SRAM. The software runs out of flash and can only use the SRAM in the micrcocontroller, to store program variables. This constraint makes the KL25Z micrcontroller an interesting platform to demonstrate that Ada 2012 and the gnat compiler can be used successfully to build embedded software for such small devices.
The control software consists of a control loop that reads frames from the line-scan camera, analyzes each frame to decide where to steer the car, and sends commands to the steering servo and rear wheel motors. The goal of the control algorithm is to keep the car inside track at all times while traversing it as fast as possible.
The main deliverable of this project is a software framework for developing the control software for the NXP cup race car. This framework will enable students and hobbyists alike to use Ada 2012 to develop their own control software for the little car, and to experiment with different image processing algorithms to analyze camera frames as well as with different control algorithms for autonomous driving of the car. They will be able to concentrate on the core problems, without having to write the whole software stack for the car, from scratch.
The car control software framework will be architected in three layers: - Layer 3: Platform-independent car control application layer. This layer is the framework itself. It will sit on top of the "Embedded Software building blocks" layer and the "Small Foot Print Ravenscar" gnat runtime library. Layer 3 sits on top of Layer 2 and Layer 1. - Layer 2: Embedded software building blocks layer for the NXP FRDM-KL25Z. This is an infrastructure layer of reusable software abstractions for embedded software development, that provide a board-independent interface or HAL (hardware abstraction layer). It is meant to be application independent, and thus reusable for any bare-metal software project in Ada 2012 targeted for the FRDM-KL25Z board. Even further, this layer is designed to be easily portable to different boards that have a Cortex-M-based microcontroller and similar peripherals. Layer 2 sits on top of Layer 1. - Port of the "Small Foot Print Ravenscar" gnat runtime library for the NXP Kinetis KL25Z microcontroller.