Jump to content


Photo

Mplab .cof Problem


8 replies to this topic

#1 im.markus

im.markus

    Newbrie

  • Members
  • 2 posts

Posted 03 December 2009 - 09:05 PM

I am trying to get MPLAB to compile a simple program as outlined by the tutorial section of the MPLAB User's Guide. Everything builds okay except that it complains "Failed to load C:\Documents and Settings\manderson\My Documents\MPLAB_Projects\Tutorial\tutorial.cof". It doesn't complain in the build output, instead a little window pops up that says that.

Any ideas?

Mark

#2 Dave

Dave

    Super Maniac

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

Posted 04 December 2009 - 08:47 AM

Any ideas?

We need more information, please post what appears in the Output->Build window (you can select the text and copy and paste it into a forum post).

Regards
Dave

#3 im.markus

im.markus

    Newbrie

  • Members
  • 2 posts

Posted 08 December 2009 - 04:13 PM

Any ideas?

We need more information, please post what appears in the Output->Build window (you can select the text and copy and paste it into a forum post).

Regards
Dave


This is copied from the build window:

Executing: "C:\MCC18\mpasm\MPASMWIN.exe" /q /p18F452 "f452tmpo.asm" /l"f452tmpo.lst" /e"f452tmpo.err" /o"f452tmpo.o"
Executing: "C:\MCC18\bin\mplink.exe" "18f452.lkr" "C:\Documents and Settings\manderson\My Documents\MPLAB_Projects\Tutorial\f452tmpo.o" /m"tutorial.map" /w /o"tutorial.cof"
MPLINK 4.34, Linker
Copyright © 2009 Microchip Technology Inc.
Errors : 0

MP2HEX 4.34, COFF to HEX File Converter
Copyright © 2009 Microchip Technology Inc.
Errors : 0

BUILD SUCCEEDED: Tue Dec 08 09:09:56 2009

And from what I have seen it should say "Loaded C:\.....MyFile.cof" right above BUILD SUCCEEDED, but it isn't there. Instead a little window pops up that says it was unable to load that file. Because it never loaded the file I am unable to run my program, and when I debug it I get this error below:

Error: Bad magic number in COFF file "C:\Documents and Settings\manderson\My Documents\MPLAB_Projects\Tutorial\f452tmpo.o".

Thanks

#4 Dave

Dave

    Super Maniac

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

Posted 08 December 2009 - 06:22 PM

This is copied from the build window:

Executing: "C:\MCC18\mpasm\MPASMWIN.exe" /q /p18F452 "f452tmpo.asm" /l"f452tmpo.lst" /e"f452tmpo.err" /o"f452tmpo.o"
Executing: "C:\MCC18\bin\mplink.exe" "18f452.lkr" "C:\Documents and Settings\manderson\My Documents\MPLAB_Projects\Tutorial\f452tmpo.o" /m"tutorial.map" /w /o"tutorial.cof"
MPLINK 4.34, Linker
Copyright 2009 Microchip Technology Inc.
Errors : 0

MP2HEX 4.34, COFF to HEX File Converter
Copyright 2009 Microchip Technology Inc.
Errors : 0

BUILD SUCCEEDED: Tue Dec 08 09:09:56 2009

And from what I have seen it should say "Loaded C:\.....MyFile.cof" right above BUILD SUCCEEDED, but it isn't there. Instead a little window pops up that says it was unable to load that file. Because it never loaded the file I am unable to run my program, and when I debug it I get this error below:

Error: Bad magic number in COFF file "C:\Documents and Settings\manderson\My Documents\MPLAB_Projects\Tutorial\f452tmpo.o".

Thanks

Looks like you aren't using the BoostBasic Compiler. What tool suite do you have selected?

Regards
Dave

#5 BAGLES93

BAGLES93

    Newbrie

  • Members
  • 2 posts

Posted 28 January 2011 - 10:15 AM

Hi,
I'm using MPLab IDE v8.63 and I have install the BoostC++ Compiler for PIC18 ( I'm using a PICF4620 ) but when I run my program I get this :

Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\SourceBoost\boostlink_pic.exe" -O1 -p "cmp" -t 18F4620
BoostLink Optimizing Linker Version 7.01
http://www.sourceboost.com
Copyright© 2004-2010 Pavel Baranov
Copyright© 2004-2010 David Hobday


Optimisation level:1
Internal Error: Data Type not found id:0xF0000001:


failure
BUILD SUCCEEDED: Fri Jan 28 11:07:10 2011



And a window says me " failed to load file.cof".
I'm a french student, please someone help me, I need to fix this to go on me project. :lol:

#6 Dave

Dave

    Super Maniac

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

Posted 28 January 2011 - 10:20 AM

BAGLES93,

Optimisation level:1
Internal Error: Data Type not found id:0xF0000001:

This looks like some kind of internal reported from linker.
Please zip up the project and send to support@sourceboost.com and then we can take a look.

Regards
Dave

#7 BAGLES93

BAGLES93

    Newbrie

  • Members
  • 2 posts

Posted 28 January 2011 - 02:05 PM

Ok just after eating, my project seems to run normally, I don't know why, maybe it's because I put all files in the same folder.
Thank you for your time and the fast answer !
Regards,
BAGLES93

#8 WalterFax

WalterFax

    Newbrie

  • EstablishedMember
  • 5 posts
  • Gender:Male
  • Location:143040
  • Interests:WalterFaxFB

Posted 03 March 2016 - 05:44 PM

I have been using SF thru MPLAB for a while. However, it seems that debugging thru MPLAB is a bit cumbersome. For some reason, MPLAB is not recognizing the COF file that is built and thus is not allowing debugging after a compile. My workaround has been to BUILD, import the COF file, then, hit the DEBUG button. While this does work and will give me line-by-line debugging with breakpoints, it is annoying. Is there anything that I can change or modify to have MPLAB automatically recognize the COF file like PBP does? thanks

#9 JorgeF

JorgeF

    Super Enthusiast

  • EstablishedMember
  • PipPipPip
  • 269 posts
  • Gender:Male
  • Location:ES @ Europe, third rock from the Sun

Posted 06 March 2016 - 06:36 PM

Hi

 

Never had any issue with, either MPLAB 8 or MPLAB X.

At least issues that can be tracked down to BoostC usage.

Of course I had all sorts of issues with MPLAB X, but thats X problems, and show up with any toolchain.

 

 

Best regards

Jorge





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users