Jump to content
im.markus

Mplab .cof Problem

Recommended Posts

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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

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:

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

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...

×