Getting Started with M1750 Ada

Ada 95 Compilation System for Spacecraft Microprocessors


M1750 Ada is based on GCC-1750, which was developed under contract with the European Space Agency, contract number 11935/NL/JG and on the front end of the GNAT Ada compiler developed at New York University. GCC-1750 includes software from the GNU C compiler, debugger and binary utilities developed by and on behalf of the Free Software Foundation, Inc., Cambridge, Massachusetts.

Development of the mission-critical capability was funded by TRW Aerospace and the UK Ministry of Defence.

Table of Contents
About this Guide
1. Audience
2. Related Documents
3. Reader's Comments
4. Documentation Conventions
1. Basic Techniques
1.1. Hello World
1.1.1. How to Prepare an Ada Program
1.1.2. How to Compile
1.1.3. How to Run a Program on the Simulator
1.2. How to Recompile a Program
1.3. The Generated Code
1.4. What's in My Program?
1.5. Restrictions
2. Advanced Techniques
2.1. How to Customize the Start File
2.2. Using a Custom Linker Script File
2.3. How to Get a Map File
2.4. Generating PROM Programming Files
2.5. Using the Debugger
2.6. Using Optimizations
2.7. Working with the Target
2.7.1. How to Down-load the Debug Monitor
2.7.2. Preparing a Program to Run under the Monitor
2.8. Checking for Stack Overflow
2.9. Expanded Memory
2.10. System Calls
2.10.1. How to Use Text_IO Without System Calls
3. Real-Time Programs
3.1. The Ravenscar Profile
3.1.1. The Main Task
3.1.2. Periodic Tasks
3.1.3. Form of a Periodic Task
3.1.4. Aperiodic Tasks
3.2. Additional Predefined Packages
3.3. Interrupts without Tasks
A. Expanded Memory
A.1. Expanded Memory Solutions
A.1.1. The Single-Program Solution
A.1.2. The Multi-Program Solution
B. M1750 Compiler Options
C. M1750 Assembler Options and Directives
C.1. MIL-STD-1750 Options
C.2. Floating Point
C.3. M1750 Machine Directives
C.4. Opcodes
C.4.1. Extended Floating Load Register (ELFR)
C.4.2. Expanded Memory Support
C.4.3. Branch Improvement
C.4.4. XIO Commands
C.4.5. Special Characters
D. M1750 Simulator Options
D.1. The Command Line
D.2. Command Line Switches
D.3. Examples of Simulator Use
D.3.1. Tracing Simulation
D.3.2. Tasking Reports
D.3.3. The RAM Tags Report
D.4. How to Customize the Simulator
E. The package Ada.Interrupts.Names
F. The Host-Target Link
F.1. RS-232 Information
G. Questions and Answers
List of Tables
C-1. M1750 Pseudo Operations for Branches
F-1. The RS-232 Standard
F-2. Null Modem Wiring and Pin Connection
List of Examples
1-1. The Source File
1-2. The Compile Command
1-3. Binding and Linking
1-4. Using gnatmake to Compile
1-5. Using gnatmake to Recompile
1-6. Generating a Machine Code Listing
1-7. Output from Object Code Dump Program
1-8. Using the Size Program
1-9. Object Code Section Headers
2-1. Creating a Custom Start File
2-2. Making a Custom Linker Script File
2-3. Using the Custom Linker Script File
2-4. The Map File
2-5. Running under the Debugger
2-6. Dump of Debug Information
2-7. Remote Configuration File
2-8. Remote Debugging
2-9. Stack Overflow Check
2-10. Code to Support Write
3-1. Main Subprogram with Idle Loop
3-2. Idle Loop with Power-Down
3-3. A Periodic Task
3-4. An Interrupt-Driven Task
3-5. Example Interrupt Level Protected Object
C-1. XIO Command in Ada
D-1. Simulator Help
D-2. Tracing Simulation
D-3. Tracing Tasking
D-4. A RAM Tags Report