Getting Started with GCC-ERC32

C/C++ Compilation System for Mission Critical Spacecraft Applications


GCC-ERC32 is based on the GCC compiler from the Free Software Foundation, Cambridge, Massachusetts.

GCC-ERC32 was developed with funding from the European Space Agency, contract numbers 11935/96/NL/JG and 13174/98/NL/FM.

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. Preparing a Simple C Program
1.1.2. How to Compile
1.2. Using the Simulator
1.3. Compiler Options
1.4. What's in My Program?
2. Advanced Techniques
2.1. Using the Debugger
2.2. Using Optimizations
2.3. Interrupt Handling
2.4. POSIX Multi Tasking
2.5. Using a Custom Start-file
2.6. Generating PROM Programming Files
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. Using Atmel rdbmon Version 1.1
2.9. The Boot PROM
2.10. Working with Temic Revisions CBA and CCA
2.11. Working with the EDAC
2.12. System Calls
A. ERC32 Compiler Options
B. ERC32 Assembler Options and Directives
B.1. ERC32 Options
B.2. Enforcing aligned data
B.3. Floating Point
B.4. ERC32 Machine Directives
B.5. Synthetic Instructions
C. ERC32 Simulator Options
C.1. The Command Line
C.2. Simulator Options
C.3. Examples of Simulator Use
D. The Host-Target Link
D.1. How to Change the UART Speed
D.2. RS-232 Information
E. Questions and Answers
List of Tables
1-1. Filename Extensions
B-1. Mapping of Synthetic Instructions to ERC32 Instructions
D-1. Pre-Computed Values for the UART Scaler (For ubr = 1)
D-2. Errors in bit rate (For ubr = 1)
D-3. Null Modem Wiring and Pin Connection
D-4. The RS-232 Standard
List of Examples
1-1. The Source File
1-2. The Compile Command
1-3. Running on the Simulator
1-4. Generating a Machine Code Listing
1-5. Output from objdump
1-6. Using the size command
1-7. Using the Object Code Dump Program
2-1. Recompiling with the Debug Option
2-2. Running Under the Debugger
2-3. How to Attach and Interrupt Handler
2-4. Creating a Start File
2-5. Compiling with Custom Files
2-6. Converting to Intel Hex
2-7. Generating Intel Hex
2-8. Running an Intel Hex FIle
2-9. Recompiling and Running with S-Records
2-10. The Remote Configuration File
2-11. Output from the SPARC Monitor
2-12. Output from the Debug Monitor
2-13. Remote Debugging
2-14. How to Specifiy an Emulation
2-15. Generated Code for Revision CBA
2-16. Running the simulator with the EDAC