Motorola 68000 Family C Cross Compiler Notice

Total Page:16

File Type:pdf, Size:1020Kb

Motorola 68000 Family C Cross Compiler Notice User’s Guide HP B3640 Motorola 68000 Family C Cross Compiler Notice Hewlett-Packard makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material. Hewlett-Packard assumes no responsibility for the use or reliability of its software on equipment that is not furnished by Hewlett-Packard. © Copyright 1987-1994, Hewlett-Packard Company. This document contains proprietary information, which is protected by copyright. All rights are reserved. No part of this document may be photocopied, reproduced or translated to another language without the prior written consent of Hewlett-Packard Company. The information contained in this document is subject to change without notice. UNIX is a registered trademark of UNIX System Laboratories Inc. in the U.S.A. and other countries. MS-DOS and Windows are U.S. registered trademarks of Microsoft Corporation. Hewlett-Packard Company P.O . Box 2197 1900 Garden of the Gods Road Colorado Springs, CO 80901-2197, U.S.A. RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by the U.S. Government is subject to restrictions set forth in subparagraph (C) (1) (ii) of the Rights in Technical Data and Computer Software Clause in DFARS 252.227-7013. Hewlett-Packard Company, 3000 Hanover Street, Palo Alto, CA 94304 U.S.A. Rights for non-DOD U.S. Government Departments and Agencies are set forth in FAR 52.227-19(c)(1,2). About this edition Many product updates and fixes do not require manual changes, and manual corrections may be done without accompanying product changes. Therefore, do ii not expect a one-to-one correspondence between product updates and manual revisions. Edition dates and the corresponding HP manual part numbers are as follows: Edition 1 B3640-97000, May 1993 Edition 2 B3640-97001, January 1994 B3640-97000 incorporates information which previously appeared in 64902-92003, 64902-97000, 64902-97001, 64903-92004, 64903-97000, 64903-97001, 64907-92002, 64907-97000, 64907-97001, 64908-92002, 64908-97000, 64908-97001, 64909-92002, 64909-97000, and 64909-97001. Certification and Warranty Certification and warranty information can be found at the end of this manual on the pages before the back cover. iii Features The Motorola 68000 Family C Cross Compiler translates C source code into 68000 family assembly language which can be accepted by the HP B3641 assembler. This compiler has special features to help meet the needs of the embedded system designer: • ANSI standard C compiler and preprocessor. • Standard command line interface for compatibility with make and other utilities. • Complete C support and math libraries from ANSI standard for nonhosted environments. • In-line code generation and libraries to support the 68881/2 floating point unit. • Three ways to embed assembly language in C source. • Named section specification in C source. • Choice of address modes for function calls and static data access. • Option to copy initial value data from ROM to RAM at load time. • Listings with generated assembly language, C source, and cross references. • Fully reentrant generated code. • Optimization for either time or space. • Constant folding, automatic register variable selection, and other global optimizations. • Full symbol information and C source line numbers provided for debugging, emulation, simulation, and analysis tools. • Compiler reliability ensured through object-oriented design and exhaustive testing. iv Contents Part 1 Quick Start Guide 1 Getting Started In this chapter 2 What you need to know 2 Parts of the compiler 3 Summary of compiler options 4 Summary of file extensions 6 To install the software on a UNIX workstation 7 To install the software on a PC (Windows) 8 To remove unnecessary files (UNIX only) 10 To create a simple C program 11 To compile a simple program 12 To generate an assembly listing 13 To specify addressing modes 14 To specify the target microprocessor 19 To compile for a debugger 20 To use a makefile (UNIX systems only) 21 To modify environment libraries 23 About environment libraries 26 To view the on-line man (help) pages 27 vii Contents Part 2 Compiler Reference 2 C Compilation Overview Execution Environment Dependencies 32 C Compilation Overview 33 Compilation Control Routine 35 C Preprocessor 35 C Compiler 35 Peephole Optimizer 35 Assembler 36 Source File Lister 36 Librarian 36 Linker 36 ANSI Extensions to C 37 Assignment Compatibility 37 Function Prototypes 37 Pragmas 38 The void Type 39 The volatile Type Modifier 40 The const Type Modifier 41 Translation Limits 42 3 Internal Data Representation Arithmetic Data Types 44 Floating-Point Data Types 44 Characters 47 Derived Data Types 48 Pointers 48 Arrays 48 Structures 51 Unions 53 Enumeration Types 53 viii Contents Alignment Considerations 54 Alignment Examples 56 Byte Ordering 57 4 Compiler Generated Assembly Code Assembly Language Symbol Names 61 Symbol Prefixes 61 Situations Where C Symbols are Modified 62 #pragma ALIAS 63 Compiler Generated Symbols 63 Debug Directives 64 Stack Frame Management 64 Structure Results 66 Parameter Passing 67 Pushing the Old Frame Pointer and Allocating Space 67 Buffering Registers Used for Register Variables 68 Accessing Parameters 68 Accessing Locals 69 Using the Stack for Temporary Storage 69 Function Results 70 Function Exit 70 Register Usage 77 Register variables 78 Example 79 Run-Time Error Checking 80 Using Assembly Language in the C Source File 81 #pragma ASM #pragma END_ASM 82 __asm ("C_string") 84 #pragma FUNCTION_ENTRY, #pragma FUNCTION_EXIT, #pragma FUNCTION_RETURN 86 Assembly Language in Macros 89 ix Contents 5 Optimizations Universal Optimizations 92 Constant Folding 93 Expression Simplification 94 Operation Simplification 94 Optimizing Expressions in a Logical Context 95 Loop Construct Optimization 95 Switch Statement Optimization 96 Automatic Allocation of Register Variables 96 String Coalescing 96 The Optimize Option 98 Time vs. Space Optimization 98 Multiplication Simplification 100 Maintaining Debug Code 100 Peephole Optimization 100 Effect of volatile Data on Peephole Optimizations 104 Function Entry and Exit 104 In-Line Expansion of Standard Functions 104 What to do when optimization causes problems 106 6 Embedded Systems Considerations Execution Environments 108 Monitor and mon_stub 108 Common problems when compiling for an emulator 109 Loading supplied emulation configuration files 109 Using the "-d" option 110 Section Names 111 #pragma SECTION 111 Addressing Modes 114 Specifying addressing modes 115 When to use certain addressing modes 115 Short vs. long 116 Absolute addressing modes 117 x Contents PC relative addressing modes 117 A5 relative addressing modes 118 Other addressing mode considerations 122 RAM and ROM Considerations 122 Initialized data 122 Where to load constants 123 Embedded Systems with Mass Storage 123 The "volatile" Type Modifier 124 Reentrant Code 126 Nonreentrant library routines 126 Implementing Functions as Interrupt Routines 127 #pragma INTERRUPT 127 Loading the vector address 127 Eliminating I/O 128 7 Libraries Addressing Modes Used in Libraries 130 Run-Time Library Routines 132 Support Library and Math Library Routines 132 Library Routines Not Provided 133 Include (Header) Files 134 List of All Library Routines 136 Support Library and Math Library Descriptions 141 abs, labs 142 assert 143 atexit 144 bsearch 145 div, ldiv 147 exp 148 xi Contents fclose, fflush 149 ferror, feof, clearerr 150 fgetpos, fseek, fsetpos, rewind, ftell 150 floor, ceil, fmod, frem, fabs 153 fopen, freopen 154 _fp_error 156 fread, fwrite 161 frexp, ldexp, modf 162 getc, getchar, fgetc 163 gets, fgets 164 interpolateS, interpolateSN, interpolateU, interpolateUN 165 isalpha, isupper, islower, ... 166 localeconv 168 log, log10 173 malloc, free, realloc, calloc 174 mblen, mbstowcs, mbtowc, wcstombs, wctomb, strxfrm 176 memchr, memcmp, memcpy, memmove, memset 178 perror, errno 179 pow 180 printf, fprintf, sprintf 181 putc, putchar, fputc 186 puts, fputs 188 qsort 189 rand, srand 189 remove 191 scanf, fscanf, sscanf 192 setbuf, setvbuf 197 setjmp, longjmp 199 setlocale 201 sin, cos, tan, asin, acos, atan, atan2 203 sinh, cosh, tanh 205 sqrt 206 strcat, strncat, ... 207 strtod, atof 210 strtol, strtoul, atol, atoi 211 tableS, tableSN, tableU, tableUN 213 toupper, tolower, _toupper, _tolower 214 ungetc 215 va_list, va_start, va_arg, va_end 216 vprintf, vfprintf, vsprintf 218 xii Contents 8 Environment-Dependent Routines Supported Environments 222 Program Setup 223 Differences Between "crt0" and "crt1" 223 The "_display_message()" Routine 226 Monitor Considerations 226 Linking the Program Setup Routines 227 Emulator Configuration Files 228 Default Memory Map 228 Dynamic Allocation 229 Rewriting the "_getmem" Function 229 Input and Output 229 Environment-Dependent I/O Functions 230 clear_screen 231 close 232 exec_cmd 233 exit, _exit 235 _getmem 236 initsimio 238 kill 239 lseek 240 open 242 pos_cursor 245 read 246 sbrk 248 unlink 248 write 250 xiii Contents 9 Compile-Time Errors Errors 254 Warnings 262 10 Run-Time Errors Floating-Point Error Messages 266 68881/2 Libraries: 266 Processor Libraries: 267 Debug Error Messages 268 Pointer Faults: 268 Range Faults: 268 Startup Error Messages 269 11 Run-Time Library Description Conversion Routines 272 dtof 272 dtoi 272 dtoui 273 ftod 273
Recommended publications
  • Riscv-Software-Stack-Tutorial-Hpca2015
    Software Tools Bootcamp RISC-V ISA Tutorial — HPCA-21 08 February 2015 Albert Ou UC Berkeley [email protected] Preliminaries To follow along, download these slides at http://riscv.org/tutorial-hpca2015.html 2 Preliminaries . Shell commands are prefixed by a “$” prompt. Due to time constraints, we will not be building everything from source in real-time. - Binaries have been prepared for you in the VM image. - Detailed build steps are documented here for completeness but are not necessary if using the VM. Interactive portions of this tutorial are denoted with: $ echo 'Hello world' . Also as a reminder, these slides are marked with an icon in the upper-right corner: 3 Software Stack . Many possible combinations (and growing) . But here we will focus on the most common workflows for RISC-V software development 4 Agenda 1. riscv-tools infrastructure 2. First Steps 3. Spike + Proxy Kernel 4. QEMU + Linux 5. Advanced Cross-Compiling 6. Yocto/OpenEmbedded 5 riscv-tools — Overview “Meta-repository” with Git submodules for every stable component of the RISC-V software toolchain Submodule Contents riscv-fesvr RISC-V Frontend Server riscv-isa-sim Functional ISA simulator (“Spike”) riscv-qemu Higher-performance ISA simulator riscv-gnu-toolchain binutils, gcc, newlib, glibc, Linux UAPI headers riscv-llvm LLVM, riscv-clang submodule riscv-pk RISC-V Proxy Kernel (riscv-linux) Linux/RISC-V kernel port riscv-tests ISA assembly tests, benchmark suite All listed submodules are hosted under the riscv GitHub organization: https://github.com/riscv 6 riscv-tools — Installation . Build riscv-gnu-toolchain (riscv*-*-elf / newlib target), riscv-fesvr, riscv-isa-sim, and riscv-pk: (pre-installed in VM) $ git clone https://github.com/riscv/riscv-tools $ cd riscv-tools $ git submodule update --init --recursive $ export RISCV=<installation path> $ export PATH=${PATH}:${RISCV}/bin $ ./build.sh .
    [Show full text]
  • Operating Systems and Applications for Embedded Systems >>> Toolchains
    >>> Operating Systems And Applications For Embedded Systems >>> Toolchains Name: Mariusz Naumowicz Date: 31 sierpnia 2018 [~]$ _ [1/19] >>> Plan 1. Toolchain Toolchain Main component of GNU toolchain C library Finding a toolchain 2. crosstool-NG crosstool-NG Installing Anatomy of a toolchain Information about cross-compiler Configruation Most interesting features Sysroot Other tools POSIX functions AP [~]$ _ [2/19] >>> Toolchain A toolchain is the set of tools that compiles source code into executables that can run on your target device, and includes a compiler, a linker, and run-time libraries. [1. Toolchain]$ _ [3/19] >>> Main component of GNU toolchain * Binutils: A set of binary utilities including the assembler, and the linker, ld. It is available at http://www.gnu.org/software/binutils/. * GNU Compiler Collection (GCC): These are the compilers for C and other languages which, depending on the version of GCC, include C++, Objective-C, Objective-C++, Java, Fortran, Ada, and Go. They all use a common back-end which produces assembler code which is fed to the GNU assembler. It is available at http://gcc.gnu.org/. * C library: A standardized API based on the POSIX specification which is the principle interface to the operating system kernel from applications. There are several C libraries to consider, see the following section. [1. Toolchain]$ _ [4/19] >>> C library * glibc: Available at http://www.gnu.org/software/libc. It is the standard GNU C library. It is big and, until recently, not very configurable, but it is the most complete implementation of the POSIX API. * eglibc: Available at http://www.eglibc.org/home.
    [Show full text]
  • Linux Journal | February 2016 | Issue
    ™ A LOOK AT KDE’s KStars Astronomy Program Since 1994: The Original Magazine of the Linux Community FEBRUARY 2016 | ISSUE 262 | www.linuxjournal.com + Programming Working with Command How-Tos Arguments in Your Program a Shell Scripts BeagleBone Interview: Katerina Black Barone-Adesi on to Help Brew Beer Developing the Snabb Switch Network Write a Toolkit Short Script to Solve a WATCH: ISSUE Math Puzzle OVERVIEW V LJ262-February2016.indd 1 1/21/16 5:26 PM NEW! Agile Improve Product Business Development Processes with an Enterprise Practical books Author: Ted Schmidt Job Scheduler for the most technical Sponsor: IBM Author: Mike Diehl Sponsor: people on the planet. Skybot Finding Your DIY Way: Mapping Commerce Site Your Network Author: to Improve Reuven M. Lerner Manageability GEEK GUIDES Sponsor: GeoTrust Author: Bill Childers Sponsor: InterMapper Combating Get in the Infrastructure Fast Lane Sprawl with NVMe Author: Author: Bill Childers Mike Diehl Sponsor: Sponsor: Puppet Labs Silicon Mechanics & Intel Download books for free with a Take Control Linux in simple one-time registration. of Growing the Time Redis NoSQL of Malware http://geekguide.linuxjournal.com Server Clusters Author: Author: Federico Kereki Reuven M. Lerner Sponsor: Sponsor: IBM Bit9 + Carbon Black LJ262-February2016.indd 2 1/21/16 5:26 PM NEW! Agile Improve Product Business Development Processes with an Enterprise Practical books Author: Ted Schmidt Job Scheduler for the most technical Sponsor: IBM Author: Mike Diehl Sponsor: people on the planet. Skybot Finding Your DIY Way: Mapping Commerce Site Your Network Author: to Improve Reuven M. Lerner Manageability GEEK GUIDES Sponsor: GeoTrust Author: Bill Childers Sponsor: InterMapper Combating Get in the Infrastructure Fast Lane Sprawl with NVMe Author: Author: Bill Childers Mike Diehl Sponsor: Sponsor: Puppet Labs Silicon Mechanics & Intel Download books for free with a Take Control Linux in simple one-time registration.
    [Show full text]
  • Compiler Construction
    Compiler Construction Chapter 11 Compiler Construction Compiler Construction 1 A New Compiler • Perhaps a new source language • Perhaps a new target for an existing compiler • Perhaps both Compiler Construction Compiler Construction 2 Source Language • Larger, more complex languages generally require larger, more complex compilers • Is the source language expected to evolve? – E.g., Java 1.0 ! Java 1.1 ! . – A brand new language may undergo considerable change early on – A small working prototype may be in order – Compiler writers must anticipate some amount of change and their design must therefore be flexible – Lexer and parser generators (like Lex and Yacc) are therefore better than hand- coding the lexer and parser when change is inevitable Compiler Construction Compiler Construction 3 Target Language • The nature of the target language and run-time environment influence compiler construction considerably • A new processor and/or its assembler may be buggy Buggy targets make it difficult to debug compilers for that target! • A successful source language will persist over several target generations – E.g., 386 ! 486 ! Pentium ! . – Thus the design of the IR is important – Modularization of machine-specific details is also important Compiler Construction Compiler Construction 4 Compiler Performance Issues • Compiler speed • Generated code quality • Error diagnostics • Portability • Maintainability Compiler Construction Compiler Construction 5 Compiler Speed • Reduce the number of modules • Reduce the number of passes Perhaps generate machine
    [Show full text]
  • A Model-Driven Development and Verification Approach
    A MODEL-DRIVEN DEVELOPMENT AND VERIFICATION APPROACH FOR MEDICAL DEVICES by Jakub Jedryszek B.S., Wroclaw University of Technology, Poland, 2012 B.A., Wroclaw University of Economics, Poland, 2012 A THESIS submitted in partial fulfillment of the requirements for the degree MASTER OF SCIENCE Department of Computing and Information Sciences College of Engineering KANSAS STATE UNIVERSITY Manhattan, Kansas 2014 Approved by: Major Professor John Hatcliff Abstract Medical devices are safety-critical systems whose failure may put human life in danger. They are becoming more advanced and thus more complex. This leads to bigger and more complicated code-bases that are hard to maintain and verify. Model-driven development provides high-level and abstract description of the system in the form of models that omit details, which are not relevant during the design phase. This allows for certain types of verification and hazard analysis to be performed on the models. These models can then be translated into code. However, errors that do not exist in the models may be introduced during the implementation phase. Automated translation from verified models to code may prevent to some extent. This thesis proposes approach for model-driven development and verification of medi- cal devices. Models are created in AADL (Architecture Analysis & Design Language), a language for software and hardware architecture modeling. AADL models are translated to SPARK Ada, contract-based programming language, which is suitable for software veri- fication. Generated code base is further extended by developers to implement internals of specific devices. Created programs can be verified using SPARK tools. A PCA (Patient Controlled Analgesia) pump medical device is used to illustrate the primary artifacts and process steps.
    [Show full text]
  • Linux Everywhere a Look at Linux Outside the World of Desktops
    Linux Everywhere A look at Linux outside the world of desktops CIS 191 Spring 2012 – Guest Lecture by Philip Peng Lecture Outline 1. Introduction 2. Different Platforms 3. Reasons for Linux 4. Cross-compiling 5. Case Study: iPodLinux 6. Questions 2 What’s in common? 3 All your hardware are belong to us • Linux is everywhere – If its programmable, you can put Linux on it! – Yes, even a microwave CES 2010, microwave running Android: http://www.handlewithlinux.com/linux-washing-cooking 4 Servers • What servers use – Stability, security, free – Examples: ◦ CentOS ◦ Debian ◦ Red Hat 5 Desktop • What you use – Free Windows/Mac alternative – Examples: ◦ Ubuntu ◦ Fedora ◦ PCLinuxOS 6 Gaming Devices • What (white-hat) hackers do – To run “homebrew” software – Examples: ◦ PS3, Wii, XBOX ◦ PS2, GameCube ◦ Dreamcast ◦ PSP, DS ◦ Open Pandora, GP2X 7 Mobile Devices • What distributors are developing – Community contribution – Examples ◦ Android ◦ Maemo/MeeGo/Tizen ◦ Openmoko 8 Embedded Devices • What embedded hardware run – Small footprint, dev tools – Examples ◦ RTLinux (real-time) ◦ μClinux (no MMU) ◦ Ångström (everything) 9 Why? 10 Free! • Free! – As in freedom, i.e. open source – As in beer, i.e. vs paid upgrades 11 Homebrew! • Run own software – Your hardware your software? 12 Support! • Community contribution – “For the greater good” (i.e. users) – Everyone contributes ◦ Specialists from all over the world – Existing hardware support ◦ Many already supported computer architecture ◦ Modify existing drivers 13 Lots of support! 14 Why not? • Because we can – If its hackable, it can run Linux 15 How? • How do we get Linux running on XXX? • Port: A version of software modified to run on a different target platform – The PS3 port of Fedora is a modified build of Fedora compiled to run on the PS3 architecture – e.g.
    [Show full text]
  • Embedded Linux Device Driver Development Sébastien Bilavarn
    Embedded Linux Device driver development Sébastien Bilavarn Polytech’Nice Sophia - Département Electronique - Université de Nice Sophia Antipolis - S. Bilavarn - 1 - Outline Ch1 – Introduction to Linux Ch2 – Linux kernel overview Ch3 – Linux for Embedded Systems Ch4 – Embedded Linux distributions Ch5 – Case study: Xilinx PowerPC Linux Ch5 bis – Case study: Xilinx Zynq-7000 Linux Ch6 – Device driver development Polytech’Nice Sophia - Département Electronique - Université de Nice Sophia Antipolis - S. Bilavarn - 2 - Linux for Embedded Systems Introduction to Embedded Linux Key features Embedded Linux development Linux kernel development Polytech’Nice Sophia - Département Electronique - Université de Nice Sophia Antipolis - S. Bilavarn - 3 - Embedded Linux What is Embedded Linux ? Strictly speaking Embedded Linux is an operating system based on Linux and adapted specifically to the constraints of embedded systems. Unlike standard versions of Linux for Personal Computers, embedded Linux is designed for systems with limited resources Memory: few RAM, sometimes no Memory Management Unit (MMU) Storage: Flash instead of hard disk drive Since embedded systems are often designed for domain specific purposes and specific target platforms, they use kernel versions that are optimized for a given context of application. This results in different Linux kernel variants that are also called Linux distributions Polytech’Nice Sophia - Département Electronique - Université de Nice Sophia Antipolis - S. Bilavarn - 4 - Embedded Linux What is embedded Linux ? Embedded Linux is used in embedded systems such as mobile phones, personal digital assistants (PDA), media players set-top boxes, and other consumer electronics devices networking equipment machine control, industrial automation navigation equipment medical instruments Key features runs in a small embedded system, typically booting out of Flash, no hard disk drive, no full-size video display, and take far less than 2 minutes to boot up, sometimes supports real- time tasks.
    [Show full text]
  • Cross-Compiler Bipartite Vulnerability Search
    electronics Article Cross-Compiler Bipartite Vulnerability Search Paul Black * and Iqbal Gondal Internet Commerce Security Laboratory (ICSL), Federation University, Ballarat 3353, Australia; [email protected] * Correspondence: [email protected] Abstract: Open-source libraries are widely used in software development, and the functions from these libraries may contain security vulnerabilities that can provide gateways for attackers. This paper provides a function similarity technique to identify vulnerable functions in compiled programs and proposes a new technique called Cross-Compiler Bipartite Vulnerability Search (CCBVS). CCBVS uses a novel training process, and bipartite matching to filter SVM model false positives to improve the quality of similar function identification. This research uses debug symbols in programs compiled from open-source software products to generate the ground truth. This automatic extraction of ground truth allows experimentation with a wide range of programs. The results presented in the paper show that an SVM model trained on a wide variety of programs compiled for Windows and Linux, x86 and Intel 64 architectures can be used to predict function similarity and that the use of bipartite matching substantially improves the function similarity matching performance. Keywords: malware similarity; function similarity; binary similarity; machine-learning; bipar- tite matching 1. Introduction Citation: Black, P.; Gondal, I. Cross-Compiler Bipartite Function similarity techniques are used in the following activities, the triage of mal- Vulnerability Search. Electronics 2021, ware [1], analysis of program patches [2], identification of library functions [3], analysis of 10, 1356. https://doi.org/10.3390/ code authorship [4], the identification of similar function pairs to reduce manual analysis electronics10111356 workload, [5], plagiarism analysis [6], and for vulnerable function identification [7–9].
    [Show full text]
  • COSMIC C Cross Compiler for Stmicroelectronics ST7 Family
    COSMIC C Cross Compiler for STMicroelectronics ST7 Family COSMIC’s C cross compiler, cxST7 for the STMicroelectronics ST7 family of microcontrollers, incorporates over fifteen years of innovative design and development effort. Used in the field since 1997, cxST7 is reliable, field-proven, and incorporates many features to help ensure your embedded ST7 design meets and exceeds performance specifications. The C Compiler package for Windows includes: COSMIC integrated development environment (IDEA), optimizing C cross compiler, macro assembler, linker, librarian, object inspector, hex file generator, object format converters, debugging support utilities, run-time libraries and a compiler command driver. The PC compiler package runs under Windows 95/98/ME/NT4/2000 and XP.. Key Features Microcontroller-Specific Design Supports All ST7 Family Microcontrollers cxST7, is designed specifically for the STMicroelectronics ST7 family of microcontrollers; all ST7 family processors are ANSI C Implementation supported. A special code generator and optimizer targeted for the ST7 family eliminates the overhead and complexity of Extensions to ANSI for Embedded Systems a more generic compiler. You also get header file support for Global and Processor-Specific Optimizations many of the popular ST7 peripherals, so you can access their memory mapped objects by name either at the C or assembly Optimized Function Calling language levels. Debug Fully Optimized Code ANSI / ISO Standard C Automatic Checksums This implementation conforms with the ANSI and ISO Real and Simulated Stack models Standard C syntax specifications which helps you protect Smart Linker optimizes RAM usage your software investment by aiding code portability and reliability. C support for Zero Page Data C support for Interrupt Handlers Flexible User Interface The Cosmic C compiler can be used with the included Three In-Line Assembly Methods Windows IDEA or as a Windows 32-bit command line Assembler Supports C #defines and #includes application for use with your favorite editor, make or source code control system.
    [Show full text]
  • GNAT User's Guide
    GNAT User's Guide GNAT, The GNU Ada Compiler For gcc version 4.7.4 (GCC) AdaCore Copyright c 1995-2009 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts and with no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License". About This Guide 1 About This Guide This guide describes the use of GNAT, a compiler and software development toolset for the full Ada programming language. It documents the features of the compiler and tools, and explains how to use them to build Ada applications. GNAT implements Ada 95 and Ada 2005, and it may also be invoked in Ada 83 compat- ibility mode. By default, GNAT assumes Ada 2005, but you can override with a compiler switch (see Section 3.2.9 [Compiling Different Versions of Ada], page 78) to explicitly specify the language version. Throughout this manual, references to \Ada" without a year suffix apply to both the Ada 95 and Ada 2005 versions of the language. What This Guide Contains This guide contains the following chapters: • Chapter 1 [Getting Started with GNAT], page 5, describes how to get started compiling and running Ada programs with the GNAT Ada programming environment. • Chapter 2 [The GNAT Compilation Model], page 13, describes the compilation model used by GNAT. • Chapter 3 [Compiling Using gcc], page 41, describes how to compile Ada programs with gcc, the Ada compiler.
    [Show full text]
  • The GNU Toolchain for ARM Targets HOWTO Wookey Chris Rutter Jeff Sutherland Paul Webb
    This chapter contains information on building a GNU toolchain for ARM targets. The GNU Toolchain for ARM targets HOWTO Wookey Chris Rutter Jeff Sutherland Paul Webb This document contains information on setting up a GNU toolchain for ARM targets. It details both some pre-compiled toolchains which you can install, and how to compile your own toolchain, as either a native or a cross-compiler. 1. Credits This document is based on the work of Chris Rutter (now, sadly, deceased) who’s ’Building the GNU toolchain for ARM targets’ document was gospel for some time. It eventually became out of date so Wookey (<[email protected]>) updated it and gave it a substantion rewrite, adding the pre-built toolchain info at the same time. Paul Webb (<[email protected]>) did the initial conversion to DocBook, Phil 1 The GNU Toolchain for ARM targets HOWTO Blundell (<[email protected]>) provided info on the current state of the art and comments on the draft. Jeff Sutherland (<[email protected]>) then fixed the bits that were still wrong, and now maintains the doc, along with Wookey. Thanx to all. As well as being on-line as a stand-alone HOWTO, this document is also available as a chapter of the book: A ’Guide to ARMLinux for Developers’ (http://www.aleph1.co.uk/armlinux/thebook.html) 2 This chapter contains information on building a GNU toolchain for ARM targets. 1. Toolchain overview The toolchain actually consists of a number of components. The main one is the compiler itself gcc, which can be native to the host or a cross-compiler.
    [Show full text]
  • Build Your Own MIPS Cross Compiler Under Linux
    COSE222, COMP212 Computer Architecture Build MIPS Cross-Compiler Yourself You are going to design a MIPS CPU as the final project. The MIPS CPU takes its machine code as input and executes the code. So, you should be able to generate the MIPS’ machine code from low and/or high-level languages. The MIPS assembler and linker convert your assembly programs into machine codes. To convert a program written in a high-level language (such as C), you should have a compiler (such as gcc) installed. Since your machine is based on x86, you should have the MIPS cross-compiler to generate the MIPS machine code on an x86 machine. This note explains how to install MIPS compiler, assembler and linker using GNU bin utilities under Linux. Build the MIPS assembler, linker and Cross-Complier from GNU bin utilities Under Linux or Cygwin Build the MIPS assembler and linker 1. Download the latest GNU bin utility, binutils-2.19.1.tar.bz2, either from http://ftp.gnu.org/gnu/binutils/ or from the class website at http://esca.korea.ac.kr/teaching/cose222_CA/hw-sw-tools/binutils-2.19.1.tar.bz2 2. Create directories where the downloaded file is copied and where the compiled binaries are located. mkdir mips-elf // this is a directory where compiled binaries are located mkdir comparch cd comparch cp ~/Downloads/binutils-2.19.1.tar.bz2 . 3. Untar (Uncompress) the file tar jxvf binutils-2.19.1.tar.bz2 4. Move to the bin utility directory cd binutils-2.19.1 5. Set environment for compilation export TARGET=mips-elf export PREFIX=~/$TARGET export PATH=$PATH:$PREFIX/bin // include the new path, so you can run executable anywhere 6.
    [Show full text]