I'm not sure what is causing this problem, so I wasn't sure what to search for. I didn't notice anything in the errata thread that might cover this.
I am using an ATMega328P dev board (Arduino Nano), programming it using Eclipse and uploading code using the built in AVRDude interface. The program basically queries several I2C devices and displays their formatted values on a terminal screen. There are different operating modes which changes the data and menus displayed on screen. The program has been performing as expected to this point. Today I was attempting to add a new menu selection to the code, using the same format as the other menus. However, once I added a particular printf statement, the code no longer runs. It begins to run and it has some serial output but then it locks up. I have tried simplifying the code and reducing duplication in the code, but the problem remains. I have attached all the files in the project but the problem occurs around line 90 of 328comms.c. There are presently 3 lines commented out in this section. Uncommenting any of these lines causes the program to hang. Not sure what is causing this especially since those lines are not active at the time the chip boots.
Can anyone think of a reason the code would cause the chip to hang?
The main file is 328comms.c
(Yes, the code isn't the prettiest yet. Please no comments on code neatness. :)