This error message is something I see nearly every day in the Problems View:
mingw32-make: *** No rule to make target ….
It means that the make file cannot find my file. More precise, it means that the make utility cannot resolve the rule to build the ‘target’ (see my other post on make files). Or in other words: the make files do not match any more what I have in my project. There could be several reasons:
- A file does not exist any more or is under a different path. That is something I have to fix in the project.
- I have imported a project from another place.
- I have changed the IDE and now it has a path to the libraries.
- I have generated new/different source files with Processor Expert.
All of above lead to wrong makes files with wrong paths in it.
The cure for the problem is to select the project and use the menu Project > Clean:
This will give you a dialog where you can select which projects to clean:
This cause a re-creation of the make files.
Another solution is to delete the output folder where all the make files and object files are. This is equal to what exists in classic (non-eclipse) CodeWarrior in the menu Project > Remove Object Code… But first I need to know which folder I have to delete. The Build Directory in the project settings configures this:
Deleting that folder will remove all the make files and object files. Starting a new build afterwards will then recreate my make files.
Tip: If you are exporting a project, then make sure you delete the Build Directory from the archive/project. This will reduce the file size. And it avoids that the project will get generate a “No rule to make target” message.
Happy Cleaning 🙂
I’ve been bitten too many times by “unclean” builds. Every swear you made a change, but you don’t see the result from your compiled code?
Due to this, I always clean before building. To make this easy, I when to Window > Preferences > General > Keys and then found the “Build Clean” item and gave it a key binding of Alt+C.
LikeLike
That’s a good tip! What helps is as well enabling the ‘Build (if required) before launching’ option in Window > Preferences > Run/Debug > Launching.
LikeLike
Pingback: Dissection of MCU10 Projects | MCU on Eclipse
Pingback: Copy my CodeWarrior Project | MCU on Eclipse
Nice post! It really worked for me. Thanks a lot.
LikeLike
Hi Daniel,
yes, this is probably one of the most (in)famous make error message, and I see a lot stumbling ove it.
Glad it helped you.
LikeLike
Hi Erich,
I Got my new FRDM-K64F board!!!!!:-) ready to role:-)
But i faced this getting started error.
I have this problem every time i upgrade my IDE or MQX version. Can you please help me figure out any permanent generic solution for same,
Problem: Same error as above mention in blog
Observation: when i import the example project of MQX RTOS for my new FRDM-K64F board, all the link location are incorrect, the make file cannot find the intFlash.ld to proceed and it abruptly stops
error: mingw32-make: *** No rule to make target `C:/lib/frdmk64f.cw10gcc/debug/bsp/intflash.ld’, needed by `explicit-dependencies’. Stop.
I need your help to figure out this Problem. Last time when i tried accidentally the problem was solved for K60 tower system.
LikeLike
I assume you already have tried the ‘clean’ workaround? Is your linker file in C:/lib/frdmk64f.cw10gcc/debug/bsp/intflash.ld? I suggest to carefully check the links if they are correct. And keep in mind that the compiler settings need to match the file locations as well.
LikeLike
Hi Erich,
Yes as per your suggestion i corrected each link in compiler, assembler and linker now the project is build with no error.
but one problem i am not able to solve is the source files are not getting copy in my workspace project causing error.
as a work around i copied source file in workspace project and project->properties->resource updated the link address.
this is ok when i am copy single file but may not be suitable to big example projects.
Please guide me the correct way to do it.
LikeLike
Eclipse will find source files behind linked files and linked folders. However, if you have header files behind links, then Eclipse finds them, but not the compiler. So if you have linked header files or linked directories with header files, then you must specify the path to the header files in the compiler settings.
LikeLike
Almost same error happens to me. In my case the solution was to check “MQX_ROOT_DIR”, that was looking in a different drive from my MQX installation. After fix it (for me it was C:\Freescale\Freescale_MQX_4_0 ) all compile and works perfectly. Thank for the post, it gives me the solution.
LikeLike
Yes, almost (or same) error happens if the source file cannot be found. That was the case here too.
LikeLike
When nothing worked I replaced concerned file(file name will be mentioned in the error message) in the workspace->driver directory with the same file which I had in my library firmware and the problem was knocked out.
LikeLike