Skip to content

TARGET Maxim get_usb_phy() issue due to incorrect target specified in USBPhy_Maxim.cpp #15334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Gerriko opened this issue Oct 6, 2022 · 2 comments

Comments

@Gerriko
Copy link

Gerriko commented Oct 6, 2022

Description of defect

I attempted to run this USB Serial example (https://os.mbed.com/teams/MaximIntegrated/code/FTHR_USB_Serial_mbed-v67/) in Mbed Studio using Mbed OS 6.16 (and Mbed OS 6.15) with a MAX32620FTHR board.

The example compiles but creates a runtime error as it cannot find a hardware USB driver.
This is resolved by adding USBDEVICE as a target override in mbed_app.json.

However, this now creates a known compile problem, namely Undefined symbol get_usb_phy()

Upon further online searches, I checked the TARGET Maxim folder and I could see that both USBPhyHw.h and USBPhy_Maxim.cpp files were present as they should be. So this did not make sense.

I opened up USBPhy_Maxim.cpp file and spotted a problem with the following compiler directive as there is no TARGET_MAX32620 in the folder:

#if defined(DEVICE_USBDEVICE) && (DEVICE_USBDEVICE) && \
    (defined(TARGET_MAX32620) || defined(TARGET_MAX32625) || defined(TARGET_MAX32630))

The folder is listed as TARGET_MAX32620C

Thus by changing all cases with TARGET_MAX32620 listed to TARGET_MAX32620C in that file, it was able to compile.

I am reporting an error in the file USBPhy_Maxim.cpp, which incorrectly uses TARGET_MAX32620 instead of TARGET_MAX32620C

Target(s) affected by this defect ?

All Maxim MAX32620xxxx boards

Toolchain(s) (name and version) displaying this defect ?

ARM Compiler | 6.16 | up to date |  

What version of Mbed-os are you using (tag or sha) ?

Mbed OS 6.15.1.
Mbed OS 6.16.0.

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

Mbed Studio: 1.4.4
Clangd | 12.0.2 | up to date |  
Example projects | 1.11.0 | up to date |  
GDB client | 6-2017-q2-update | up to date |  
Git | 2.23.1 | up to date |  
Mbed Library Cache | 1.10.0 | up to date |  
Python tools | 0.6.0 | up to date |  
Debug Packs | 1.1.0 | up to date

How is this defect reproduced ?

I attempted to run this USB Serial example (https://os.mbed.com/teams/MaximIntegrated/code/FTHR_USB_Serial_mbed-v67/) in Mbed Studio using Mbed OS 6.16 (and Mbed OS 6.15) with a MAX32620FTHR board.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 10, 2022

cc @ARMmbed/team-maximintegrated please review

@ahmetalincak
Copy link

Hi @Gerriko,

Thank you for raising the issue. We'll investigate and apply the solution ASAP. You can also create a Pull Request for your solution.

Regards,

Ahmet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants