First add VCP.h
Then add VCP.c
Modify usbd_cdc_if.c. I also changed APP_RX_DATA_SIZE and APP_RX_DATA_SIZE to 256
Finally change main.c . Include the VCP.h .
The VCP_read checks if the FIFO has data. If it has data then it sends the data back to the computer using VCP_write.
To see interaction use
picocom -b 9600 /dev/ttyACM0
Then enter some data into the VCP.
echo "hello world" > /dev/ttyACM0