Page 1 of 1

compiler warnings for "Driver-free USB Interface"

Posted: Sun May 23, 2010 4:47 am
by mytekcontrols
When I downloaded Bert van Dam's article and example FlowCode for the "Driver-free USB Interface", I get the following warnings when compiling to my ECIO40P:

Code: Select all

Warning unreferenced functions removed:

	 FCI_FLOAT_TO_STRING	 in: C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD\internals.h

	 FCI_NUMBER_TO_HEX	 in: C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD\internals.h

	 FCI_STRING_TO_INT	 in: C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD\internals.h

	 FCI_STRING_TO_FLOAT	 in: C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD\internals.h

	 Wdt_Delay_S	 in: C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD\internals.h

	 isinf	 in: C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD\internals.h

	 usb_get_state	 in: C:\PROGRA~2\MATRIX~1\FLOWCO~2\BoostC\include\USB\pic_usb.c

	 FCD_USBHID0_UpdateData	 in: C:\Users\Michael\Documents\Mytek Controls Projects\Polycold Smart Fault\HID Examples\usb hid excel.c

	 FCD_USBHID0_SendData	 in: C:\Users\Michael\Documents\Mytek Controls Projects\Polycold Smart Fault\HID Examples\usb hid excel.c

	 FCD_USBHID0_ReceiveString	 in: C:\Users\Michael\Documents\Mytek Controls Projects\Polycold Smart Fault\HID Examples\usb hid excel.c

	 FCD_ADC0_ReadAsInt	 in: C:\Users\Michael\Documents\Mytek Controls Projects\Polycold Smart Fault\HID Examples\usb hid excel.c

	 FCD_ADC0_ReadAsVoltage	 in: C:\Users\Michael\Documents\Mytek Controls Projects\Polycold Smart Fault\HID Examples\usb hid excel.c

	 FCD_ADC0_ReadAsString	 in: C:\Users\Michael\Documents\Mytek Controls Projects\Polycold Smart Fault\HID Examples\usb hid excel.c

	 FCD_Switches0_WaitUntilHigh	 in: C:\Users\Michael\Documents\Mytek Controls Projects\Polycold Smart Fault\HID Examples\usb hid excel.c
However when I run the actual test with the hardware, everything appears to work just fine, and I get data samples from the ADC appearing as if they were being typed in (of course much, much faster then I could by hand).

I also get this warning in FlowCode when first opening the example file:
Image

When I do a Macro>Show all I see is the Main macro only. But as I said everything appears to work fine with the hardware, and the program does indeed work as stated in the article by Bert van Dam. So do I need to worry, or is this normal?

Re: compiler warnings for "Driver-free USB Interface"

Posted: Sun May 23, 2010 8:45 am
by medelec35
Hello mytekcontrols.
There is no need to worry at all.
The warning functions removed simply means those functions of component macros are not used in your flowchart, therefore they will be removed. E.g with ADC, if you using ReasAsByte, then funtions ReadAsInt, ReadAsVoltatage & ReadAsString will all be removed giving you a warning about them.

As for 'The following macro will be ignored'
With Flowcode V3 you need both 'SampleADC' and 'ReadAsByte'
With Flowcode V4 you only need 'ReadAsByte' since SampleADC is automaticly done now.
So to get rid of the second message, Only in Flocode V4 and above (when applicable) just delete the 'SampleADC' Macro'

Re: compiler warnings for "Driver-free USB Interface"

Posted: Sun May 23, 2010 4:00 pm
by mytekcontrols
Thanks medelec35 for the feedback. However I do have a question relating to deleting the 'SampleADC' Macro, and it simply comes down to how do I do that? Remember I can not see any macros other then the Main one, and the option to delete macros is grayed out. Would I have to first open this program up in V3 and delete and save it there? Or is there some other way to do it in V4?

Re: compiler warnings for "Driver-free USB Interface"

Posted: Sun May 23, 2010 5:16 pm
by medelec35
Each component is treated as a macro. so u will need to delete the ADC component, SampleAdc. Not talking about about the macro Tabs you can create by clicking 'New macro'
Stop_warning.jpg
Stop_warning.jpg (51.4 KiB) Viewed 4545 times

Re: compiler warnings for "Driver-free USB Interface"

Posted: Sun May 23, 2010 5:51 pm
by mytekcontrols
:lol: I really should have known that. Time to wake up and get some caffeine in my system. And yes deleting that entry did take care of the problem.

BTW for those that are interested, here is a link to the Elektor article (and software) by Bert van Dam: http://www.elektor.com/magazines/2009/n ... 5296.lynkx

On a slightly different subject, the article talks about problems that can occur if a PID/VID combination fails to work, and choosing a different one to correct the situation. To your knowledge (or anyone else that is reading this), is there a fail-safe PID/VID combination that will always work (or at least stands the highest probability of doing so)? The reason I ask, is that I would like to use this HID method of data acquisition in a product I plan on deploying, and would really like it to work out of the box (no changes required).

Re: compiler warnings for "Driver-free USB Interface"

Posted: Mon May 24, 2010 7:17 am
by Steve
If you are deploying a USB application, then you should obtain a unique PID/VID combination for your product.

You can apply for your own VID (which will give you access to lots of PIDs), but this is expensive if you only have 1 or 2 products. As an alternative, we offer our Flowcode customers a service where we can reserve a small number of PIDs for their own development purposes (but not for commercial development). Please contact me directly via PM for more information.

Re: compiler warnings for "Driver-free USB Interface"

Posted: Mon May 24, 2010 4:38 pm
by mytekcontrols
Thanks Steve -- I'll hold off on contacting you until my product has made it past the prototype stage, and is ready to go into production.

Real nice of you guys to offer this service.