user modules maybe

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Post Reply
richardb
Posts: 310
Joined: Tue Oct 03, 2006 8:54 pm

user modules maybe

Post by richardb » Wed Apr 03, 2013 1:32 pm

I don't know if anyone can point me in the correct direction but I have been swapping over to new machine which is windows 7 64bit which has been a bit of a nightmare for various reasons, i finally thought it was sorted out and now i'm having warnings on code that was working on my old pc

so if I try to compile any usb examples or my code I get something like the following warning



[warning] usbhid.bas(81): inline procedure called from within context save block, disabling inline code generation for this procedure:_service

I also get the same warning type for
system.bas
and subsystem.bas in various places

I've copied the user lib to C:\Users\richardb\Documents\Swordfish\UserLibrary


any suggestions would be great
Hmmm..

richardb
Posts: 310
Joined: Tue Oct 03, 2006 8:54 pm

Post by richardb » Wed Apr 03, 2013 2:46 pm

I have just tried uninstalling swordfish then deleting any user librarys reinstalled swordfish and tried to compile the sample file HID_1.bas

I've just realised that this compiler is
version 2.2.1.7 ICC 1.1.6.2

the old version was

VER 2.2.1.3 ICC 1.1.5.7

I ran update but it doesn't do anything :/ so I assumed it was up-to date

so is the warning new ? but its compiling in the same way or do I have a real problem.
Hmmm..

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 » Wed Apr 03, 2013 3:46 pm

> so I assumed it was up-to date

latest update information can be found here:

http://www.sfcompiler.co.uk/wiki/pmwiki ... ionHistory

I'm not familiar with the warnings, they sound module generated. Which USB library are you using?

RKP
Registered User
Registered User
Posts: 82
Joined: Mon Oct 22, 2007 3:14 pm
Location: Maryland

Post by RKP » Wed Apr 03, 2013 7:26 pm

David,

Just my 2 pennies.

But somewhere after this latest compiler upgrades, not sure which one; these warnings started to appear. I only see them in the USB modules but i have not done an exhausted test of others.

Just compile the Hid_1.bas from the sample folder and you will see the type of warnings the original poster speaks of.

I am not sure it affects the code since it just a warning, but it is something I have not seen previously.

Is it of some concern?

RKP

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

Post by Jerry Messina » Wed Apr 03, 2013 8:14 pm

The warnings came about in V2.2.1.5 if I remember correctly.

For a number of reasons, the 'inline' routines that are inside the 'save' block of the HID USB_intr_handler() are being converted to regular subroutine calls.

Other than things being a tad bit slower (because of the calls), you're probably ok.

At some point I need to go back through and update those libs... there are a few other issues that have cropped up as well but I just haven't had a chance to do it. Looking back, some of the routines were never fully wrung out when I posted that stuff.

RKP
Registered User
Registered User
Posts: 82
Joined: Mon Oct 22, 2007 3:14 pm
Location: Maryland

Post by RKP » Wed Apr 03, 2013 9:03 pm

No worries Jerry,

I just noticed the same thing the other poster did and wanted to let him know he is not alone.

By the way it is not just your USB libs that show the warning, the originals do as well.
I purposely moved the user folder so as to not use yours and the same warnings came up.
I did notice my programs compile a few bytes more than they previously did, but your explanation is probably the reason.
Thanks for the explanation.

Keith

richardb
Posts: 310
Joined: Tue Oct 03, 2006 8:54 pm

Post by richardb » Thu Apr 04, 2013 7:43 am

Thanks for the confirmation RKP,

so to clarify


fresh install of swordfish

compile the sample HID_1.bas that comes with swordfish

this uses the usb module that's installed with swordfish.

and it generates the errors I've reported.

I've also tried compiling a lot of the other sample files which didn't produce the same errors.


hopefully the link below shows the errors
[img]
https://www.dropbox.com/s/lwid6dh5hr2w4i2/usberr.jpg
[/img]
Hmmm..

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 » Thu Apr 04, 2013 8:09 am

Jerry is correct, this was introduced in a later version of the compiler. Apologies for forgetting this. Anyway:

> hopefully the link below shows the errors

It is important to realise they are not errors. They are warnings. An error condition will not produce a *.hex file. A warning will produce a *.hex file. You can safely ignore these warnings, as disabling inline in these cases will not produce unexpected results.

If you want to remove the warnings, just click on the warning in question and remove "inline" from the function or sub declaration. Please note that removing inline will produce slightly more code for the routines call and return.

richardb
Posts: 310
Joined: Tue Oct 03, 2006 8:54 pm

Post by richardb » Thu Apr 04, 2013 8:53 am

thanks David.


I fully understand that they were warnings(as I said in my original post) and not errors that was a typo on my part.

The reason I brought this up was that it was different from my old pc, and I wanted to know if there was something wrong with my pc config.

R
Hmmm..

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

Post by Jerry Messina » Thu Apr 04, 2013 9:04 am

>Apologies for forgetting this

Well, at least you were looking at the right files! I didn't even realize we were talking about the standard SF ones.

Lucky for me it's the same reason. Just change the routine names and ignore my ramblings.

richardb
Posts: 310
Joined: Tue Oct 03, 2006 8:54 pm

Post by richardb » Thu Apr 04, 2013 9:20 am

Hi jerry in my first post i was using your new usb routines, that was the point when i decided to go back to the base sf installation which did the same thing.


Thanks
Hmmm..

Post Reply