Which version of MPLabX are you using?

Discuss the Integrated Development Environment (IDE)

Moderators: David Barker, Jerry Messina

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

Which version of MPLabX are you using?

Post by octal » Fri Jun 14, 2019 10:11 am

Hello,
I would like to make some enhancements to the SF MPLabX plugin these days, and I wanted to know which version of MPLabX are you using?
Is it still useful to maintain the v2.xx, v3.xx, v4.xx versions ??? can we move to the latest MPLabX v5.xx version?

Regards

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

Re: Which version of MPLabX are you using?

Post by Jerry Messina » Fri Jun 14, 2019 11:14 am

I pretty much keep it up to date, so I'm using 5.15 right now which uses mpasmx 5.83.

The systemconvert utility will generate device files for all pic18 devices and produce an xml list which I merge with your existing plugin to support all the new devices.

SF may even support the new K42/K83 series soon...

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

Re: Which version of MPLabX are you using?

Post by David Barker » Sat Jun 15, 2019 7:13 am

Yes, I'm using the latest also

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

Re: Which version of MPLabX are you using?

Post by octal » Sat Jun 15, 2019 11:13 pm

@Jerry
in next version, I'll try to read the devices list from the external XML file, this way, you won't even need to merge the file with the compiled jar.

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

Re: Which version of MPLabX are you using?

Post by Jerry Messina » Sun Jun 16, 2019 10:08 am

That would be handy if it works out.

Even though the list doesn't change very often, you wouldn't have to change the plugin when new devices are added.

janni
Posts: 51
Joined: Wed Aug 24, 2022 2:30 pm

Re: Which version of MPLabX are you using?

Post by janni » Thu Aug 25, 2022 2:19 pm

Is SF MPLabX plugin still maintained? I found it in SE distribution files and after reading posts about it I assumed there should be no problem, at least with v5.35 of MPLabX, but while the plugin is accepted by MPLabX and claimed active, there's no SF Basic in toolchain list.

I have reinstalled both SwordfishSE and MPLAB X in default directories but it didn't help. Exactly the same story with MPLabX v5.45. Interestingly, SF Basic shows in compiler options when starting new project but only as 'folder' without the contents allowing to choose it as compiler.

Is there a solution allowing to run SF Basic within MPLabX?
Attachments
MPLABXnewproject.png
MPLABXnewproject.png (44.42 KiB) Viewed 4735 times

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

Re: Which version of MPLabX are you using?

Post by Jerry Messina » Thu Aug 25, 2022 4:21 pm

Yes, at least I know the plugin works with the full version... I'll have to double-check and see if it works with the SE version.
MPLABX v5.35 is the recommended version (the last one with mpasm), but I have it running on versions after that up to V6.00.

Which versions are you using (mplabx, SF)?
After installing Swordfish you should run the updates which can be found on the wiki page at https://www.sfcompiler.co.uk/wiki/pmwik ... er.Modules

Here's a link to the SE update:
https://www.sfcompiler.co.uk/wiki/wiki- ... 022_SE.zip

Make sure mplabx is closed.

janni
Posts: 51
Joined: Wed Aug 24, 2022 2:30 pm

Re: Which version of MPLabX are you using?

Post by janni » Thu Aug 25, 2022 4:51 pm

Hi Jerry,

Thanks for quick response. I've installed the update just after installing Swordfish (SE version).

As far as I've noticed there's no difference regarding the plugin behaviour between v5.35 and v5.45. There is the difference you mentioned about MPASMX but, as SF uses its own MPASMX, the later version works as well with the advantage of allowing to debug newer processors. Maybe the plugin indeed works fully only with the full version of SF though the pdf file about its installation suggests otherwise.

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

Re: Which version of MPLabX are you using?

Post by Jerry Messina » Thu Aug 25, 2022 11:36 pm

It's been a while since I've had to install the mplabx driver so the details are sort of hazy, but the stock driver is probably looking for the standard version.

I think you can switch this after the fact...
In mplabx, open the 'Tools | Options | Embedded | Build Tools' tab and select 'Toolchain: Swordfish BASIC'
Change the 'Base Directory' and 'BASIC Compiler' entries to point to your Swordfish SE install folder.
(the SE exe file is 'SESwordifsh.exe') .

Click 'Apply' and 'OK'.
Close mplabx and then re-open it.

Create a new project and see what it says now.

Here's what mine looks like for the standard version, but I don't use any of the default folders.
Clipboard01.jpg
Clipboard01.jpg (62.02 KiB) Viewed 4698 times

