cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4Discovery VCP Problem

naceur2311
Associate II
Posted on April 18, 2013 at 18:44

Hello,

I want to test

http://www.mediafire.com/?0ghzhc6jgn90u4k

of VCP on STM32F4 Discovery board.But in building the project the following error occurs.

warning: implicit declaration of function 'VCP_dataTx' is invalid in C99

Can any one help me.

Thank you.
5 REPLIES 5
Posted on April 18, 2013 at 19:41

VCP_DataTx() would need to be something other than 'static' to be referenced outside of usbd_cdc_vcp.c, like in main.c

You're building this under what environment?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
naceur2311
Associate II
Posted on April 18, 2013 at 23:27

I tried to declare the function without ''static'' but the same error persist. I'm building the project under Keil uVision 4. You can download it from the link above.

Thank you.
Posted on April 19, 2013 at 00:32

Yeah, figured that out.

Just needed to add a prototype in main.c, and remove the static from usbd_cdc_vcp.c for it to compile.

Build target 'STM32F4_VCP'

compiling main.c...

compiling usbd_cdc_vcp.c...

linking...

Program Size: Code=17200 RO-data=548 RW-data=404 ZI-data=4796  

''.\Debug\STM32F4_VCP.axf'' - 0 Error(s), 0 Warning(s).
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
naceur2311
Associate II
Posted on April 19, 2013 at 16:51

Yeah, there are no error now. But i don't understand the redirection of printf() function to the Hyperterminal. And i'm not used to work with µVision and i have a doubt about the configuration of th µVision project. Can any oneverify it.

Thank you.
Posted on April 19, 2013 at 18:43

Firmware, works and provides a virtual serial port, which is retargeted by Keil to use stdio. Uses the V1.3 x64 VCP Driver

Talking to the board via terminal application:

Virtual COM Printf Example: retarget the C library printf function to the USB
> Unknown Command
> help Command
> Command s
> Command t
> Command l
>

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..