USB communication Scicos compilation problem

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

Moderator: paolo.gai

Locked
ofirbo

USB communication Scicos compilation problem

Post 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]
Attachments
1.PNG
1.PNG (24 KiB) Viewed 7754 times
ofirbo

Re:USB communication Scicos compilation problem

Post 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
Attachments
Untitled_2.jpg
Untitled_2.jpg (24 KiB) Viewed 7754 times
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re:USB communication Scicos compilation problem

Post 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
ofirbo

Re:USB communication Scicos compilation problem

Post 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
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re:USB communication Scicos compilation problem

Post 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
dds

Re:USB communication Scicos compilation problem

Post 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.
Attachments
rules.zip
(24 KiB) Downloaded 599 times
ofirbo

Re:USB communication Scicos compilation problem

Post 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
dds

Re:USB communication Scicos compilation problem

Post 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
ofirbo

Re:USB communication Scicos compilation problem

Post 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
ofirbo

Re:USB communication Scicos compilation problem

Post 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
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re:USB communication Scicos compilation problem

Post 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
ofirbo

Re:USB communication Scicos compilation problem

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