Getting Started with M68K Ada

Ada 95 Compilation System for the Motorola M68000 Family


M68K Ada is based on technology originally developed by the GNAT team at New York University and now maintained by Ada Core Technologies, Inc., and 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 original mission-critical capability was funded by TRW Aerospace and the 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.3.1. Tracing Simulation
1.4. What's in My Program?
1.5. Restrictions
2. Advanced Techniques
2.1. Using a Custom 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
3. Real-Time Programs
3.1. The Ravenscar Profile
3.1.1. The Main Subprogram
3.1.2. Periodic Tasks
3.1.3. Form of a Periodic Task
3.1.4. Aperiodic Tasks
3.2. Additional Packages
3.3. Interrupts without Tasks
A. The M68000 Family
B. Options for the M68000 Family
B.1. Compiler Options
B.2. Assembler Options
B.3. Motorola Syntax
B.4. MIT Instruction Syntax
B.5. Floating Point
B.6. Machine Directives
B.7. Opcodes
B.7.1. Branch Improvement
B.8. Linker Options
C. Using the M68000 Family Simulator
C.1. Command Line Switches
D. The package Ada.Interrupts.Names
E. The Host-Target Link
E.1. RS-232 Information
F. Questions and Answers
List of Tables
B-1. Assembler Pseudo Operations
E-1. Null Modem Wiring and Pin Connection
E-2. The RS-232 Standard
List of Examples
1-1. The Source File
1-2. How to Compile hello.adb
1-3. Binding and Linking
1-4. Using gnatmake
1-5. Running on the Simulator
1-6. Using the gnatmake command
1-7. Generating a Machine Code Listing
1-8. Output from objdump
1-9. Using the Size Command
1-10. Using the Object Code Dump Program
1-11. Tracing Simulation
1-12. A Linker Map
2-1. Creating a Custom Start File
2-2. Recompiling art0.S
2-3. Rebuilding with a Custom art0.S
2-4. Making a Custom Linker Script File
2-5. Using a Custom Linker Script File
2-6. How to Get a Map File
2-7. The Map File
2-8. Converting to Intel Hex
2-9. Generating a HEX File
2-10. Running an Intel Hex File
2-11. Running an S-Record File
2-12. Recompiling with the Debug Option
2-13. Running under the Debugger
2-14. Dump of Debug Information
2-15. Remote Configuration File
2-16. Output from the Monitor
2-17. Remote Debugging
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