Page 1 of 1

usb problems

Posted: Mon Jun 17, 2019 10:21 am
by richardb
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?

Re: usb problems

Posted: Mon Jun 17, 2019 1:42 pm
by Jerry Messina
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?

Re: usb problems

Posted: Mon Jun 17, 2019 10:28 pm
by richardb
"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.

Re: usb problems

Posted: Mon Jun 17, 2019 11:25 pm
by octal
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

Re: usb problems

Posted: Tue Jun 18, 2019 8:24 am
by richardb
yes I did.


Where is "TX_REPORT_RAM" defined normally?

Re: usb problems

Posted: Tue Jun 18, 2019 9:29 am
by Jerry Messina
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.

Re: usb problems

Posted: Tue Jun 18, 2019 10:13 am
by richardb
ok,


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

thanks

Re: usb problems

Posted: Tue Jun 18, 2019 11:27 am
by Jerry Messina
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.

Re: usb problems

Posted: Fri Jun 21, 2019 6:31 am
by richardb
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

Re: usb problems

Posted: Fri Jun 21, 2019 6:36 am
by richardb
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

Re: usb problems

Posted: Fri Jun 21, 2019 7:33 am
by David Barker
I responded by email to you on the 17th. Can you please check you spam folder.

Re: usb problems

Posted: Fri Jun 21, 2019 9:48 am
by Jerry Messina
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

Re: usb problems

Posted: Fri Jun 21, 2019 12:00 pm
by richardb
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?

Re: usb problems

Posted: Fri Jun 21, 2019 5:17 pm
by Jerry Messina
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.

Re: usb problems

Posted: Tue Jun 25, 2019 7:01 pm
by richardb
Thanks again jerry,

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





thanks


Richard