17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PreProcessor<br />

object file. It is an error if any #ORG overlaps between files unless the #ORG<br />

matches exactly.<br />

Examples:<br />

#ORG 0x1E00, 0x1FFF<br />

MyFunc() {<br />

//This function located at 1E00<br />

}<br />

#ORG 0x1E00<br />

Anotherfunc(){<br />

// This will be somewhere 1E00-1F00<br />

}<br />

#ORG 0x800, 0x820 {}<br />

//Nothing will be at 800-820<br />

#ORG 0x1B80<br />

ROM int32 seridl_N0=12345;<br />

#ORG 0x1C00, 0x1C0F<br />

CHAR CONST ID[10}= {"123456789"};<br />

//This ID will be at 1C00<br />

//Note some extra code will<br />

//proceed the 123456789<br />

#ORG 0x1F00, 0x1FF0<br />

Void loader (){<br />

.<br />

.<br />

.<br />

}<br />

Example Files:<br />

Also See:<br />

loader.c<br />

#ROM<br />

#pin_select<br />

Syntax:<br />

Elements:<br />

#PIN_SELECT function=pin_xx<br />

function is the Microchip defined pin function name, such as:<br />

U1RX (UART1 receive), INT1 (external interrupt 1), T2CK<br />

(timer 2 clock), IC1 (input capture 1), OC1 (output capture<br />

1).<br />

INT1 External Interrupt 1<br />

INT2 External Interrupt 2<br />

INT3 External Interrupt 3<br />

T0CK<br />

Timer0 External Clock<br />

T3CK<br />

Timer3 External Clock<br />

CCP1 Input Capture 1<br />

CCP2 Input Capture 2<br />

121

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

Saved successfully!

Ooh no, something went wrong!