Jump to content


Photo

Failed To Load Filename.cog


3 replies to this topic

#1 Mindbender

Mindbender

    Newbrie

  • EstablishedMember
  • 5 posts

Posted 29 July 2010 - 06:51 PM

Hi there again,
I'm trying to compile a .c program using the sourceBoost compiler. Here is the code
// Timer.c

#include <system.h>

//config device
#pragma DATA _CONFIG, _CP_OFF & _BODEN_OFF & _PWRTE_OFF & _WDT_OFF & _HS_OSC & _MCLRE_ON

//-------------- DATA MEMORY ------------------

unsigned char counter;	// counter variable
			// the number of TMR0 overflows

//-------------- PROGRAM MEMORY ---------------
/*---------------------------------------------
	Subroutine&#58;	INIT
	Parameters&#58;	none
	Returns&#58;	none
	Synopysis&#58;	Initialize all registers
	associated with the application
----------------------------------------------*/

Init&#40;void&#41;
{
	tmr0 = 0;	//clear the TMRO register

/*Configure Timer0 as follows&#58;
-	Use the internal Instruction clock 
	as source to the module
-	Assign the Prescaler to the watchdog timer
	so thew the TMR0 increments is set to 1&#58;1
	ratio with the Instructuion clock */
				
	option_reg = 0b00001000;

}

/*---------------------------------------------
	Subroutine&#58; Main
	Parameters&#58;	none
	Return&#58;		none
	Synopysis&#58;	Main Program function
----------------------------------------------*/

main&#40;void&#41;
{
	Init&#40;&#41;;		//initialize registers

	  while&#40;1&#41;
	 {
	// poll the TOIF to see if TMR0 has overflowed

	if&#40;intcon.T0IF&#41;
	{
	   ++counter;

	intcon.T0IF =0;		//clear the flag for next overflow
	}
	}
}
the prog compiles in sourceboost, but when i create a project for the .c file in MPLAB and try to compile , i get a "Fail to load C:\timer.cog " message. Am i missing something, should i be asking the MPLAB people?

thanks for your help
MB

#2 Dave

Dave

    Super Maniac

  • Administrators
  • PipPipPipPipPip
  • 2,091 posts
  • Gender:Male
  • Location:UK
  • Interests:How things work, Electronics, Software, Cycling.

Posted 30 July 2010 - 07:25 PM

the prog compiles in sourceboost, but when i create a project for the .c file in MPLAB and try to compile , i get a "Fail to load C:\timer.cog " message. Am i missing something, should i be asking the MPLAB people?

What else appears in the MPLAB build window?
Which version of MPLAB are you using?

Regards
Dave

#3 Mindbender

Mindbender

    Newbrie

  • EstablishedMember
  • 5 posts

Posted 03 August 2010 - 05:27 PM

the prog compiles in sourceboost, but when i create a project for the .c file in MPLAB and try to compile , i get a "Fail to load C:\timer.cog " message. Am i missing something, should i be asking the MPLAB people?

What else appears in the MPLAB build window?
Which version of MPLAB are you using?

Regards
Dave

Hi dave, sorry it took so long to answer, but the message was all that i got from mplabs. In the mean time i'm using the SourceBoost compiler alone, since it can give me the hex code and i can step thru the code for debugging, the minimum requirements. i'll try to resolve this later and perhaps i can get your help at that time.
thanks again,
regards,
MB

#4 Mindbender

Mindbender

    Newbrie

  • EstablishedMember
  • 5 posts

Posted 03 August 2010 - 05:30 PM

Hi dave,
Sorry it took so long to reply. The above message was all the i got from the MPLAB program. I am now using the SourceBoost compiler alone. It generates the hex file and allows me to step thru the code, so it will have to be enough for the moment. I will try to fix this at some future time, and will probably have to ask for your help then.
thanks again,
regards,
MB



Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users