17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

on<br />

Re-enables the code profiling that was<br />

previously disabled with a #profile off<br />

command. This will use the last options<br />

before disabled with the off command.<br />

Purpose:<br />

Examples:<br />

Example<br />

Files:<br />

Also See:<br />

Large programs on the microcontroller may generate lots of profile data, which<br />

may make it difficult to debug or follow. By using #profile the user can<br />

dynamically control which points of the program are being profiled, and limit<br />

data to what is relevant to the user.<br />

#profile off<br />

void BigFunction(void)<br />

{<br />

// BigFunction code goes here.<br />

// Since #profile off was called above,<br />

// no profiling will happen even for other<br />

// functions called by BigFunction().<br />

}<br />

#profile on<br />

ex_profile.c<br />

#use profile(), profileout(), Code Profile overview<br />

#reserve<br />

Syntax:<br />

Elements:<br />

Purpose:<br />

Examples:<br />

Example<br />

Files:<br />

Also See:<br />

#RESERVE address<br />

or<br />

#RESERVE address, address, address<br />

or<br />

#RESERVE start:end<br />

address is a RAM address, start is the first address and end is the last address<br />

This directive allows RAM locations to be reserved from use by the<br />

compiler. #RESERVE must appear after the #DEVICE otherwise it will have no effect.<br />

When linking multiple compilation units be aware this directive applies to the final object<br />

file.<br />

#DEVICE PIC16C74<br />

#RESERVE 0x60:0X6f<br />

ex_cust.c<br />

#ORG<br />

126

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!