Swordfish

Structured BASIC for PIC® Microcontrollers
It is currently Tue Mar 19, 2019 6:08 am

All times are UTC




Post new topic Reply to topic  [ 65 posts ]  Go to page Previous  1, 2, 3, 4, 5
Author Message
 Post subject: Re: MPLAB-X Plugin...
PostPosted: Sun Aug 16, 2015 3:10 pm 
Offline
Registered User
Registered User

Joined: Fri Jan 30, 2009 6:27 pm
Posts: 1087
Location: US
To expand on some of the limitations I've run across with debugging in mplabx, there's a few things I've noticed:

- First, you can't see a module-level variable if it's not declared 'public'... it only appears in the 'global' Watch list when it's declared public. I'm not sure how it would handle variables in different modules with the same public names. Normally I wouldn't do that, but you might be forced to since they have to be public now to see them.

- Bits and booleans need to be in a structure to be useful. Here's some code showing some ways of using bits and booleans that you CAN debug:
Code:
// you can see individual bits and booleans when they're in a structure

// declare a union that can hold up to 8 bit flags
structure msbits
    b as byte
    b0 as b.bits(0)
    b1 as b.bits(1)
    b2 as b.bits(2)
    b3 as b.bits(3)
end structure

// this structure holds different types
structure ms
    b as byte
    bit0 as bit
    bit1 as bit
    bool1 as boolean
    bool2 as boolean
end structure


// can't see this because it's not public
dim b0 as bit

// you can see these, but they all show at the same address with the same value
// (you can't distingush individual bits unless they're in a structure)
public dim b1 as bit
public dim b2 as bit


// can see the individual bits since they're in a structure (and it's public)
public msb as msbits

msb.b = $55      // sets all
msb.b0 = 1
msb.b1 = 1
msb.b2 = 1
msb.b3 = 1
msb.b0 = 0
msb.b1 = 0
msb.b2 = 0
msb.b3 = 0


- Updates to the debug Watch and Variable tabs on my machine are sloooow. You can see the items update as it goes through the list.


Top
 Profile  
Reply with quote  
 Post subject: Re: MPLAB-X Plugin...
PostPosted: Sun Aug 16, 2015 4:08 pm 
Offline
User avatar

Joined: Mon Feb 17, 2014 10:34 am
Posts: 149
Hi,
I was able to debug my first Swordfish source.. :D congratulations to all for the work done :D .
You even managed to get me to pull out the pickit 3 from the package.
At some point, however, I was lost when the pickit 3 not communicate with MPLAB-X and I thought I'd lost it :( .
I did not know that the device has to load a firmware to use the utility program and another for debugging in MPLAB-X and must use IPE when MPLAB-X firmware is loaded or must use the PicKit3 utility to pass from a configuration to another and reload it.
Two question:
What you can do more with the ICD that does not know it?
The module mplabicd.bas does not need with pickit right?
Thanks again to everyone for the excellent work.


Top
 Profile  
Reply with quote  
 Post subject: Re: MPLAB-X Plugin...
PostPosted: Sun Aug 16, 2015 8:04 pm 
Offline
Registered User
Registered User

Joined: Fri Jan 30, 2009 6:27 pm
Posts: 1087
Location: US
Mplabx and the IPE use different firmware in the PICKIT3 than mplab and the utility do, so if you swap back and forth between them it has to reload the firmware each time. I would suggest that you do that without having the PICKIT3 connected to your hardware. That seems to make it a bit more stable. If you swap back and forth all the time you may be better off using MPLAB.

You should use the mplabicd.bad file when you debug. It may look like it works without it, but different chips require some resources to be reserved for the debugger and things will start failing if the compiler uses them in your program.

Things you can do with the debugger? That depends on the debugger and the chip. The ICD3 has more functions than the PK3, but they don't do much more than breakpoints and watches. Some of the more advanced features iinclude things like breaking when a certain location is written, or a particular value changes.


Top
 Profile  
Reply with quote  
 Post subject: Re: MPLAB-X Plugin...
PostPosted: Sun Nov 05, 2017 8:16 pm 
Offline

Joined: Fri Jul 10, 2015 7:52 pm
Posts: 4
Apologies for whipping up a stale thread again ...

Pardon the ignorance as well, please.

I came across this thread regarding the MPLABX plugin, which I have downloaded, installed (using MPLAB 3.2) and then hit the same "Editor Library" version problem as described earlier in this thread.

Has this issue been resolved?
Is the plugin compatible with MPLAB v 3.2 or v3.55?

I also found some info on the forum regarding doing In-Circuit Debugging using MPLABX as the editor, but it seem limited to old versions of MPLAB (pre-Netbeans IDE) and Windows.

Kindly advise status of using Swordfish inside MPLABX for In-Circuit Debugging, as well as compatible version numbers, please.


Top
 Profile  
Reply with quote  
 Post subject: Re: MPLAB-X Plugin...
PostPosted: Mon Nov 06, 2017 11:14 am 
Offline
Registered User
Registered User

Joined: Fri Jan 30, 2009 6:27 pm
Posts: 1087
Location: US
octal did do an updated plugin for mplabx v3, but for the life of me I can't remember if there's a link to it here somewhere or not. You might want to pm David or octal ... you'll want the updated SF v2.2.2.5B6 that has the debugging changes to go along with it as well.

From what I remember with those updates you can use any mplabx v3.xx (I've even installed them on mplabx v4 and they seem to work).

The forum thread support added for K40 devices has some addtl files and utilities that are updated for use with newer devices. There is a link to an updated plugin on that page as well, but you have to have the base .nbm already installed.

The page module for using ICD debuggers - mplabicd.bas has an updated mplabicd.bas... see the last post


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 65 posts ]  Go to page Previous  1, 2, 3, 4, 5

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group