TCP/IP Lean: Web Servers for Embedded Systems, Second Edition

Appendix D: PICmicro -Specific Issues

Compiler Support

When I started PICmicro development, I happened to use the Custom Computer Services (CCS) PIC16 compiler, and the early software could only be used with this. As development progressed, I added compatibility with the Hitech PIC16 compiler. Through the judicial use of macros and conditional compilation, the same set of source files could be used for both compilers without any modifications.

As the software developed, I needed extra RAM and ROM for some protocols (or some combinations of protocols), so I adapted the code to be compatible with the PIC18 families. With yet more macros and conditionals, all four compiler/processor combinations could be supported from one set of source code.

Well, that was the theory. In practice, some problems remain with the different approach taken by the two PIC16 compilers, and also with the newness of the PIC18 development tools.

PIC16 Compilers

Aside from the cosmetic issues (such as the format of I/O pin definitions), there are some fundamental differences between the CCS and Hitech PIC16 compilers. Note that these restrictions apply to the current compiler versions at the time of writing. They may have been fixed by the time you read this.

  • Linking The CCS compiler has no linker, so all source files have to be included in the main file a minor inconvenience.

  • Variable sizes The early CCS compilers had strange variable sizes (eight-bit integers and 16-bit longs) and no native support for 32-bit arithmetic. The version 3 compilers fixed these problems,...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Microprocessor and IC Programmers, Compilers, and Debuggers
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.