Jump to content
Sign in to follow this  
TTom

Linker Problem

Recommended Posts

post-8177-0-09337700-1413332495_thumb.jpgI am new to Programming in C, and new to SourceBoost.

I have taken a program off the web to get started.

I am using is MPLAB 8.7 and the ICD2.

Here is my program:

//***************************************************************************************
// Example code for EZ-Controller available from http://www.sourceboost.com/Products/Products.html
//
// EXAMPLE CODE TO SHOW HOW TO FLASH A LED
// YOU JUST HAVE TO CONNECT A LED TO PORT RB7 THROUGH
// A 330R RESISTOR |\
// ______/\ /\ /\ _____| \_________
// RB7 \/ \/ \/ A | / K GND
// |/
//
// 330R (ORANGE,ORANGE,BROWN) LED
//
// Code was created by Pavel Baranov and is based
// on the original assembly code from Richard Martin
// at www.ez-devices.com
//
//**************************************************************************************
#include <system.h>
#include <icd2.h>
#pragma CLOCK_FREQ 20000000
void interrupt( void )
{
portb ^= 128;
clear_bit( intcon, T0IF ); //clear TMR0 overflow flag
}
void main()
{
trisb &= 127;
portb &= 127;
// configure Timer0
//set_bit( option_reg, TMR0ON ); //enable timer
//clear_bit( option_reg, T08BIT ); //set 16-bit mode
clear_bit( option_reg, T0CS ); // select internal clock
clear_bit( option_reg, PSA ); // select prescaler
set_bit( option_reg, PS0 ); // set 1:64 prescale ratio
clear_bit( option_reg, PS1 );
set_bit( option_reg, PS2 );
// enable interrupts
set_bit( intcon, TMR0IE ); //enable TMR0 overflow bit
set_bit( intcon, GIE );
while( 1 ); //enter infinite loop

 

 

***************************************************************************************8

 

Here is what is displayed in the Build window:

 

Clean: Deleting intermediary and output files.

Clean: Done.

Executing: "C:\Program Files\SourceBoost\boostc_pic16.exe" C:\PIC_BoostC\ez\interrupt.c -O2 -W1 -t 16F886

BoostC Optimizing C Compiler Version 7.22 (for PIC16 architecture)

http://www.sourceboost.com

Copyright© 2004-2014 Pavel Baranov

Copyright© 2004-2014 David Hobday

 

Single user Lite License (Unregistered) for 0 node(s)

Limitations: PIC12,PIC16 max code size:2048 words, max RAM banks:2, Non commercial use only

 

 

C:\PIC_BoostC\ez\interrupt.c

<C:\Program Files\SourceBoost\include\icd2.h> @ 20: MESSAGE: "Including ICD2 declarations (icd2.h)"

<C:\Program Files\SourceBoost\include\icd2.h> @ 912: MESSAGE: "Warning: ICD2 Reserved ROM address range:0x1F00-0x1FFF (use linker -rt option)"

 

success

BUILD FAILED: Tue Oct 14 16:27:01 2014

 

I have no idea what to do with the line :

<C:\Program Files\SourceBoost\include\icd2.h> @ 912: MESSAGE: "Warning: ICD2 Reserved ROM address range:0x1F00-0x1FFF (use linker -rt option)"

 

I know I am supposed to use the Linker and the -rt option, but I have no idea how to do this.

 

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×