NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Project Help and Ideas » odbii makefile?
June 27, 2010 by bowtie3232 |
Does anyone know where the makefile is for the odbii project? I tried to modify the initialload makefile to work and I get "make: *** No rule to make target |
---|---|
June 28, 2010 by Ralphxyz |
To make a MAKE file I just use the tempsensor MAKEFILE and do a Find and Replace for the program name. So if I have from the tempsensor project:
I just do a Find "tempsensor" Replace With "obdi". This error also looks like the one where your source code and make file are not in the same folder. Ralph |
June 28, 2010 by bretm |
I don't even do search-and-replace any more. In my makefile template I added a PROJNAME variable and just refer to ${PROJNAME} instead of the actual project name, so it only needs to be specified in one place. |
June 28, 2010 by bowtie3232 |
Thanks, I'll give the suggestions a try at my next opportunity, it may be a few day though. |
June 29, 2010 by Ralphxyz |
And where is that one place? How do you set PROJNAME? Ralph |
June 29, 2010 by bretm |
Up at the top, where all the other variables are set:
You can make up whatever variable name you want. I used PROJNAME but you could use PROJECT or PROJ or PROJECTNAME or whatever you want. For example there's nothing special about the name GCCFLAGS. Instead of GCCFLAGS you could call it FUDGEWITHALMONDS as long as you used the same name throughout the file. They're just shortcuts, for convenience. |
June 29, 2010 by Ralphxyz |
So would this work? Added to the beginning of the file. PROJECT=obdii $(PROJECT).hex: $(PROJECT).out $(OBJCOPY) -j .text -O ihex $(PROJECT).out $(PROJECT).hex That's neat, so much to learn. Thanks, Ralph |
June 29, 2010 by bretm |
Yeah, that's how I usually do it, except with curly braces instead of parentheses. I don't know if parentheses also work. |
July 05, 2010 by Ralphxyz |
parentheses actually work! I do not know if it's legit but it worked for my one and only test. Ralph |
Please log in to post a reply.
Did you know that one NerdKits customer discovered that his hamster ran several miles in a night using his kit and a Hall-effect sensor? Learn more...
|