SAMR21 Xplained Pro - BitCloud SAMR21 3.2.0 - usb.c missing?

AT91SAM9 Evaluation Boards

Moderator: nferre

lourensrozema
Posts: 4
Joined: Sun Jul 12, 2015 5:51 pm

SAMR21 Xplained Pro - BitCloud SAMR21 3.2.0 - usb.c missing?

Mon Jul 20, 2015 2:32 pm

Hi all,

I am trying to modify the WSNDemo to use VCP via on-chip USB, but it can't find HAL_UsbWrite and the like. After a bit of research cortexm0+/common/src/usb.c is missing. If I compare with the BitCloud for AVR then avr/common/src/usb.c is there and implements that method. Anyone an idea if VCP straight from the chip on the SAMR21 board is possible?

Thanks!
lourensrozema
Posts: 4
Joined: Sun Jul 12, 2015 5:51 pm

Re: SAMR21 Xplained Pro - BitCloud SAMR21 3.2.0 - usb.c miss

Wed Jul 22, 2015 12:23 pm

Hi awneil,

Thanks for your answer. I know about the EDBG chip, but it does not seem like a good idea to include the EDBG chip in a final product. Neither do I like the idea to add an additional chip for USB support while the ATSAMR21G18A has hardware USB support. In the ASF library I also see support for USB, but I would really like to be able to use the files in Components/HAL/drivers/USBClasses/VCP/src and Components/HAL/drivers/USBClasses/common/src and all that seems missing is usb.c as I get these errors:

obj/vcpCdcProtocol.o: In function `vcpResponseGetLineCoding':
vcpCdcProtocol.c:(.text.vcpResponseGetLineCoding+0x24): undefined reference to `HAL_UsbWrite'
obj/vcpCdcProtocol.o: In function `vcpRequestHandler':
vcpCdcProtocol.c:(.text.vcpRequestHandler+0x18): undefined reference to `HAL_Stall'
vcpCdcProtocol.c:(.text.vcpRequestHandler+0x32): undefined reference to `HAL_UsbRead'
obj/vcpVirtualUsart.o: In function `vcpTmtCallback':
vcpVirtualUsart.c:(.text.vcpTmtCallback+0x36): undefined reference to `HAL_UsbWrite'
vcpVirtualUsart.c:(.text.vcpTmtCallback+0x74): undefined reference to `HAL_UsbWrite'
obj/vcpVirtualUsart.o: In function `VCP_OpenUsart':
vcpVirtualUsart.c:(.text.VCP_OpenUsart+0x28): undefined reference to `HAL_RegisterEndOfBusResetHandler'
vcpVirtualUsart.c:(.text.VCP_OpenUsart+0x2c): undefined reference to `HAL_GetState'
vcpVirtualUsart.c:(.text.VCP_OpenUsart+0x36): undefined reference to `HAL_UsbInit'
obj/vcpVirtualUsart.o: In function `VCP_WriteUsart':
vcpVirtualUsart.c:(.text.VCP_WriteUsart+0x50): undefined reference to `HAL_UsbWrite'
vcpVirtualUsart.c:(.text.VCP_WriteUsart+0x9c): undefined reference to `HAL_UsbWrite'
vcpVirtualUsart.c:(.text.VCP_WriteUsart+0xbe): undefined reference to `HAL_UsbWrite'
obj/vcpVirtualUsart.o: In function `vcpEnableReadPipe':
vcpVirtualUsart.c:(.text.vcpEnableReadPipe+0x50): undefined reference to `HAL_UsbRead'
vcpVirtualUsart.c:(.text.vcpEnableReadPipe+0x74): undefined reference to `HAL_UsbRead'
vcpVirtualUsart.c:(.text.vcpEnableReadPipe+0x98): undefined reference to `HAL_UsbRead'
obj/usbEnumeration.o: In function `runtimeGetDescriptorHandler':
usbEnumeration.c:(.text.runtimeGetDescriptorHandler+0x12): undefined reference to `HAL_Stall'
usbEnumeration.c:(.text.runtimeGetDescriptorHandler+0x34): undefined reference to `HAL_UsbWrite'
usbEnumeration.c:(.text.runtimeGetDescriptorHandler+0x4c): undefined reference to `HAL_UsbWrite'
usbEnumeration.c:(.text.runtimeGetDescriptorHandler+0x6c): undefined reference to `HAL_UsbWrite'
obj/usbEnumeration.o: In function `runtimeRequestHandler':
usbEnumeration.c:(.text.runtimeRequestHandler+0x20): undefined reference to `HAL_SetConfiguration'
usbEnumeration.c:(.text.runtimeRequestHandler+0x28): undefined reference to `HAL_ConfigureEndpoint'
usbEnumeration.c:(.text.runtimeRequestHandler+0x30): undefined reference to `HAL_ConfigureEndpoint'
usbEnumeration.c:(.text.runtimeRequestHandler+0x38): undefined reference to `HAL_ConfigureEndpoint'
usbEnumeration.c:(.text.runtimeRequestHandler+0x4c): undefined reference to `HAL_UsbRead'
obj/usbEnumeration.o: In function `usbBusResetAction':
usbEnumeration.c:(.text.usbBusResetAction+0x4): undefined reference to `HAL_RegisterRequestHandler'
obj/usbSetupProcess.o: In function `setupProcessRequestHandler':
usbSetupProcess.c:(.text.setupProcessRequestHandler+0x12): undefined reference to `HAL_Stall'
collect2: error: ld returned 1 exit status

And these methods are all defined in usb.h, but since usb.c is missing I don't have their implementation. :-(

So I hope that one of the Atmel developers can do a git commit -a -m or whatever version control they are using. :-)

Thanks!
lourensrozema
Posts: 4
Joined: Sun Jul 12, 2015 5:51 pm

Re: SAMR21 Xplained Pro - BitCloud SAMR21 3.2.0 - usb.c miss

Tue Sep 15, 2015 10:25 pm

Anyone from Atmel here?
CelineZ
Posts: 1
Joined: Fri Feb 12, 2016 10:56 am

Re: SAMR21 Xplained Pro - BitCloud SAMR21 3.2.0 - usb.c miss

Mon Feb 15, 2016 9:46 am

Like you, I found many bugs(specially some incomplete and incorrect files) in the ATSAMR21 and no one from Atmel comes to answer questions.
:( :? :evil:

Return to “Evaluation and Development Boards”

Who is online

Users browsing this forum: No registered users and 3 guests