MPLAB ? C32 C COMPILER
USER ’S GUIDE
Chapter 2. Library Environment
2.1
2.2
INTRODUCTION
This chapter discusses using the MPLAB C32 C libraries.
HIGHLIGHTS
Items discussed in this chapter are:
?
?
?
?
2.3
2.4
STANDARD I/O
The standard input/output library functions support two modes of operation, simple and
full. The simple mode supports I/O via a two function interface on a single character
device used for stdout , stdin and stderr . The full mode supports the complete set
of standard I/O functions. The library will use full mode if the application calls fopen ,
otherwise simple mode is used.
Simple mode performs I/O using four functions, _mon_puts, _mon_write ,
_mon_getc and _mon_putc , to perform the raw device I/O. The default
implementation of _mon_getc always returns failure (i.e., by default, character input is
not available). The default implementation of _mon_putc writes a character to UART2.
It is assumed that the application has performed any necessary initialization of the
UART. The default implementations of _mon_puts and _mon_write both simply call
_mon_putc iteratively. All four functions are defined as weak functions, and so may be
overridden by the user application if different functionality is desired. See the MPLAB
C32 C Compiler Libraries for detailed information on these functions.
An application using full mode must supply the standard low-level POSIX I/O functions
open , read , write , lseek and close . No default implementations are provided. See
the “ MPLAB C32 C Compiler Libraries” (DS51685) for detailed information on these
functions.
WEAK FUNCTIONS
The standard library provides a number of weak function implementations of low level
interfaces. User applications which use this functionality will often implement more full
featured versions of these functions. For details of the specific functions, see the
“ MPLAB C32 C Compiler Libraries ” (DS51685).
As described above, the standard I/O library functions utilize a set of weak functions for
simple output: _mon_write , _mon_putc , _mon_puts , and _mon_getc .
The standard startup code (See Section 5.7 “Startup and Initialization” ) invokes a
number of weak functions directly and provides weak handlers for bootstrap exceptions
and general exceptions: _on_reset , _nmi_handler ,
_bootstrap_exception_handler , _general_exception_handler , and
_on_bootstrap .
? 2007 Microchip Technology Inc.
DS51686A-page 43
相关PDF资料
SW300003-EVAL LIBRARY SOFT MODEM-EVAL ONLY
SW300010-EVAL SPEECH RECOG LIBRARY-EVAL ONLY
SW300040-EVAL LIBRARY NOISE SUPPR-EVAL ONLY
SW300060-EVAL LIBRARY ACOUSTIC ECHO-EVAL ONLY
SW300070-EVAL SOFTWARE LIBR ENC/DEC EVAL ONLY
SW500012 HI-TECH C PRO FOR PIC32
SY87701LHI-EVAL BOARD EVAL SY87701 EXPERIMENT
SY87729LHI-EVAL BOARD EVAL N SY87729 EXPERIMENT
相关代理商/技术参数
SW006021-1 制造商:Microchip Technology 功能描述:MPLAB XC8 STANDARD COMPILER 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 STD 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 STANDARD 制造商:Microchip Technology Inc 功能描述:COMPILER, MPLAB XC8, STANDARD 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 ANSI C Compiler for the PIC10 (12),(16),(18) (Workstation License) 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 Standard Compiler 制造商:Microchip Technology Inc 功能描述:OPTOCOUPLERS; Core Architecture:PIC; Software Edition:Standard
SW006021-1N 制造商:Microchip Technology 功能描述:MPLAB XC8 STANDARD COMPILER (F 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 STANDARD COMPILER (FLOATING LICENSE) - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 STD FLOAT LIC 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 Standard Compiler (Fltng Lic)
SW006021-2 制造商:Microchip Technology 功能描述:MPLAB XC8 PRO COMPILER WORKSTATION LICENSE 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 PRO COMPILER - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 PRO 制造商:Microchip Technology Inc 功能描述:COMPILER, MPLAB XC8, PRO 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 ANSI PRO Compiler for the PIC10 (12),(16),(18) (Workstation License) 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 PRO Compiler 制造商:Microchip Technology Inc 功能描述:SOFTWARE TOOL, MPLAB XC8 PRO COMPILER; Core Architecture:PIC; Supported Families:PIC10, PIC16, PIC18; Software Edition:Linux; License Type:Floating - node; No. of User Licenses:1; Supported Hosts:-
SW006021-2C 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 PRO CHI
SW006021-2N 功能描述:开发软件 MPLAB XC8 PRO Compiler (Fltng Lic) RoHS:否 制造商:Atollic Inc. 产品:Compilers/Debuggers 用于:ARM7, ARM9, Cortex-A, Cortex-M, Cortex-R Processors
SW006022-1 制造商:Microchip Technology 功能描述:MPLAB XC16 STANDARD COMPILER 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 STANDARD COMPILER - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC16 STD 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC16 STANDARD 制造商:Microchip Technology Inc 功能描述:COMPILER, MPLAB XC16, STANDARD 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 Standard Compiler (Workstation License) 制造商:Microchip Technology Inc 功能描述:OPTOCOUPLERS; Core Architecture:PIC, dsPIC; Software Edition:Standard
SW006022-1N 制造商:Microchip Technology 功能描述:MPLAB XC16 STANDARD COMPILER ( 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 STANDARD COMPILER (FLOATING LICENSE) - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC16 FLOAT LIC 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 Standard Compiler (Fltng Lic)
SW006022-2 功能描述:开发软件 MPLAB XC16 PRO Compiler RoHS:否 制造商:Microchip Technology 产品: 用于: