Page 1 of 1

USB communication Scicos compilation problem

Posted: Thu Oct 22, 2009 2:24 pm
by ofirbo
Hi,

I\'ve made this simple Scicos diagram to test usb comm with flex board:

[img width=499]http://www.erika.tuxfamily.org/images/f ... ages/1.PNG[/img]

Re:USB communication Scicos compilation problem

Posted: Thu Oct 22, 2009 2:27 pm
by ofirbo
But when trying to compile I see errors in console:

[img width=669]http://img28.imageshack.us/img28/6175/16464350.png[/img]

Until now I had no problems compiling with serial port, adc, gpout and led blocks... only usb seems to be causing problems.

Help will be much appreciated.

Thank you,
Ofir

Re:USB communication Scicos compilation problem

Posted: Thu Oct 22, 2009 11:02 pm
by paolo.gai
Dear Ofir,

Does the example of the demo board with USB included in the latest scicos pack compiles for you?

I guess this problem is present because there are no blocks that somehow identifies which boards (demo/motion) is used, causing probably a USB symbol to be missing.

Please try adding some demo board block to see if it compiles. in the meantime, i\'ll report the problem to Dario.

Ciao,

Paolo

Re:USB communication Scicos compilation problem

Posted: Thu Oct 22, 2009 11:32 pm
by ofirbo
Hi Paolo,

The demo board example compiled with no errors.
I\'ll be able to check if adding dmb block to the diagram solves the problem only next week.

Thank you for the quick reply

Re:USB communication Scicos compilation problem

Posted: Fri Oct 23, 2009 3:07 pm
by paolo.gai
Btw, we found the problem (due to a missing #define when there are no blocks related to peripherals of either demo or motion boards). Dario will release a patch on the forum soon...

Ciao,

PJ

Re:USB communication Scicos compilation problem

Posted: Fri Oct 23, 2009 3:38 pm
by dds
Dear Ofir,
thank you for reporting the problem.

The problem is present because there are no blocks
that somehow identifies which boards (demo/motion) is used.

To compile your application you can replace the file \"rules.mk\" located at:

\"C:\\Evidence\\Evidence\\eclipse\\plugins\\com.eu.evidence.ee_1.0.0.200910121138\\ee_base\\pkg\\cfg\"

with the file attached.

Re:USB communication Scicos compilation problem

Posted: Sun Oct 25, 2009 11:36 am
by ofirbo
Ok, I replaced the rules file and now it compiles.

But when I try to check communication with PC side, it seems that I am not receiving any data.

app_flex_scicos.exe is running in the background and looks like this:

[img width=600]http://img194.imageshack.us/img194/1552/37339365.jpg[/img]

any ideas?

Thanks

Re:USB communication Scicos compilation problem

Posted: Mon Oct 26, 2009 10:45 am
by dds
Dear Ofir,

the pc-side application displays the usb channel 0, but in the diagram the data is placed in usb channel 1. Change the diagram or the application code...

Regards,
Dario

Re:USB communication Scicos compilation problem

Posted: Mon Oct 26, 2009 3:34 pm
by ofirbo
Hello Dario,

It doesn\'t matter which channel I choose in the flex-side diagram (0 or 1). The data won\'t appear in the PC-side demuxed output port.

Does the output in the usb2udp console window seems normal?

BTW
I\'m using the demoboard_example_pcside.cos for the PC-Side.


Thank you

Re:USB communication Scicos compilation problem

Posted: Wed Oct 28, 2009 9:26 am
by ofirbo
After checking again, even when the dsPIC is in "hold in reset" mode, the console usb2udp window outputs the same thing.

Is there an executable version of usb2udp which I can use to check if usb communication is working? maybe the libusb in cygwin didn\'t compile correctly or something (I\'m not a programmer)

I don\'t know if it\'s a hardware problem because when running the TestLibUsb:

[img width=509]http://img194.imageshack.us/img194/6553/87669170.jpg[/img]
- Product : PICkit 2 Microcontroller Programmer
Is it supposed to appear as a programmer ?


Thanks

Re:USB communication Scicos compilation problem

Posted: Wed Oct 28, 2009 9:52 am
by paolo.gai
dear ofir,

What we do to compile the program is to install the libUSB from cygwin, and then to hit make to compile it. I\'ll send you the EXE file via private e-mail...

Paolo

Re:USB communication Scicos compilation problem

Posted: Wed Oct 28, 2009 10:32 am
by ofirbo
That\'s what I did...

Using the exe file you sent me I see in console:
[img width=673]http://img229.imageshack.us/img229/1237/53537913.jpg[/img]

But still I don\'t see counter running or some sort of communication in scicos pc-side...