Warning: Microchip's printf() Picky

I found tonight that when using Microchip’s printf(), and the format string does not end in “\r”, then it may cause the green-orange blinking on the program LED on the controller.

Make sure all your calls end their lines correctly.

If this is true… I think you saved me hours of frustration.

I was getting a blinky blinky code state light, and I think its because i had /n instead of /r .

Did you run into this problem or something similar?

I found that out when I re-used some code from last year… Does anyone know why they changed it?

You can use IFI’s printf if you like. It’s still included with both versions of the default code. The difference now is that you can choose to use IFI’s or Microchip’s.

Also,

make SURE no stray printfs are being calling before Initialize_Serial_Comms() is called.

If you do this, your rc will go into red-green led mode every time you reset it. So you’ll have to end up downloading your code ALL the time.
(I’m assuming ifi-loader will do these initializations for you the time you are downloading code, and as this won’t happen later, you get the crash. dunno though.)

Also,

make SURE no stray printfs are being called before Initialize_Serial_Comms() is called.

If you do this, your rc will go into red-green led mode every time you reset it. So you’ll have to end up downloading your code ALL the time.
(I’m assuming ifi-loader will do these initializations for you the time you are downloading code, and as this won’t happen later, you get the crash. dunno though, someone wanna check?)