cancel
Showing results for 
Search instead for 
Did you mean: 

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

ArunyaS
Associate II

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!

1 ACCEPTED SOLUTION

Accepted Solutions
STTwo-32
ST Employee

Hello @ArunyaS and welcome to the ST Community 😊.

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

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
STTwo-32
ST Employee

Hello @ArunyaS and welcome to the ST Community 😊.

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

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.