Next:
3.1 Compiling
Up:
SDCC Compiler User Guide
Previous:
2.9.5 sdcdb - Source
Contents
Index
3
. Using SDCC
Subsections
3
.
1
Compiling
3
.
1
.
1
Single Source File Projects
3
.
1
.
2
Postprocessing the Intel Hex file
3
.
1
.
3
Projects with Multiple Source Files
3
.
1
.
4
Projects with Additional Libraries
3
.
1
.
5
Using sdcclib to Create and Manage Libraries
3
.
2
Command Line Options
3
.
2
.
1
Processor Selection Options
3
.
2
.
2
Preprocessor Options
3
.
2
.
3
Linker Options
3
.
2
.
4
MCS51 Options
3
.
2
.
5
DS390 / DS400 Options
3
.
2
.
6
Z80 Options
3
.
2
.
7
GBZ80 Options
3
.
2
.
8
Optimization Options
3
.
2
.
9
Other Options
3
.
2
.
10
Intermediate Dump Options
3
.
2
.
11
Redirecting output on Windows Shells
3
.
3
Environment variables
3
.
4
Storage Class Language Extensions
3
.
4
.
1
MCS51/DS390 Storage Class Language Extensions
3
.
4
.
1
.
1
data / near
3
.
4
.
1
.
2
xdata / far
3
.
4
.
1
.
3
idata
3
.
4
.
1
.
4
pdata
3
.
4
.
1
.
5
code
3
.
4
.
1
.
6
bit
3
.
4
.
1
.
7
sfr / sfr16 / sfr32 / sbit
3
.
4
.
1
.
8
Pointers to MCS51/DS390 specific memory spaces
3
.
4
.
1
.
9
Notes on MCS51 memory layout
3
.
4
.
2
Z80/Z180 Storage Class Language Extensions
3
.
4
.
2
.
1
sfr (in/out to 8-bit addresses)
3
.
4
.
2
.
2
banked sfr (in/out to 16-bit addresses)
3
.
4
.
2
.
3
sfr (in0/out0 to 8 bit addresses on Z180/HD64180)
3
.
4
.
3
HC08 Storage Class Language Extensions
3
.
4
.
3
.
1
data
3
.
4
.
3
.
2
xdata
3
.
5
Absolute Addressing
3
.
6
Parameters & Local Variables
3
.
7
Overlaying
3
.
8
Interrupt Service Routines
3
.
8
.
1
General Information
3
.
8
.
1
.
1
Common interrupt pitfall: variable not declared
volatile
3
.
8
.
1
.
2
Common interrupt pitfall:
non-atomic access
3
.
8
.
1
.
3
Common interrupt pitfall:
stack overflow
3
.
8
.
1
.
4
Common interrupt pitfall:
use of non-reentrant functions
3
.
8
.
2
MCS51/DS390 Interrupt Service Routines
3
.
8
.
3
HC08 Interrupt Service Routines
3
.
8
.
4
Z80 Interrupt Service Routines
3
.
9
Enabling and Disabling Interrupts
3
.
9
.
1
Critical Functions and Critical Statements
3
.
9
.
2
Enabling and Disabling Interrupts directly
3
.
9
.
3
Semaphore locking (mcs51/ds390)
3
.
10
Functions using private register banks(mcs51/ds390)
3
.
11
Startup Code
3
.
11
.
1
MCS51/DS390 Startup Code
3
.
11
.
2
HC08 Startup Code
3
.
11
.
3
Z80 Startup Code
3
.
12
Inline Assembler Code
3
.
12
.
1
A Step by Step Introduction
3
.
12
.
2
Naked Functions
3
.
12
.
3
Use of Labels within Inline Assembler
3
.
13
Interfacing with Assembler Code
3
.
13
.
1
Global Registers used for Parameter Passing
3
.
13
.
2
Registers usage
3
.
13
.
3
Assembler Routine (non-reentrant)
3
.
13
.
4
Assembler Routine (reentrant)
3
.
14
int (16 bit) and long (32 bit) Support
3
.
15
Floating Point Support
3
.
16
Library Routines
3
.
16
.
1
Compiler support routines (_gptrget, _mulint etc.)
3
.
16
.
2
Stdclib functions (puts, printf, strcat etc.)
3
.
16
.
2
.
1
<stdio.h>
3
.
16
.
2
.
1
.
1
getchar(), putchar()
3
.
16
.
2
.
1
.
2
printf()
3
.
16
.
2
.
2
<malloc.h>
3
.
16
.
3
Math functions (sinf, powf, sqrtf etc.)
3
.
16
.
3
.
1
<math.h>
3
.
16
.
4
Other libraries
3
.
17
Memory Models
3
.
17
.
1
MCS51 Memory Models
3
.
17
.
1
.
1
Small, Medium and Large
3
.
17
.
1
.
2
External Stack
3
.
17
.
2
DS390 Memory Model
3
.
18
Pragmas
3
.
19
Defines Created by the Compiler
Bdale Garbee 2008-05-15