janni
Posts: 51
Joined: Wed Aug 24, 2022 2:30 pm

Re: Which version of MPLabX are you using?

Post by janni » Fri Aug 26, 2022 11:30 am

Trouble is, I don't see the compiler in the toolchain list :( . I wish it was only problem of changing names or directories...

Well, I'll have to manage until I decide to buy the full version then. It's not like SF IDE is causing any problems :) . So far I like the sensible (and some brilliant) solutions applied in SF. I'm somewhat chagrined at the range limits' math results (like 127/0=-1 or -32768/-1=-32768) but maybe something can be done with it.

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

Re: Which version of MPLabX are you using?

Post by Jerry Messina » Fri Aug 26, 2022 12:59 pm

If you don't see it in the toolchain list, try deleting the mplabx user cache folder (mplabx help | about) and reinstalling the driver...
mplabx can be very stubborn about actually updating things once it gets cached.
I'm somewhat chagrined at the range limits' math results (like 127/0=-1 or -32768/-1=-32768)
So what should undefined operations return?

janni
Posts: 51
Joined: Wed Aug 24, 2022 2:30 pm

Re: Which version of MPLabX are you using?

Post by janni » Fri Aug 26, 2022 2:44 pm

Jerry Messina wrote:
Fri Aug 26, 2022 12:59 pm
If you don't see it in the toolchain list, try deleting the mplabx user cache folder (mplabx help | about) and reinstalling the driver...
mplabx can be very stubborn about actually updating things once it gets cached.
Thanks, I'll try it.
So what should undefined operations return?
That's the question - how to define undefined results :roll: ? (And do it without unnecessarily bloating final code as most people wouldn't really care about these cases.) For me, best solution is to keep close to mathematical rules (so -32768/-1=32767 and 127/0=127, etc.), ideally with some error indication, but it'll be probably best to pm you about SF innards so I can solve my own problems instead of boring everybody with my excessive perfectionism.

janni
Posts: 51
Joined: Wed Aug 24, 2022 2:30 pm

Re: Which version of MPLabX are you using?

Post by janni » Wed Sep 07, 2022 6:35 pm

Well, I nstalled full version of SF, uninstalled MPLABX plugin, deleted MPLABX user cache, installed the plugin again and still do not see SF Basic in toolchain list :( .

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

Re: Which version of MPLabX are you using?

Post by Jerry Messina » Wed Sep 07, 2022 10:49 pm

I know you've tried most of this, but here are some tips from working with mplabx:

If mplabx can't locate the command-line program swordfish.exe there will be no '+' in the toolchain
selection, and it just shows 'Swordfish BASIC' without the version and path.

Debugging mplabx driver installations can be a real pain.
I usually find it helpful to close and then reopen mplabx after each step so that it actually updates everything.

Here's what I would try:
-use mplabx 5.35

-if you've previously installed the SF driver:
open mplabx and uninstall the driver (Tools | Plugins | Installed | select Swordfish BASIC | Uninstall)
close mplabx

-locate the mplabx cache folder (location shown in the mplabx 'Help | About' box)
Cache directory: C:\Users\<user>\AppData\Local\mplab_ide\Cache\dev\vX.XX\var (where X.XX=5.35)
delete the mplabx user cache folder (just delete the entire 'var' folder)

-make sure the driver .jar file is deleted
the file should be in the <user>\AppData\Roaming\mplab_ide folder for the installed version of mplabx
you may have to enable 'show hidden files, folders, and drives' in 'explorer | tools | folder options | view | advanced settings'

on my system (win7, x64) the file is located in the users\appdata folder at:
C:\Users\<user-name>\AppData\Roaming\mplab_ide\dev\vX.XX\modules\uk-co-mecanique-swordfishbasictoolchain.jar
where 'vX.XX' will change depending on the version of mplabx
delete the .jar file

- open mplabx and reinstall the driver (follow the steps in Swordfish MPLabX Toolchain tutorial.pdf)
after installing the driver and verifying the toolchain settings, close mplabx and reopen it.

janni
Posts: 51
Joined: Wed Aug 24, 2022 2:30 pm

Re: Which version of MPLabX are you using?

Post by janni » Thu Sep 08, 2022 12:16 am

Jerry Messina wrote:
Wed Sep 07, 2022 10:49 pm
I know you've tried most of this...
I've already tried all of this and more :( . Deleted even more files, like history, and everything with 'Swordfish' in it. Previously I've even done clean installations of MPLABX - first v5.35 and then 5.45. But I agree that the reason is probably wrong directories somewhere in MPLABX. If I only knew where...

Post Reply