MPLAB and ICD2

Discuss the Integrated Development Environment (IDE)

Moderators: David Barker, Jerry Messina

dman776
Posts: 115
Joined: Mon May 28, 2007 3:59 pm
Location: Texas

Post by dman776 » Mon Jul 16, 2007 1:55 pm

Thanks David. Will give it a test soon!

dman776
Posts: 115
Joined: Mon May 28, 2007 3:59 pm
Location: Texas

Post by dman776 » Mon Jul 16, 2007 3:43 pm

ok. I went thru the setup steps no problem.

However, when i create a attempt to compile a project in MPLAB, I get:

Executing: "C:\Program Files\Mecanique\SwordfishSE\SESwordfish.exe" C:\Program Files\Mecanique\SwordfishSE\Samples\Blink\Blink - 1.bas -p18F2420
BUILD FAILED: Mon Jul 16 10:42:53 2007

It looks like it doesn't like the spaces in the source file "C:\Program Files\..." path. the source path is not in double quotes.

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Mon Jul 16, 2007 5:40 pm

Is the *.bas file located in the same folder as the MPLAB project file you created?

dman776
Posts: 115
Joined: Mon May 28, 2007 3:59 pm
Location: Texas

Post by dman776 » Mon Jul 16, 2007 5:45 pm

no. i pointed the bas file in the swordfish samples directory. My project is in a seperate dir.

dman776
Posts: 115
Joined: Mon May 28, 2007 3:59 pm
Location: Texas

Post by dman776 » Mon Jul 16, 2007 5:49 pm

I just copied the "Blink - 1.bas" file to the same dir as the project.
It still fails.

I then renamed it to "blink1.bas" (in the same dir as the prj) and it compiled successfully.

So, it does appear that it is a "whitespace" issue.

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Mon Jul 16, 2007 5:50 pm

OK, I can see it now - it appears MPLAB does not wrap filenames in "" (double quotes) - so the compiler is just seeing 'blink'. Try without the spaces, either 'blink1.bas'' or 'blink_1.bas'...

EDIT

See you have just done that. Any application post DOS 8.3 should really pass filenames in double quotes so that the command line picks up the parameter as one value - clearly MPLAB hasn't got around to doing that yet

dman776
Posts: 115
Joined: Mon May 28, 2007 3:59 pm
Location: Texas

Post by dman776 » Mon Jul 16, 2007 6:06 pm

Hmm. I'm not so certain that it is an MPLAB issue.

I did test a PBP project that contained a "test parser.bas". It compiled fine.

Here is the output....

--------------------
Executing: "c:\pbp\pbpw.exe" -ampasmwin -oq -z -p18F2420 "test parser.bas"
PICBASIC PRO(TM) Compiler 2.47, (c) 1998, 2006 microEngineering Labs, Inc.
All Rights Reserved.
Loaded C:\pic\temp\test parser.COD.
--------------------

dman776
Posts: 115
Joined: Mon May 28, 2007 3:59 pm
Location: Texas

Post by dman776 » Mon Jul 16, 2007 6:16 pm

Also, should I expect source-level debugging?
When I put MPLAB into ICD2 debug mode and pause the program, all I get is assembly debugging, not, Swordfish code.

BTW, Dave, the MPLAB integration that you've done is a HUGE step forward!

thank you for your hard work!

User avatar
octal
Registered User
Registered User
Posts: 586
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Mon Jul 16, 2007 6:22 pm

dman776 wrote:Also, should I expect source-level debugging?
When I put MPLAB into ICD2 debug mode and pause the program, all I get is assembly debugging, not, Swordfish code.
Of course. to be able to debug at Swordfish source level, swordfish must create a Microchip compatible COF file. This is not the case actually.

For the space in folder names (or file names) it's really an MPLab issue. Even with Microchip C18 projects, the project folder must NOT contain spaces and Microchip has never corrected that. Why it does work for pbp ... I do not know, but for having use C18 for a long time I can confirm that even Microchip says to use projects in folders without spaces.

Regards
Octal

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Mon Jul 16, 2007 6:40 pm

> Also, should I expect source-level debugging?

As Octal has already pointed out, the compiler needs to generate a COFF (*.cof) file which Swordfish does not currently do.

I have to make it quite clear at this point that it is something I'm very keen to do, as generating a COFF file would allow source level debugging in MPLAB and also other third party simulation products like PROTEUS. That said, documentation on COFF is very thin on the ground - this feature is going to take some time. If anyone out there has any COFF documentation not already available on the internet, please let me know!

The aim of the console application as it stands now is to at least provide basic MPLAB support - you cannot run Microchip programmers from the command like making it virtually impossible to integrate into the current IDE. At least there is now an option to do so.

> Why it does work for pbp ... I do not know

My guess is that PBP has all the command line switches BEFORE the filename. As soon as the compiler sees a parameter string that has no switch, it just builds a filename from the remaining parameters.

dman776
Posts: 115
Joined: Mon May 28, 2007 3:59 pm
Location: Texas

Post by dman776 » Thu Jan 17, 2008 5:05 pm

Has there been any progress on COFF file support (to enable source level debugging in MPLAB)??

dman776
Posts: 115
Joined: Mon May 28, 2007 3:59 pm
Location: Texas

Post by dman776 » Sun Feb 03, 2008 8:51 pm

hmmm. i guess the silence indicates no COFF progress...

:-( boohooo...

dman776
Posts: 115
Joined: Mon May 28, 2007 3:59 pm
Location: Texas

Post by dman776 » Tue Feb 12, 2008 1:51 am

To clarify, do we need coff files for source level, or cod files? Is there anything that I can help with?

TimB
Posts: 262
Joined: Wed Oct 04, 2006 7:25 am
Location: London UK

Post by TimB » Tue Feb 12, 2008 7:57 am

As it turns out there has been a small amount of progress towards improved debugging.

The compiler (a beta) will produce a debug file that can be used build a COFF file. COFF files are not easy to produce as the info is so scarce.

Dave is open to offers for some one to take the debug info and build the COFF file if there interested.

dman776
Posts: 115
Joined: Mon May 28, 2007 3:59 pm
Location: Texas

Post by dman776 » Tue Feb 12, 2008 3:15 pm

It looks like you may have already found this but, thought I'd shared it anyway...

Microchip's C18 Compiler User's Guide - Appendix A (COFF File Format)

It also references the book, Understanding and Using COFF, Gintaras R. Gircys © 1988, O’Reilly and Associates, Inc.

http://www.amazon.com/Understanding-Usi ... 288&sr=1-1[/url]

thanks for the hard work.

Post Reply