Skip to main content
Peko
Associate III
September 7, 2020
Question

No rule to make target `clean' ?

  • September 7, 2020
  • 7 replies
  • 8836 views

Hello,

I use STM32CubeIDE v 1.4.2

It appeared today during the build my project:

make clean

make: *** No rule to make target `clean'. Stop.

"make clean" terminated with exit code 2. Build might be incomplete.

11:48:08 Build Failed. 1 errors, 0 warnings. (took 100ms)

Other projects can be built.

How can this error be fixed?

Peter

This topic has been closed for replies.

7 replies

RMcn.1
Associate II
September 29, 2020

So no answers yet, huh? That really *****... I have the same question.

RMcn.1
Associate II
September 29, 2020

apparently you can't write ***** on this site - as in my vacuum ***** the dirt from the carpet, or the draft ***** the hot air from a room, or this forum *****

BJohn.6
Associate II
May 2, 2021

I have the same problem. Happens with imported examples mostly. I suspect there is somewhere to check a box. It is irritating not being able to fix it..

Stark
Associate II
April 14, 2023


_legacyfs_online_stmicro_images_0693W00000bi71bQAA.pngdid you fix that error? I am also getting the same error with this method

BTrem.1
Senior
May 2, 2021

When I have these problems I make sure to select the Project name in the Project Explorer window. I then right click and select clean project, then repeat with build project. I've noticed if you happen to have another file selected and do a clean or build the Eclipse based GUI gets confused. That's my 2 cents ...

BJohn.6
Associate II
May 2, 2021

The problem seemed to fix itself, but I will keep this in mind. Thanks.

gsieb.1
Associate II
May 6, 2021

For me, I started getting the error " *** No rule to make target 'clean' " when I added a folder to the project.

(I linked to the folder rather than copy it to the workspace, in case that matters.)

To fix:

Right-click on the project

In the pop-up select Index -> Update with Modified Files.

I may have also done Index -> Refresh.

Anyway, after a Build I can now Clean OK.

I noticed that if I Clean Project and then attempt to Clean Project a second time (when project is already clean) I get the error.

I didn't think that happened before I started getting the error, but it definitely works now when I need it.

I hope this helps.