SF + MPLAB problem ****noob alert****

Discuss the Integrated Development Environment (IDE)

Moderators: David Barker, Jerry Messina

iaing
Posts: 15
Joined: Fri Sep 28, 2007 12:36 pm
Location: Scotland

SF + MPLAB problem ****noob alert****

Post by iaing » Fri Sep 28, 2007 5:05 pm

Hi,

Sorry if this is a stoopid question but here goes.

I've followed the instructions for installing the CL version of SF into the MPLAB folder and selected SF as my toolsuite (having selected SESwordfish as my language tool location). But... when I try to build from MPLAB I get the error message....
Clean: Deleting intermediary and output files.
Clean: Done.
The language-tool suite "Swordfish BASIC Compiler" does not appear to have a linker.
BUILD FAILED: Fri Sep 28 18:05:24 2007
Using latest SESwordfish version & MPLAB IDE V7.62 running on win2k lappy.

Any ideas on what I might be doing wrong?

Regards,

Iain

iaing
Posts: 15
Joined: Fri Sep 28, 2007 12:36 pm
Location: Scotland

Post by iaing » Fri Sep 28, 2007 6:39 pm

OK, answering my own question, I just rolled back to MPLAB V7.60a and everything works. I'll try again with 7.62 and see if a clean install sorts the problem.

Cheers all,

Iain

iaing
Posts: 15
Joined: Fri Sep 28, 2007 12:36 pm
Location: Scotland

ICD2 debugging problem!

Post by iaing » Fri Sep 28, 2007 9:17 pm

I seem to be talking to myself but that's ok, it's a perk of being old.

First some background.

Materials:
EasyPic4 dev board
ICD header (Microchip AC162051)
ICD2 hockey puck
PIC18F4431
MPLAB V7.60a
SFSE V(latest)

Result; can build (for debug) and program successfully (blink-1 blinks as it should) but I can't debug!! (MPLAB says unable to run target)

I'm thinking this is hardware and I need to cut the trace leading from pin 1 (MCLR) down to the dev board but I'd be interested to hear from anyone with a similar setup.

And my apologies for this post not being strictly Swordfish but I'll take any help I can get :)

Cheers,

Iain

iaing
Posts: 15
Joined: Fri Sep 28, 2007 12:36 pm
Location: Scotland

Case Closed !!

Post by iaing » Sat Sep 29, 2007 7:04 pm

Ok, this is my last post on the subject!

I finally got MPLAB ICD2 and SF working together as they should and the problem after all was wetware! It appears that MPLAB needs a few crucial settings before it'll play ball, so, for the benefit of others who may also be on the toe of this (rather steep) learning curve, I'll explain the solution here.

Go to MPLAB and select 'Debugger' -> 'Settings' and select the 'Program' tab. At the bottom of that tab check the boxes to Automatically 'Program after successful build' and 'Run after successful build'. After this you can build your projects and have the debugger execute immediately.

This closes the chapter on how to set up MPLAB for ICD2, all I want now are some COFF files to work with! :twisted:

Regards,


Iain

matteo
Posts: 5
Joined: Fri Jun 13, 2008 7:51 am

What about using the debugger?

Post by matteo » Fri Jun 13, 2008 1:58 pm

Thank you for your post, I found it interesting since I am new to MPLAB and Swordfish, for example, I found that MPLAB works with SF only if is the right version release (7.60a)
Now I can obtain an assembler code in MPASM that can be debugged with the simulator.
However the assembler code has not any reference with the source code (eg. no comments).
Do you know if is it possible to debug the Swordfish source code running step by step, watch variables and so on...?
For now I use the simulator but I would like to purchase the ICD2 if I will be able to do a complete debugging with the SwordFish.
Thank you for your help
Matteo

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 » Fri Jun 13, 2008 2:23 pm

You cannot single step through high level code or view variables at the moment, but it is on its way:

http://www.sfcompiler.co.uk/wiki/upload ... /mplab.gif

You should also be able to build in MPLAB using the latest version (8.10) - just make sure you add just the main program to 'source files'. If you have any custom modules you want to add to your project, add them to 'Other Files'

I've been testing ICD using Blue Room Electronics Junebug

http://www.blueroomelectronics.com/Junebug.htm

which works extremely well. Perhaps drop them an email, they have other solutions which may work for you.

matteo
Posts: 5
Joined: Fri Jun 13, 2008 7:51 am

Post by matteo » Mon Jun 16, 2008 8:01 am

Hello David,
Thank you for your reply. I'm going to test the compiler with the latest MPLAB release.
The screenshot you have posted is really very interesting, but please can you tell me approximatively when this feature will become available? I need to work on some projects and you will understand that I would be nice for me (for a better planning) if I can forecast how I can take advantage of the ICD functions

For the second part of your answer: I understand that *each* ICD supported by MPLAB will work well with SF compiler in the MPLAB environment.
So I will search for an ICD that fits my requirements, and of course Blue Room Electronics devices are preferred. Please correct me if I am wrong.

Thank you for your support

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 Jun 16, 2008 9:35 am

> please can you tell me approximatively when this feature
> will become available

Hopefully within the next two weeks.

> I understand that *each* ICD supported by MPLAB will work well
> with SF compiler in the MPLAB environment.

Swordfish generates a debugging *.cof file, which should work with any ICD or simulator solution that supports COFF. For example, MPLAB and ISIS. However, some solutions are better than others. For example, there are issues with Labcenters ISIS (which affects both Swordfish and the Microchip C18 compiler). At the time or writing, no fix or comment has been forthcoming from Labcenter so I would have to recommend ICD in MPLAB at the present time.

If going down the MPLAB/ICD route consider user support - Blueroom Electronics have given me excellent support so far, so that's why I would recommended them.

matteo
Posts: 5
Joined: Fri Jun 13, 2008 7:51 am

Post by matteo » Mon Jun 16, 2008 10:17 am

Ok. thank you again for all your answers.
Please remember to notify your users when it will be available.
As I can see you are doing a very good job.

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 Jun 16, 2008 10:24 am

> Please remember to notify your users when it will be available.

An announcement is usually made on this forum. You should also check your online update in the IDE regularly (see online help for more information) or set to automatic.

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

Post by dman776 » Tue Jun 17, 2008 4:14 am

I am SOOOO doing a happy dance on this news!

Intellisenc
Registered User
Registered User
Posts: 30
Joined: Mon Nov 22, 2010 3:08 am

EasyPic4 - ICD

Post by Intellisenc » Tue Nov 30, 2010 4:44 pm

Is there a method for using the Mikroe ICD on the EasyPic4 board, MPLAB and Swordfish for step by step debugging? I tried without luck and am looking for suggestions.

Jerry Messina
Swordfish Developer
Posts: 1473
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Post by Jerry Messina » Tue Nov 30, 2010 7:15 pm

Unless the Mikroe ICD is usable as a debugger under MPLAB (highly unlikely), then I think the answer is no.

The pickit2 is fairly cheap (but may not support some newer parts).

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 » Tue Nov 30, 2010 7:35 pm

Swordfish generates a standard COFF debugging file. You should be able to debug using any system that supports COFF (such as MPLAB).

Intellisenc
Registered User
Registered User
Posts: 30
Joined: Mon Nov 22, 2010 3:08 am

MPLAB

Post by Intellisenc » Wed Dec 08, 2010 2:41 pm

I got it working. I needed to to answer "no" when the popup question about rebuilding came up.

Post Reply