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.

Microcontroller Programming » Compiling

February 05, 2011
by Jalex
Jalex's Avatar

I still have questions. Most of my programs compile correctly without errors every time. When I find out the micro doesn't do what I wanted, If I change the program and do not delete the hex file and the O files it will go though the whole process and load in the old un-corrected program without the changes I had made. Can I complie without connecting the Nerdkit or do I just continue deleting the old files every time before I am ready to flash the kit? Do these things have a limit on the amount of times they can be flashed? I like to do things trial and error and it requires a lot of re-writes.

February 05, 2011
by Rick_S
Rick_S's Avatar

Windows or Linux/MAC?

Command line or Programmers Notepad or some other editor?

I use Windows Vista and Windows 7 for my programming. I use Programmers Notepad for my editor and I compile from within that. I don't have the problem you are describing. If I edit a program, save it, then select Make All, it will re-compile before sending it to the micro. (if I forget to save it sends the old hex). You can also modify the makefile to allow for compile only or compile and program. See the makefile I included in the Real Time Clock with Maxim DS3232 thread.

This makefile will allow you to compile by selecting Make All from within Programmers Notepad, or to compile and upload by selecting Program from within Programmers Notepad. I also have an option to delete all *.o and *.hex files by selecting Make Clean in Programmers Notepad.

Yes there is a limit to how many times they can be written to.

From page 1 on the datasheet,

– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM

So it would take about 5,000 program loads (because an erase cycle and write cycle is performed each time) before you should start seeing problems.

Rick

February 06, 2011
by Jalex
Jalex's Avatar

Hi Rick Thanks, I like that. Well by the time I hit that limit I should have learned it by then. LOL Jim

Post a Reply

Please log in to post a reply.

Did you know that NerdKits also has extra parts available for its customers? Learn more...