Jump to content
Sign in to follow this  
Mindbender

Failed To Load Filename.cog

Recommended Posts

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:	INIT
Parameters:	none
Returns:	none
Synopysis:	Initialize all registers
associated with the application
----------------------------------------------*/

Init(void)
{
tmr0 = 0;	//clear the TMRO register

/*Configure Timer0 as follows:
-	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:1
ratio with the Instructuion clock */

option_reg = 0b00001000;

}

/*---------------------------------------------
Subroutine: Main
Parameters:	none
Return:		none
Synopysis:	Main Program function
----------------------------------------------*/

main(void)
{
Init();		//initialize registers

  while(1)
 {
// poll the TOIF to see if TMR0 has overflowed

if(intcon.T0IF)
{
   ++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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

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 emoticons maximum 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  

×