This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Undefined symbol Driver_USARTn (referred from usbd_user_cdc_acm_9.o)

Hello all!

I am trying to include a USB funcionality to my project. I am working with the scripts that KEIL give, but when I build the project I have the following report:

.\Objects\DataRain_EDM.axf: Error: L6218E: Undefined symbol Driver_USARTn (referred from usbd_user_cdc_acm_0.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 1 error messages.

I have tried to modify the Linker properties and it has not worked. 

Parents
  • Hi again Andy,

    I have been improving my code, and I am now at the point that I am able to receive characters from the host (PC). My problem now is that I don't understand how the function "USBD_CDCn_ACM_SendData" works.

    My purpose is to include the function "USBD_CDC_ACM_WriteData" inside "SendData" function. I know that WriteData is an asynchronous function, but it never interrupts the program.

    My code is:

    // Called when when all data was sent.
    void USBD_CDC0_ACM_SendData (int32_t len) {
      // Add code for handling new data send
    	int32_t cnt;
    	
    	cnt = USBD_CDC_ACM_WriteData(0, mantTxBuf, len);
    		
    	if(cnt<0) {}
    		//error	
    }

    where 

    mantTxBuf
    is my pointer to the transmitter buffer. I am sharing the same buffer with UART and USB, because my intention is that when I use the USB, the UART will be disable and viceversa.

    How "USBD_CDCn_ACM_SendData" works?

    Should I implement the asynchronous function to send data ("USBD_CDC_ACM_WriteData") as a independent function?

    Is there another strategy to send data when I have characters in my Tx buff ("mantTxBuff")??

    Thank you very much!

Reply
  • Hi again Andy,

    I have been improving my code, and I am now at the point that I am able to receive characters from the host (PC). My problem now is that I don't understand how the function "USBD_CDCn_ACM_SendData" works.

    My purpose is to include the function "USBD_CDC_ACM_WriteData" inside "SendData" function. I know that WriteData is an asynchronous function, but it never interrupts the program.

    My code is:

    // Called when when all data was sent.
    void USBD_CDC0_ACM_SendData (int32_t len) {
      // Add code for handling new data send
    	int32_t cnt;
    	
    	cnt = USBD_CDC_ACM_WriteData(0, mantTxBuf, len);
    		
    	if(cnt<0) {}
    		//error	
    }

    where 

    mantTxBuf
    is my pointer to the transmitter buffer. I am sharing the same buffer with UART and USB, because my intention is that when I use the USB, the UART will be disable and viceversa.

    How "USBD_CDCn_ACM_SendData" works?

    Should I implement the asynchronous function to send data ("USBD_CDC_ACM_WriteData") as a independent function?

    Is there another strategy to send data when I have characters in my Tx buff ("mantTxBuff")??

    Thank you very much!

Children