[GNU M68HC11 HOME]

Newlib for Motorola 68HC11 & 68HC12

Binutils | Gcc | Gdb | Newlib


Overview
Compiler
Documentation
Examples
Misc
Help
IDE & Tools

Download
Install

Links
Projects






The Newlib is a collection of simple ANSI C library, math library and collection of board support packages. Newlib documentation is available on the net via: Newlib Documentation.

1. Using the Libraries

  • Compiling
    To use these libraries, there is nothing special to do. The gcc front-end passes the good -I options so that include files are searched correctly.
  • Linking
    At link time, gcc does not pass the -lc nor the -lbcc libraries. These libraries must be passed manually. They should be passed as -lc -lbcc -lc. The -mshort and -fshort-double options must also be passed as they tell gcc which multi-lib library it has to get.

    The -m68hc11 and -m68hc12 options may be used also. They operate on the target CPU type during the code generation and also at link time to choose the correct set of libraries. If the option is forgotten or wrong, a mix of 68HC11 and 68HC12 object files and/or libraries can occur. The linker will issue an error if such situation happens.

2. Problems

The libc and libm libraries can make your program quite huge. This is the case if you use printf or sprintf because these function support the floating point translations.

This libc is however useful if you only use small functions such as strcpy, strcmp, memmove, and other things like that.

The libbcc integrates a small implementation of printf, sprintf and fprintf. This is intended to to be used during the GCC validation since several GCC test programs use these functions. If you want to use that small printf, you must pass the following options to gcc: -lbcc -lc -lbcc.

[GNU M68HC11 HOME]
Binutils | Gcc | Gdb | Newlib

    Last modified,
    May 8, 2001
[ Copying ]     [ Feedback to Stephane.Carrez@worldnet.fr ]