cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to compile STM32F072_MB1303_DRP_2PORTS project on STM32cubeIDE

ssara.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

6 REPLIES 6
Yohann M.
ST Employee

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

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?

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

yes, the linker command not showing the Lib that you highlighted, How can I add it? I'm quite new to CubeIDE.If it shows somewhere in any doc pls let me know

0693W00000FCJk2QAH.png0693W00000FCJjnQAH.png

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

Wow, Thank you. it can compile with 0 error 0 warning now. Very appreciate your help.