NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » Weight Scale Load cell Makefile Help
November 29, 2012 by gasrcboat |
I cannot seem to create the proper make file. I am using the temp sensor make file. How do I combine the tutorial weight scale file with the temp sensor file?
Any help would be greatly appreciated!
Thanks,
n00b |
---|---|
November 29, 2012 by Ralphxyz |
Is this your actual question or do you have a program file (weight scale + temp sensor) that you need to MAKE? Ralph |
November 29, 2012 by sask55 |
As Ralph has said, fundamentally the make file is a bit of code used to compile a C code program file and write that set of instructions onto the Microprocessor chip. For a beginner the make file will not change from one project to the next except for the name of the C code program file that you want to install on the Micro. Are you attempting to MAKE the weight scale program file “weightscale.c” found in the weight scale project? Or Are you attempting to MAKE the tempsensor program file “tempsensor.c” found in the tempsensor project? Or Are you are attempting to MAKE a project that is some kind of combination of the temp sensor and the weight scale projects? To do this you will have to write c code instructions to do what you have in mind. You might base your new C code program file on weightscale.c, or on tempsensor.c . By studying those two files, the weight scale tutorial and the Nerdkit guild you will get an understanding of what is require to write a set of C code instructions that will carry out whatever you are attempting to do. Once you have written your C code that you think will produce the results you are looking for you then use a make file to compile your code and write it to the microprocessor chip. I don’t think we understand what it is you are asking. |
November 30, 2012 by gasrcboat |
Thank you for your help. I am trying to create the weight scale project. I went way to deep into what was involved in the make file. The more I read on the make file for the project the further away I got. For some reason I thought I had to combine the source code for the weight scale and a Make file instead of just referencing it. I have Python running and the scale built, I will install the code and reference the make file as soon as I get a free moment. Thanks to all for the help. |
November 30, 2012 by sask55 |
One more point to consider. The location, on the computer, of the C code program (source) file and the make file are important. The make file and the program file will both reference other files on your hard drive. In the make files supplied in the Nerdkit, there are 14 references to the source code .c file to be complied. All 14 should match the name of the source code .c file program file that in the same folder as that make file. The libnerdkits folder must be in the same folder as the folder containing both of those files. If your relative file locations are correct and the make file is referencing the .c code sources code file in the same folder everything should work fine. |
November 30, 2012 by gasrcboat |
Back again and I feel really defeated! copy of makefile for weightscale.
Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:UsersDeeDownloadsCodeCodeWeightscale> Thank you in advance. |
November 30, 2012 by pcbolt |
@ gasrcboat The error doesn't appear to be caused by a bad Makefile, it looks like the error is in the "compiling of the program" step. The error on line 10 above...
... usually means a missing comma, semi-colon, or parenthesis etc in the source code file "weightscale.c". Check through that file to see if anything jumps out as being wrong. (You can ignore the warning unused variable message for now). When I tried the first time to download the code it came through all mashed together so if I tried to compile it I would have gotten errors. I saved it as a file directly the second time and it looked OK when I viewed it. If all else fails, see if you can post the code you are using, maybe someone here can spot something out of place. |
November 30, 2012 by gasrcboat |
This is my weightscale file.
|
November 30, 2012 by pcbolt |
Ah. Looks like you are missing a closing brace after
The one before it closes "while(1){" so you need one to close "main(){". So the final three lines should be
Also, if you want to get rid of the warning message, just comment out (or get rid of) line 70 above. |
November 30, 2012 by gasrcboat |
I redid the source file and now I still get error 1
|
November 30, 2012 by pcbolt |
@ gasrcboat - Prepare for an "Arrrrrgh" moment...in your Makefile from 3 posts ago, you have this at line 11...
See the problem? "Weighscale.hex". No 't'. |
November 30, 2012 by gasrcboat |
Imagine that! Thak you, mcu flashed fine! |
November 30, 2012 by Ralphxyz |
re: the missing t in the make file This is where the:
Programname or Target or whatever works nicely to avoid this kind of problem!! This is courtesy of bretm. Ralph |
Please log in to post a reply.
Did you know that many systems in nature can be described by a first order response? Learn more...
|