/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Problems to compile

Username:     
Password:     
             

Forum

# 1   2009-06-16 15:49:16 Problems to compile

Jierre
Member
Registered: 2009-04-21
Posts: 14

Problems to compile

Hi  !

First of all, thanks for your project. But my problem is that I can not compile it...
Ride found a lot of mistakes and warning in the file usb_desc.c and .h.
There are a lot following this shape :
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Virtual_Com_Port_StringSerial'
Have you heard about such problems ? Actually I just would like to send data from the primer to the computer through USB so you project must fit perfectly.

Hope you can help me
Cheers !

Offline

 

# 2   2009-06-17 10:54:51 Problems to compile

NickK
Member
Registered: 2007-10-13
Posts: 13

Re: Problems to compile

Hi,

Yes, I should have set up the project better. To get this to work you will need to change some paths in the project. The new paths will depend on where the USB firmware library is on your PC.

Go to Project, Properties, Application Options, Directories, Include Directories. You should see the following:-

    '.\..\..\include;.\..\..\..\..\library\inc;$(RkitLib)\ARM\include'


1) '$(RkitLib)\ARM\include' points to the main ST firmware library header files and should be the same on your machine as it is on mine.

2) '.\..\..\include' points to the header files in our project folder ('hw_config.h', etc.). This should be OK too.


3) '.\..\..\..\..\library\inc' points to the USB library header files ('usb_core.h', etc.). This will need to be changed to point to the correct directory on your machine.


Also, you will need to remove the files 'usb_core.c', 'usb_init.c', 'usb_int.c', 'usb_mem.c' and 'usb_regs.c' from the 'USBlib' node in the project explorer window/tab. Once you have done this, you will need to locate the 5 files in the USB library on your PC and add the 5 files back to the project.

I'm sorry this is so messy. I should have thought about this before I uploaded. This will fix it though!

Regards, Nick.

Offline

 

# 3   2009-06-17 12:37:30 Problems to compile

Jierre
Member
Registered: 2009-04-21
Posts: 14

Re: Problems to compile

Hello!

Thanks for you answer and your clear explanations. Unfortunatly, the project does not compile yet. usb_endp.c is the file that produces a lot of warnings and errors.
I have done all the steps. During the last one, the only folder on the computer where I find the USB_LIB is Raisonance\Ride\Examples\ARM\REva\VirtualComPort_STR75x\usb_lib\src
Is that good ?

I am getting closer hopefully...

Thanks !

Offline

 

# 4   2009-06-17 15:16:51 Problems to compile

NickK
Member
Registered: 2007-10-13
Posts: 13

Re: Problems to compile

Hi,

I think the USB library you are looking at there is for a different micro.

The library you need might be found somewhere in this area:
'\Ride\Examples\ARM\STM3210B-EVAL\STM32F10xUSBLib\USBLib\demos\Virtual_COM_Port'

If it is not on your PC you can download it separately from a link on this page:
'http://www.st.com/mcu/familiesdocs-110.html'

('http://www.st.com/stonline/products/support/micro/files/um0424.zip') = Source library.
('http://www.st.com/stonline/products/literature/um/13465.pdf') = PDF app note.

I hope this helps. I will try to get around to uploading a better version with the library included but this might not be for a while, i'm afraid.

Let me know how you get on!

Regards, Nick.

Offline

 

# 5   2009-06-17 16:29:14 Problems to compile

NickK
Member
Registered: 2007-10-13
Posts: 13

Re: Problems to compile

Hi Jierre,

I have modified the project now so please download and try this new version.
Also included is a project that is even smaller but requires some consideration when writing the PC application (a demo is included for VC++.net).

Please see my comments at the top of the page dated 17th June, 2009.

Let me know if you have any questions and I'll try to answer!

Regards, Nick.

Offline

 

# 6   2009-06-18 12:23:01 Problems to compile

Jierre
Member
Registered: 2009-04-21
Posts: 14

Re: Problems to compile

Hey !

Thanks for your answers.
First I dowloaded the library, you gave me the link. Unfortunatly I continued having the errors. But I didnt try very hard as you posted a new version. And indeed, this new version compile perfectly. So thanks for that.
Unfortunatly, when I plug my primer, windows (XP) does not recognise my device. Not as a Com port, not as anything else. I tried to install the driver you supplied in your folder but it does not install it.
Have you got an idea on how to get the primer recognized ?(I mean plugged by the "STM32"port)
Thanks again for your help, it is very useful for me.
Cheers !

Offline

 

# 7   2009-06-18 12:47:37 Problems to compile

NickK
Member
Registered: 2007-10-13
Posts: 13

Re: Problems to compile

Hi,

The driver 'inf' file is called 'stmcdc.inf'; this should be somewhere in the Ride folders.
I think that somewhere on the ST site there is an executable that can install it for you.
(http://www.st.com/stonline/products/sup … _setup.zip)


Do not connect the STM32's USB port until the C code is running (only then should you connect the USB cable).
Don't run the example PC application until the the USB has been connected (it is very basic!)

OK! Hopefully now it will work. Let me know!

Nick.

Offline

 

# 8   2009-06-19 15:43:14 Problems to compile

Jierre
Member
Registered: 2009-04-21
Posts: 14

Re: Problems to compile

Arrhh no, it is still not recognized...

Here is what I do.

- I have lauched the setup you gave me.
- I programmed the primer with your project which compile fine
- I launch the primer (by pressing the push button)
- I unplug the USB cable, but I have put the battery connector so the primer is still supplied.
- I plug the USB cable under the pushbutton
- Windows does not recognize the peripheral, say that there is not driver installed so I try update the driver by showing it the folder in raisonnance's file where the 'stmcdc.inf' is. But the driver cannot be installed...

What am I missing...?

Thanks for your help ! Eventually I will make it :-)

Offline

 

# 9   2009-06-19 23:43:11 Problems to compile

NickK
Member
Registered: 2007-10-13
Posts: 13

Re: Problems to compile

Hi Jierre,

I'm sorry, I don't know. If you lived next door I would come around and help you but I don't know what to suggest.

Is the Primer running (not just programmed) before you plug in the USB cable?

Perhaps try another Primer1 example that uses USB to see if that is recognised by the PC.

Hope you find a solution, Nick.

Offline

 

Board footer