NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » Compiler Problem

February 01, 2011
by Jalex
Jalex's Avatar

I just found out something that was messing me up a little. I was adding too the Nerdkit code and re-compiling. I found that what I had been adding was not being loaded on the MCU. The compiler said it was erasing the flash and loading the new program but it was acually just loading in what was there before the changes I had made. I deleted the hex file and re-compiled and then it was right.

What I want to know is: Is there a Dos Switch I can use to make it compile and not look for the MCU.

February 01, 2011
by bretm
bretm's Avatar

If your makefile is correct, the hex file should update whenever you run Make as long as the source code file is newer than the object file and hex file. If the timestamps on the files are wrong it could behave strangely, or if you're making changes to an include file that isn't mentioned as one of the dependencies then Make wouldn't have any way of realizing it should rebuild the hex file.

February 01, 2011
by Ralphxyz
Ralphxyz's Avatar

So make sure and save your source code before compiling.

Of course that is the voice of one who has been there, done that, and experienced no updates to my loaded code.

Ralph

February 01, 2011
by Jalex
Jalex's Avatar

Thanks Guys I will look and see if I can find something that might be causing that. I like to test the compile before I hook up the MCU. I had it doing that once but now it won't. It used to compile all the code and then error when it looked at the com port but now it doesn't even try until I plug in the kit. It's not really a big deal now that I know that can happen. I will just watch it closer.

Post a Reply

Please log in to post a reply.

Did you know that you can generate hundreds of volts AC from your microcontroller with a little bit of circuitry? Learn more...