USB communication Scicos compilation problem

A forum useful to discuss the details of the ScicosLab code generator.

Moderator: paolo.gai

Locked
ofirbo
Newbie
Posts: 19
Joined: Sun Oct 26, 2008 11:18 am

USB communication Scicos compilation problem

Post by ofirbo » Thu Oct 22, 2009 2:24 pm

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]
Attachments
1.PNG
1.PNG (20 KiB) Viewed 5867 times

ofirbo
Newbie
Posts: 19
Joined: Sun Oct 26, 2008 11:18 am

Re:USB communication Scicos compilation problem

Post by ofirbo » Thu Oct 22, 2009 2:27 pm

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
Attachments
Untitled_2.jpg
Untitled_2.jpg (20 KiB) Viewed 5867 times

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re:USB communication Scicos compilation problem

Post by paolo.gai » Thu Oct 22, 2009 11:02 pm

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

ofirbo
Newbie
Posts: 19
Joined: Sun Oct 26, 2008 11:18 am

Re:USB communication Scicos compilation problem

Post by ofirbo » Thu Oct 22, 2009 11:32 pm

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

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re:USB communication Scicos compilation problem

Post by paolo.gai » Fri Oct 23, 2009 3:07 pm

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

dds
Newbie
Posts: 3
Joined: Thu Jan 31, 2008 2:50 pm

Re:USB communication Scicos compilation problem

Post by dds » Fri Oct 23, 2009 3:38 pm

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.
Attachments
rules.zip
(20 KiB) Downloaded 365 times

ofirbo
Newbie
Posts: 19
Joined: Sun Oct 26, 2008 11:18 am

Re:USB communication Scicos compilation problem

Post by ofirbo » Sun Oct 25, 2009 11:36 am

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

dds
Newbie
Posts: 3
Joined: Thu Jan 31, 2008 2:50 pm

Re:USB communication Scicos compilation problem

Post by dds » Mon Oct 26, 2009 10:45 am

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

ofirbo
Newbie
Posts: 19
Joined: Sun Oct 26, 2008 11:18 am

Re:USB communication Scicos compilation problem

Post by ofirbo » Mon Oct 26, 2009 3:34 pm

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

ofirbo
Newbie
Posts: 19
Joined: Sun Oct 26, 2008 11:18 am

Re:USB communication Scicos compilation problem

Post by ofirbo » Wed Oct 28, 2009 9:26 am

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

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re:USB communication Scicos compilation problem

Post by paolo.gai » Wed Oct 28, 2009 9:52 am

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

ofirbo
Newbie
Posts: 19
Joined: Sun Oct 26, 2008 11:18 am

Re:USB communication Scicos compilation problem

Post by ofirbo » Wed Oct 28, 2009 10:32 am

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...

Locked