1 NOTES file for SDCC pic16 port
4 Current pic16 port status is: Development
6 Some things may change without notification between port updates. The latest
7 CVS snapshot is guarenteed to compile without problems, but does not
8 guarantee backwards compatibility.
10 For any questions please ask the current port
14 Vangelis Rokas <vrokas@otenet.gr>
16 Other people to contact:
17 Scott Dattalo <scott@dattalo.com>
21 2004-Jan-11 Vangelis Rokas
24 The current release of the port can produce object code which is not
25 completely bug free. To use the new features the user should enable them via
26 command line arguments. A sane set of command arguments that I use to test
30 --debug enable sdcc debug information
31 --debug-xtra enable pic16 port debug information (most useful)
32 --debug-ralloc enable register allocator debug messages
33 --pcode-verbose enable verbose pcode generator messages
36 --pgen-banksel enable banksel directives for the assembler
37 This will be turned on by default later, but left as
39 --pomit-config-words does not emit configuration instruction in
40 the translation This is useful when copmiling
41 multiple sources, when you do not want multiple
42 config instructions in the end file
43 --pomit-ivt disables the dumping of the interrupt vector tables
44 in the translation for the same reasons as above
45 --penable-stack enables stack support. This option uses stack to
46 pass function arguments, and reuses registers between
47 functions by saving the registers used in the function
51 --all-callee-saves you may omit this options as the port
52 enables it by default, all functions are currently
53 compiled as reentrant and they are marked as
55 --no-peep peephole optimizer is better to be switched off,
56 because it behaves strangely in some cases
57 --fommit-frame-pointer this omits frame pointer in functions that
58 don't use registers (maybe changed later, not
63 The current implementation puts every function in its own code section in
64 PIC's program memory. This may not be the standard, but I think its more
68 Since SDCC is goind for a release, its better to document pragmas available.
71 The 'code' pragma emits a function's code at a specific address in program
72 memory. Currently it is only used for functions.
74 #pragma code [function_name] [address]
77 The 'stack' pragma initializes the stack/frame pointer at an address of the
78 data ram other than the default (which is the end of the available data ram)
80 #pragma stack [address]
83 The 'maxram' pragma sets maximum data ram of the device. Currently is not
84 used at all, but it may be useful in the future when devices with external
85 memory will be supported.
87 #pragma maxram [max_address]
90 4. Internal compiler functions
91 Internal SDCC functions like, __fsmul, etc... are currently supported by the
92 port, but the libraries for the pic16 port are not yet ready. So one cannot
93 use long and float variables.
96 5. Special Function Registers (SFRs)
97 The processor SFRs are not anymore declared in any header file. The user can
98 define by himself all the needed SFR's. The code to that is:
100 sfr at [sfr_address] [sfr_name];
102 Where sfr_address is the SFR address in the data ram, and sfr_name is the
103 name of the SFR. i.e.: