usb problems

General discussion relating to the library modules supplied with the compiler

Moderators: David Barker, Jerry Messina

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

usb problems

Post by richardb » Mon Jun 17, 2019 10:21 am

Hi I hope someone can help.


I have just tried to compile a program that uses hid which used to work and no longer compiles, I'm not sure what's wrong, whether its a config issue with sf or my computer.

I get the following

[COMPILE_ERROR]
ITEM_0="C:\@sourcecode\actuator\pics\USB HID PIC1\Main pic1 with HID.bas","-1","-1","Constant ordinal expression expected"
ITEM_1="C:\@sourcecode\actuator\pics\USB HID PIC1\Main pic1 with HID.bas","25","9","Unable to open include file : wdt.bas"
ITEM_2="C:\@sourcecode\actuator\pics\USB HID PIC1\Main pic1 with HID.bas","53","36","Identifier not declared : TX_REPORT_RAM"
ITEM_3="C:\@sourcecode\actuator\pics\USB HID PIC1\Main pic1 with HID.bas","54","37","Identifier not declared : TX_REPORT_RAM"
ITEM_4="C:\@sourcecode\actuator\pics\USB HID PIC1\Main pic1 with HID.bas","56","37","Identifier not declared : RX_REPORT_RAM"
ITEM_5="C:\ProgramData\Mecanique\Swordfish\Library\system.bas","104","11","Identifier not declared : WDT"



I remember the issue with TX_REPORT_RAM originally being TXReportRAM


if I search in any obvious locations like program files , user, data for TXReportRAM or TX_REPORT_RAM I can find no reference to it.

any ideas?
Hmmm..

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

Re: usb problems

Post by Jerry Messina » Mon Jun 17, 2019 1:42 pm

When you say it used to work do you mean this exact project used to compile and it no longer does?

If so, what else has changed?

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

Re: usb problems

Post by richardb » Mon Jun 17, 2019 10:28 pm

"When you say it used to work do you mean this exact project used to compile and it no longer does?"

yes it did. and I checked this out freshly from svn.


"
If so, what else has changed?"

Im not sure.

my machine was put onto a new domain some time ago, so the "user" space has changed.
Hmmm..

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

Re: usb problems

Post by octal » Mon Jun 17, 2019 11:25 pm

Hi Richard,
did you updated your USB lib to use the latest one on the SF modules pages ???
http://www.sfcompiler.co.uk/wiki/pmwiki ... er.Modules

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

Re: usb problems

Post by richardb » Tue Jun 18, 2019 8:24 am

yes I did.


Where is "TX_REPORT_RAM" defined normally?
Hmmm..

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

Re: usb problems

Post by Jerry Messina » Tue Jun 18, 2019 9:29 am

TX_REPORT_RAM was used by older versions of the stack. It was replaced with SF protected regions in USBv143.

Maybe you're mixing versions. If you look at your original project, the project .idf file will have a list of all the files used and their locations.
If your user path has changed then perhaps the library isn't getting found and you're picking up the old library.

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

Re: usb problems

Post by richardb » Tue Jun 18, 2019 10:13 am

ok,


I'm not at work right now so i will check later.

thanks
Hmmm..

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

Re: usb problems

Post by Jerry Messina » Tue Jun 18, 2019 11:27 am

There was also this conversation we had a while ago...
viewtopic.php?f=4&t=2056

If you find you need an older version of the stack let me know and I'll post it.

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

Re: usb problems

Post by richardb » Fri Jun 21, 2019 6:31 am

Hi Jerry,


the project .idf file will have a list of all the files used and their locations.
The problem I have is that because it doesn't compile, it doesn't generate the idf file.

when I check out the old idf file I can see the path is referring to the old "user" location it was using the older version of the library 1.42?

I don't know how the paths are generated for the users with sf but I know sf wasn't reinstalled after the change.


the problem I have right now is that I cant re-install the software as I cant seem to get a response from David.

Richard
Hmmm..

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

Re: usb problems

Post by richardb » Fri Jun 21, 2019 6:36 am

To clarify I cant install either on a new machine or re-install over the top on the current machine that its already installed on. is I get the error message
An error has occurred. the product key entered has already been installed on one or more machines
Hmmm..

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

Re: usb problems

Post by David Barker » Fri Jun 21, 2019 7:33 am

I responded by email to you on the 17th. Can you please check you spam folder.

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

Re: usb problems

Post by Jerry Messina » Fri Jun 21, 2019 9:48 am

I don't know how the paths are generated for the users with sf...
From what I recall, on a standard install under win7 you end up with two UserLibrary folders:
C:\ProgramData\Mecanique\Swordfish\UserLibrary
C:\Users\<USERNAME>\Documents\Swordfish\UserLibrary

and
C:\ProgramData\Mecanique\Swordfish\Includes
C:\ProgramData\Mecanique\Swordfish\Library

It searches for include files in this order:
current project folder (and any sub folders)
C:\Users\<USERNAME>\Documents\Swordfish\UserLibrary
C:\ProgramData\Mecanique\Swordfish\UserLibrary
C:\ProgramData\Mecanique\Swordfish\Library


If you have a new account then
C:\Users\<USERNAME>\Documents\Swordfish\UserLibrary
probably doesn't exist anymore

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

Re: usb problems

Post by richardb » Fri Jun 21, 2019 12:00 pm

Thanks David, I forgot to check the spam.

ok so I have installed the software on the new machine.

thanks jerry for your input I have had multiple issue which have confused things.

obviously there is the path issues. but also I haddnt noticed version 1.44 only included the USBsystem.bas file and none of the other files.

I assume I need to copy 1.43 into the user folder then copy over 1.44 USBsystem.bas?


could you post v1.42 as v1.43 seems quite different and I need to get a working version of the old setup before I upgrade.


Thanks again for everyone's help.


Richard

PS I'm thinking about renaming the modules and filenames to reflect the version number then hopefully it would build with the correct version? should that work?
Hmmm..

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

Re: usb problems

Post by Jerry Messina » Fri Jun 21, 2019 5:17 pm

I assume I need to copy 1.43 into the user folder then copy over 1.44 USBsystem.bas?
Yeah, that's the only file that changed so I didn't bother with a full version
could you post v1.42 as v1.43 seems quite different
I tried umpteen times to upload it to the wiki page but I can't seem to get it linked. I give up.

EDIT: I was finally able to get v142 uploaded and linked to the wiki page
http://www.sfcompiler.co.uk/wiki/wiki-u ... USBv142.7z
I'm thinking about renaming the modules and filenames to reflect the version number then hopefully it would build with the correct version?
That probably won't work out unless you edit the 'include' statements in each file. I'd be leery of having both versions visible in the in the search path.

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

Re: usb problems

Post by richardb » Tue Jun 25, 2019 7:01 pm

Thanks again jerry,

I don't know what happened to the missing librarys, but it does compile now.





thanks


Richard
Hmmm..

Post Reply