C Compiler for the PICmicro Devices User's Manual - Robotics UWA
The PDF-edition of the manual can be ...... Starting CC5X from Windows can be done from the Start->Run menu. Then type the full path ..... Math libraries may have to be included for math operations (Chapter 6.5 Library Support on page 61).
COMPILER BUG REPORTS: The compiler has been carefully tested and debugged. It is, however, not possible to guarantee a 100 % error free product. If the compiler generates application code bugs, it is almost always possible to rewrite the program slightly in order to avoid the bug. #pragma optimize can be used to avoid optimization bugs. Other #pragma statements are also useful. Please report cases of bad generated code and other serious program errors. 1) Investigate and describe the problem. If possible, please provide a complete C example program that demonstrates the problem. A fragment from the generated assembly file is sometimes enough. 2) This service is intended for difficult compiler problems (not application problems). 3) Language: English 4) State the compiler version. 5) Send your report to [email protected], or by fax to (+47) 73 96 51 84.
Document version: G
2
CC5X C Compiler
B Knudsen Data
CONTENTS 1 INTRODUCTION ..................................................................................................................................7 1.1 SUPPORTED DEVICES ..........................................................................................................................8 1.2 INSTALLATION AND SYSTEM REQUIREMENTS ....................................................................................8 Support for long file names ..................................................................................................................8 User interface .......................................................................................................................................8 1.3 MPLAB SUPPORT ..............................................................................................................................9 1.4 SUMMARY OF DELIVERED FILES ........................................................................................................9 1.5 SHORT PROGRAM EXAMPLE .............................................................................................................10 1.6 DEFINING THE PICMICRO DEVICE ....................................................................................................11 1.7 WHAT TO DO NEXT ...........................................................................................................................12 2 VARIABLES.........................................................................................................................................13 2.1 INFORMATION ON RAM ALLOCATION ..............................................................................................13 2.2 DEFINING VARIABLES ......................................................................................................................13 Integer variables.................................................................................................................................14 Floating point .....................................................................................................................................15 IEEE754 interoperability ...................................................................................................................15 Fixed point variables..........................................................................................................................16 Assigning variables to RAM addresses...............................................................................................18 Supported type modifiers....................................................................................................................19 Local variables ...................................................................................................................................19 Temporary variables ..........................................................................................................................20 Arrays, structures and unions.............................................................................................................20 Bitfields...............................................................................................................................................21 Typedef ...............................................................................................................................................21 2.3 USING RAM BANKS.........................................................................................................................21 The bank type modifier .......................................................................................................................22 RAM bank selection bits .....................................................................................................................22 Local user update regions ..................................................................................................................23 2.4 POINTERS .........................................................................................................................................23 Pointer models....................................................................................................................................24 The 12 bit Core...................................................................................................................................24 The 14 bit core: the IRP bit ................................................................................................................26 2.5 CONST DATA SUPPORT.....................................................................................................................27 Storing 14 bit data ..............................................................................................................................27 Data of size 16 bit or more .................................................................................................................28 Code pages .........................................................................................................................................28 Merging data ......................................................................................................................................28 Examples ............................................................................................................................................29 3 SYNTAX................................................................................................................................................30 3.1 STATEMENTS ....................................................................................................................................30 if statement .........................................................................................................................................30 while statement ...................................................................................................................................30 for statement .......................................................................................................................................30 do statement........................................................................................................................................31 switch statement..................................................................................................................................31 break statement...................................................................................................................................31 continue statement..............................................................................................................................32 return statement..................................................................................................................................32 goto statement.....................................................................................................................................32 3.2 ASSIGNMENT AND CONDITIONS .......................................................................................................32
All rights reserved. ... instance by exchanging this manual as a permission key. ...... The compiler produces an error message when page limits are exceeded.
Produces binary, assembly, list, COD, error, function outline and variable files ...... The CC5X compiler also allows the bitfield syntax to be used outside ...
Oct 2, 2011 - 6.7.2 Passing immediate ROM data to a subroutine . ..... memory model (no banks, âsmallâ stacks, âfarâ pointers or other tricky .... move v to W.
To download the latest version of MPLAB to go Microchip's web page at: http://www.microchip. .... The text will be highlighted up to the corresponding } or ). Toggle ...... #USE I2C to strobe the watch-dog timer in the slave mode while waiting.
hand so that your questions can be answered in an efficient manner. Again, we .... Directories listed on the command line .... In order for this function to work the program must have been ..... C directly to a bit in the processors special function
Mar 6, 2013 - 9.7.3 Passing ROM data to a subroutine with a pointer to ROM . . . . . . . . . 19 ..... #pragma config key=symbol,... Please ... 3. Support for devices with SFR out of access bank .... writing. Please see the section «How to contribute
Jul 9, 2015 - cpik is an ANSI-C compiler for Microchip PIC 18 microcontrollers. It is a ..... âsmallâ stacks, âfarâ pointers or other tricky ways to save memory but to confuse everybody. ... FSR2 is used for fast memory moves together with FS
Jan 4, 2014 - 10 Support of C language on PIC-18 architecture. 16. 10.1 Stacks ..... #pragma config key=symbol,... Please refer to the section 9.4.3 for details.
WDT or Watch Dog Timer . ...... The output of the Documentation Generator is exported in a Rich Text File format which ..... our example could go into prject.h. ⢠It is best to ...... See MCU Documentation.pdf for detailed information on these file
Nov 9, 2011 - very usable and produces a good code. It is well ... certain that cpik will not work if you use a relative path. .... Due to hardware limitation, the total amount of local non static data declared in a function can't ...... information
writing. Please see the section «How to contribute to the cpik project ?» for details. ... can be addressed to Alain Gibaud ([email protected]). 5 A very special ...
quickly design application software for these controllers in a highly readable, ..... number is locations of code storage is required. If s is ?, ..... into a spreadsheet program. ...... Uses trig functions to calculate the liquid in a odd shaped tan
Aug 14, 2002 - Please note that The ARM-unit may only be transported in the ..... The ARM User's manual 500.012.1.009 - Chapter 1: The ARM-unit Manipulator. 7 ... The ARM may partly fold out if the wheelchair takes a turn at high speed. .... (pin-lay
JavaSketchpad documentation see the website of Key Curriculum Press : ... The element id can be just its rank in the element list. {A} Point (100, 200);. {B} Point ...
Thank you for choosing 2.4 G ratio remote control digital products, if you are the first ... electricity, it could happen those phenomenon like inadequate control or out of ... *Simulator port: PS-2 ..... You can download from our website : WWW.
The device under test is manufactured by the grantee (Continental Corporation) and sold as an. OEM product. Per 47 CFR 2.909, 2.927, 2.931, 2.1033, 15.15(b) etcâ¦, the grantee must ensure the end-user has all applicable / appropriate operating instr
Apr 20, 2009 - ATTACHING THE BAG AND BRIDLE LINE (METHOD A and B). 12-13. INSTALLING THE ... Engineering: We went about the design in the following fashion. First of all we .... RED Type 17 static line attachment. Main Canopies ...
precompiled object files that may be used with Microchip's MPLAB® C18 C ... read the associated readme files (ASCII text file) included with the software.
Aug 4, 2006 - How much time do math operations take? ..... The bottom of the menu has an icon to terminate PCW. Project Menu Ribbon. Project. Open an ...
Aug 4, 2006 - strives to answer technical support timely and thoroughly. Technical ..... A program is made up of the following four elements in a file: Comment.
May 15, 2009 - Despite these drawbacks, cpik is very usable and produces good code. ...... remember that input buffer is unique and should be flushed when ...
fully charge it at least once a year to help maintain battery functionality. compliance could void the user's authority to operate the equipment. If you have questions about this product, visit playstation.com/helpme. Avoid prolonged use of this prod
AssetView 3.2 - User's Manual ...... Indicates the maintenance should be executed in the near future. Indicates the ...... process or Upper Pos Calibration process.