Skip to main content
Visitor II
December 7, 2023
Solved

"No rule to make target" error after import projetc in STM32CubeIDE

  • December 7, 2023
  • 1 reply
  • 5060 views

I was trying to build the sample project in GitHub [https://github.com/STMicroelectronics/STM32CubeL4/tree/master/Projects/NUCLEO-L476RG/Examples_LL/I2C/I2C_TwoBoards_MasterTx_SlaveRx] for NUCLEO-L476RG board.

I have tried the below methods to import the project.

  1. File -> Open Project from File System
  2. File -> Import -> General -> Existing Projects into Workspace (Enable Copy Projects into workspace)
  3. File -> Import -> C/C++ -> Existing Code as Makefile Project

I am facing the issue below while building the project after import. The same error will occur after Clean and Build the project.

 

Error message for 1st and 2nd method:

15:25:22 **** Incremental Build of configuration Debug for project I2C_TwoBoards_MasterTx_SlaveRx ****
make -j4 all 
make: *** No rule to make target '/home/Desktop/Src/main.c', needed by 'Example/User/main.o'. Stop.
"make -j4 all" terminated with exit code 2. Build might be incomplete.

15:25:23 Build Failed. 1 errors, 0 warnings. (took 536ms)

 

Error message for 3rd method:

make all
make: *** No rule to make target 'all'. Stop.
"make all" terminated with exit code 2. Build might be incomplete.

15:15:56 Build Failed. 1 errors, 0 warnings. (took 554ms)

 

Notes:
  I am using the STM32CubeIDE-DEB package with the latest version of 1.14.0.

 

Kindly help to solve this.

Thank you!

    This topic has been closed for replies.
    Best answer by STTwo-32

    Hello @ArunyaS and welcome to the ST Community :smiling_face_with_smiling_eyes:.

    This repository has been created using the "git submodule" command. So, if you are using the "git clone" command, you have to use the command:

    git clone --recursive https://github.com/STMicroelectronics/STM32CubeL4.git

    To clone this repository along with the linked submodules. 

    If GitHub "Download ZIP" option is used instead of the "git clone" command, then the different submodules have to be collected and added manually.

    Also, you can always use the cube MCU package from our website. that works fine.

    Best Regards.

    STTwo-32

     

    1 reply

    STTwo-32Answer
    Technical Moderator
    December 7, 2023

    Hello @ArunyaS and welcome to the ST Community :smiling_face_with_smiling_eyes:.

    This repository has been created using the "git submodule" command. So, if you are using the "git clone" command, you have to use the command:

    git clone --recursive https://github.com/STMicroelectronics/STM32CubeL4.git

    To clone this repository along with the linked submodules. 

    If GitHub "Download ZIP" option is used instead of the "git clone" command, then the different submodules have to be collected and added manually.

    Also, you can always use the cube MCU package from our website. that works fine.

    Best Regards.

    STTwo-32