VirtualStore and other frustrating problems

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

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

Re: VirtualStore and other frustrating problems

Post by David Barker » Thu May 01, 2014 12:08 pm

> Sorry, we have no understanding of there being anything other than a global user library !

Windows has the concept of multiple users. You can create accounts for different people. For example, administrator or John Smith etc. When you install software, it normally needs to be accessible by all users. So, executables normally go under program files and data under "programData". When a user starts Swordfish, a copy of the user library is made to the users working folder. You should there consider the "my documents" folder as your personal repository.

As you have pointed out, this is slightly awkward for having a central repository for files used between users. This will change in the next release of Firewing which will have localised module storage (as I mentioned earlier in this thread).

NigelMills
Posts: 22
Joined: Mon Jan 13, 2014 2:33 pm

Re: VirtualStore and other frustrating problems

Post by NigelMills » Thu May 01, 2014 12:15 pm

David,

That's interesting, because my files incorporating the same changes you describe (as just e-mail to you) still do not compile !

Can you send me a zip of the ones that work at your end, and I will try them here. If you have time, please try mine your end.

Best regards,

Nigel Mills

NigelMills
Posts: 22
Joined: Mon Jan 13, 2014 2:33 pm

Re: VirtualStore and other frustrating problems

Post by NigelMills » Thu May 01, 2014 12:33 pm

David,

Thank you, yes indeed you code does build. But if I move your two new include lines 12 lines further down in usbcdc.bas where I put them (so they are after the #if in question), then the problem recurs.

Please try this and see if it recurs your end too.

Best regards,

Nigel Mills

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

Re: VirtualStore and other frustrating problems

Post by David Barker » Thu May 01, 2014 1:28 pm

I've taken a look at your code and I have to stress that unlike "C", the ordering of modules in Swordfish can be very important as swordfish modules can self-initialise. In addition, the preprocessor is a single pass and ordering of modules can affect what is switched on or off. For many modules, there is no inter-module dependency but for others there is. For example, it looks like you are using a modified version of Jerry's USB stack. I'm struggling to understand the flow of your code, but it looks like there any many additional modules used in the modified USB library which are also used elsewhere. This may be the problem. Moving

Code: Select all

#if defined(Include_USB_Code)
  Include "PRINT_USB.bas"      
  Include "usbcdc.bas"
#Endif
to a position after the dependant modules in the main program will give you a compile. Maybe Jerry could take a look, as he is far more familiar with the USB library than I am.

NigelMills
Posts: 22
Joined: Mon Jan 13, 2014 2:33 pm

Re: VirtualStore and other frustrating problems

Post by NigelMills » Thu May 01, 2014 2:08 pm

David,

So I'm guessing from your reply that you did manage to reproduce my fault.

I appreciate there can be a lot of dependencies in such a project. BUT, with the fault in evidence, please indulge me. Corrupt the filename of the "bitdefs.bas" file ONLY in the #if command, NOT the #else. Something like this...

Code: Select all

#if defined (BUILD_AI_HUB)
  Include "xxxBITDEFS.bas"
  Include "H_TIMERS.bas" 
#elseif defined (BUILD_AI_SENSOR)
  Include "BITDEFS.bas"
  Include "S_TIMERS.bas" 
#else
  #Error "No BUILD_ defined for High level interrupt definition"
#Endif

Include "sensor_hardware.bas"
Include "s_glob_var.bas"
That compile fault goes away.

Is that's due to an interdependency ?

Best regards.

Nigel Mills
Last edited by NigelMills on Thu May 01, 2014 8:57 pm, edited 1 time in total.

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

Re: VirtualStore and other frustrating problems

Post by David Barker » Thu May 01, 2014 2:13 pm

At this point I really don't know what is happening. I agree there is something going on with BITDEFS, but I'm not sure what it is at the moment. I will let you know when I find out more...

NigelMills
Posts: 22
Joined: Mon Jan 13, 2014 2:33 pm

Re: VirtualStore and other frustrating problems

Post by NigelMills » Thu May 01, 2014 2:16 pm

Thank you.

NigelMills
Posts: 22
Joined: Mon Jan 13, 2014 2:33 pm

Re: VirtualStore and other frustrating problems

Post by NigelMills » Tue May 06, 2014 10:13 am

Just to close off this topic I’d like to add……

Although my frustration at convincing David this was a `real problem` is evident in some of the postings, I’d like to thank David that a few hours after the `Thank You` post above, we received a new .exe of the compiler and it solved the problem.

Elsewhere I couldn’t get that level of technical support no matter what I paid for it !

I’ll echo a comment I made to another poster for your reference…..

“In my opinion the compiler to sold too cheaply. We'd happily pay a couple of hundred per seat, especially for the level of technical support that is volunteered on this forum. Maybe David should sell at two pricing levels, one for hobby guys (£50 one seat), and another on an honesty basis for businesses (£200 per seat again). The only difference I would ask for (which may well be to David’s advantage) is some sort of flag on the forum as to `Hobby` or `Business` user (not that we've anything but praise for the level of support we have had to date).”

Sincerely,

Nigel Mills
BSc CEng FIET (and in my previous company winner of two Queen’s Awards for Export and one for Technology)

Post Reply