make: *** no rule to make target 'BioloidAVR', needed by 'all' error report in Eclipse

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I migrated my AVR project to eclipse on suggestion from another user (he later suggested a more complete package which I'll get to downloading if this doesn't work) and I'm finding this a little easier to understand; however, on following a tutorial at www.instructables.com/id/How-to-... I've run into an error. Below I will provide my configuration settings but I don't know how to view the makefile in eclipse so if you want that you'll have to tell me how to retrieve it (sorry >.<)

Some background information:
Error message: make: *** No rule to make target 'BioloidAVR', needed by 'all'.
where BioloidAVR is the name of the AVR Project and I have no idea what 'all' means in this situation (kind of reall new to WINAVR, this being the first project I've ever started with it).

my directory:

(the prolog source is related to the project but not relevant with the avr makefile as it will just be providing an input to my C files)

My AVRDude Programmer Hardware Configuration:

my EEPROM/Flash settings:

my target hardware settings:

Sorry for a long post and if I posted any irrelevant information or not enough relevant information, I just have no idea what I'm looking for and not enough time left to spend a week reading through the entirety of WINAVR's reference manual hoping for an answer to this; I've tried everything I could think of and don't know what I'm doing wrong, can anyone help me?

If you need any more information to be able to help I'll be happy to provide it :)

This topic has a solution.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One thing I forgot to mention is that these errors are coming up when I use Eclipse's built in build function rather than the AVR Plugin's AVRDude Upload function, if that helps at all anyway

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

anyone?

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Haven't a clue why you are telling us all about avrdude. That's got nothing to do with this. avrdude is the program that will put a .hex file into an AVR once you have built it. Your issue here is that you aren't even building a hex file. Nothing to do with avrdude.

 

Of far more interest would be to see what .c or .cpp files are in the project and how these are specified in the Makefile. The error is saying that make has attempted to build a top level target called BioloidAVR but one of the steps required to do that has failed. This might simply be a file that has some kind of compilation error in which case showing the very last error is pointless - it's the very first one that matters. Or it could be that make can't ven find one or more of the files it's supposed to be building. In theory this shouldn't happen when you use an IDE like Eclipse as you just tell it the source files and then it arranges to create a Makefile that should list them. So I'm guessing it's simply that one of those files threw some kind of compilation or linking error.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
/*
 * BasicRobotFunctions.cpp
 *
 *  Created on: 10 Mar 2015
 *      Author: Edward
 */

#include "BasicRobotFunctions.h"
#include "dynamixel.h"			// Official USB2Dynamixel SDK file.
#include "math.h"
#include "typedefinitions.cpp"
#include "String.h"
#include "avr/io.h"

#define DEFAULT_PORTNUM 3   // COM3
#define DEFAULT_BAUDNUM 1  //  1Mbps

BasicRobotFunctions::BasicRobotFunctions() {

}

BasicRobotFunctions::~BasicRobotFunctions() {
	// TODO Auto-generated destructor stub
}

//for each of the basic functions, dynamixels have to be initiated before any data is processed
// and terminated afterwards

//Step(String) will move the corresponding leg through a series of motor movements (the legs have 3)
//each motor must move into place before the next can start moving
//the same idea is used in MoveArm(String) and MoveChest()
void Step(char * x){
	dxl_initialize(DEFAULT_PORTNUM,DEFAULT_BAUDNUM);
	dxl_write_word(1,32,255);
	dxl_write_word(2,32,255);
	dxl_write_word(11,32,255);
	dxl_write_word(15,32,255);
	dxl_write_word(1,30,255);
	dxl_write_word(2,30,255);
	dxl_write_word(11,30,255);
	dxl_write_word(15,30,255);
	if (strcmp(x,"left")){
			//for all cases of dxl_write_word:
			//input addresses of corresponding motors and data to be processed by the robot
			if(dxl_read_word(11,30)==0){
				dxl_write_word(11,32,255);
				dxl_write_word(14,32,-255);
				dxl_write_word(15,32,-255);
				dxl_write_word(11,30,100);
				dxl_write_word(14,30,100);
				dxl_write_word(15,30,100);
			}
			dxl_write_word(14,32,-255);
			dxl_write_word(15,32,-255);
			dxl_write_word(14,30,100);
			dxl_write_word(15,30,100);
			//the dxl_write_word(int,int,int) function sends a data packet to a dynamixel
			// in the motors these data packets should cause movement
			//the dxl_sync_write_word(int,int,int[],int[]) function requires:
				//a number of motors to receive data
				//the address specifying what kind of data is received (rotation,torque,etc)
				//the dynamixel ids of the receiving motors
				//the data values to be sent

	}
	else if (strcmp(x,"right")){
		if(dxl_read_word(15,30)==0){
			dxl_write_word(15,32,255);
			dxl_write_word(13,32,-255);
			dxl_write_word(11,32,-255);
			dxl_write_word(15,30,100);
			dxl_write_word(13,30,100);
			dxl_write_word(11,30,100);
		}
		dxl_write_word(13,32,-255);
		dxl_write_word(11,32,-255);
		dxl_write_word(13,30,100);
		dxl_write_word(11,30,100);
	}
}

void MoveArm(char* x){
	if (strcmp(x,"left")){
		dxl_write_word(1,32,-255);
		dxl_write_word(3,32,-255);
		dxl_write_word(5,32,-255);
		dxl_write_word(1,30,100);
		dxl_write_word(3,30,100);
		dxl_write_word(5,30,100);
	}
	else if (strcmp(x,"right")){
		dxl_write_word(2,32,-255);
		dxl_write_word(4,32,-255);
		dxl_write_word(6,32,-255);
		dxl_write_word(2,30,100);
		dxl_write_word(4,30,100);
		dxl_write_word(6,30,100);
	}
}

void MoveChest(){
	dxl_write_word(7,32,-255);
	dxl_write_word(8,32,-255);
	dxl_write_word(11,32,-255);
	dxl_write_word(15,32,-255);
	dxl_write_word(14,32,-255);
	dxl_write_word(13,32,-255);
	dxl_write_word(7,30,100);
	dxl_write_word(8,30,100);
	dxl_write_word(11,30,100);
	dxl_write_word(15,30,100);
	dxl_write_word(14,30,100);
	dxl_write_word(13,30,100);
}

int getDistance(pos A, pos B){
	int C;
	C = sqrt((pow(A.x-B.y,2)+pow(A.y-B.y,2)));
	return C;
}

int getStepDistance(Robot R){
	pos x = R.getPosition();
	Step("left");
	Step("right");
	pos y = R.getPosition();
	return getDistance(x,y);
}

int CalculateSteps(Robot R,pos B){
	int stepdist = getStepDistance(R);
	int dist = getDistance(R.position,B);
	return dist/stepdist;
}

bool getHolding(Robot R){
	if (R.getCarrying()==false)
		return false;
	else return true;
}

/*
 * main.cpp
 *
 *  Created on: 23 Mar 2015
 *      Author: Edward
 */

#include "BasicRobotFunctions.h"
#include "dynamixel.h"
#include "avr/io.h"

#define DEFAULT_COMM 1
#define DEFAULT_BAUD 3

int main(){
	dxl_initialize(DEFAULT_COMM,DEFAULT_BAUD);
	Step("left");
	dxl_terminate();
	return 0;
}

the two important cpp files (if you meant you wanted to see my files), the others are basically just objects containing the important attributes of knowledge in my Bioloid's domain with respect to the project so I don't think I really need to waste your time with them haha.
What I understood is that I should be looking for errors in my .cpp files with respect to their linkage and their syntax/logic wrt my Bioloid packages so I'll spend some time trying to fix that. Thanks for your help :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No I'm not interested in seeing the source. I am talking about the Makefile that Eclipse creates and the complete output of the build process.

 

I don't use Eclipse myself but I imagine it has some way for you to say "this project uses file1.cpp, file2.cpp and file3.cpp". When you then [build] it creates a Makefile that lists the locations of file1.cpp, file2.cpp and file3.cpp. It then launches "make" which reads the Makefile and the rules it contains and for each source file it invokes the compiler then at the end it invokes the linker to join all the build outputs together.

 

What I'm saying is that somewhere in that process something fails. So you need to debug what's going on and find out where and why. The message you see right at the end just says "something went wrong in this build". It tells you nothing about what that was. You need to look at the earlier stages of the build to see why that is.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

question, does my avr device have to be connected for me to build my project in winavr?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Absolutely not. I build AVR code all the time while very rarely having any hardware attached to my PC.