Skip to main content
Visitor II
October 4, 2021
Solved

Unable to compile STM32F072_MB1303_DRP_2PORTS project on STM32cubeIDE

  • October 4, 2021
  • 1 reply
  • 3367 views

after extract the zip file to the shortage path

C:\st2\STSW_STUSB010_v1.3\Projects\STM32F072RB-Nucleo\Appli\usbpd\STM32F072_MB1303_DRP_2PORTS

then import the example with STM32CubeIDE. Then compile result was

"Build Failed. 34 errors, 3 warnings. (took 16s.325ms)"

not sure how to config the project to make it successful compile?

Can anyone help me?

Here is the compile result

    This topic has been closed for replies.
    Best answer by Yohann M.

    Dear @ssara.1​ 

    I don't have any ideas why it does not work with this workspace (I did not find any differences between a working workspace and your workspace on UI side)

    Anyway, It seems working in doing the following steps:

    • close CubeIDE
    • Edit the file .cproject
    • replace (2 occurrences):
      • <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
      • by
      • <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/><additionalInput kind="additionalinput" paths="$(LIBS)"/>
    • Save the file
    • Open again the project in CubeIDE

    Regards,

    Yohann

    1 reply

    ST Employee
    October 13, 2021

    Dear @ssara.1​ 

    The USB-PD lib is not compiled with your project. To add it, follow the settings like this picture:

    0693W00000FCJWtQAP.png 

    Regards

    Yohann

    ssara.1Author
    Visitor II
    October 13, 2021

    Thank for your answer Yohann. But seem like the project setting is already set the same as your picture.

    Is there any other setting I need to change?

    ST Employee
    October 13, 2021

    Hello @ssara.1​ 

    You should see this lib into your linker command:

    arm-none-eabi-gcc -o "USB-PD_Provider_1port.elf" @"objects.list" -l:USBPDCORE_PD3_FULL_CM0PLUS_wc32.a -mcpu=cortex-m0plus -T"....Applications\USB-PD\USB-PD_Provider_1port\STM32CubeIDE\STM32G081RBTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="USB-PD_Provider_1port.map" -Wl,--gc-sections -static -L../../../../../../../Middlewares/ST/STM32_USBPD_Library/Core/lib --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

    It is not the case in your log.

    Yohann