Skip to content

USBDEVICE_MSD and USBHOST_MSD libraries for GCC_ARM target are not included in the SDK #2

@yanbe

Description

@yanbe

I found USB_DEVICE and USB_HOST drivers for GCC_ARM target are not included in the SDK. Only
libraries for ARM target is available for now. Please bundle GCC_ARM target version of them so developers use RDA5981's USB functionality in our applications without purchasing MDK-ARM (Keli-MDK) licence which costs hundreds of dollers.

See:
https://github.com/Edragon/RDA/tree/master/SDK/RDA5981_SDK_MbedOS515_V1.3.5/features/TARGET_RDA/FEATURE_USBDEVICE_MSD
https://github.com/Edragon/RDA/tree/master/SDK/RDA5981_SDK_MbedOS515_V1.3.5/features/TARGET_RDA/FEATURE_USBHOST_MSD

ARM target requires MDK-ARM which requriees fee-based Arm toolchain. Its free evaluation version is restricted for binary size under 32KB after linking.

As SDK Example codes which use USB library get larger size on binary, they cannot mbed compile under evaluation version of MDK-ARM.

$ mbed compile -vv -m UNO_91H -t ARM --source TESTS/TARGET_RDA/usbdevice_msd/ --source ./ -c
...
Link: usbdevice_msd
Fatal error: L6050U: The code size of this image (59666 bytes) exceeds the maximum allowed for this version of the linker.

And obviously, compiling with GCC_ARM target fails because lack of USB libraries.

$ mbed compile -m UNO_91H -t GCC_ARM --source TESTS/TARGET_RDA/usbdevice_msd/ --source ./ -c
...
Link: usbhost_msd
./BUILD/UNO_91H/GCC_ARM/./main.o: In function `main':
main.cpp:(.text.startup.main+0x18): undefined reference to `USBHostMSD::USBHostMSD(char const*)'
main.cpp:(.text.startup.main+0x24): undefined reference to `USBHostMSD::connect()'
main.cpp:(.text.startup.main+0x1a4): undefined reference to `vtable for USBHostMSD'
collect2.exe: error: ld returned 1 exit status
[ERROR] ./BUILD/UNO_91H/GCC_ARM/./main.o: In function `main':
main.cpp:(.text.startup.main+0x18): undefined reference to `USBHostMSD::USBHostMSD(char const*)'
main.cpp:(.text.startup.main+0x24): undefined reference to `USBHostMSD::connect()'
main.cpp:(.text.startup.main+0x1a4): undefined reference to `vtable for USBHostMSD'
collect2.exe: error: ld returned 1 exit status

I guess this issue comes from process on packaging RDA5981_SDK_MbedOS515, not software licensing issue like LWIP library because ARM target version of USB libraries are available. So please include
lib_usbdevice_msd.a and lib_usbhost_msd.a for GCC_ARM target on packaging.

It would be nice if source code behind these USB libraries are shared. It allows developers to utilize not only USB mass storage device but also other USB device classes by hacking bare metal USB functionality on RDA5981.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions