The USBUART_Init function takes care of USB enumeration and setting the USB configuration .
THe host will send GET DESCRIPTOR commands to get the device information and the device should reply with the Device descriptor info during the enumeration process .
I tested your project . The device is not responding to Host's get descriptor commands and stalling the Endpoint . That is the reason why USB device is not being recognized .
I commented all th code inside the while loop while(!USBUART_Init()) and the device was recognized .
forum_test.PNG 31.1 K