We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
How many bytes will printf() take up in a non debug-monitor environment? Also, is it easy to set up printf() to map to a second UART? I will need control of the UART ISR so that I can handle receives appropriately. How will this confict with printf()?
So I just have to have a putchar() somewhere in my code and this will automatically override the putchar() that printf() uses? And if I decide not to use printf() can I override the interrupts for UART transmit and receive the same way? Also, I need to prove my code works using the uVision2 simulator because we won't have a prototype for some time.
So I just have to have a putchar() somewhere in my code and this will automatically override the putchar() that printf() uses? Yes, of course. Same for getchar(). And if I decide not to use printf() can I override the interrupts for UART transmit and receive the same way? You can use interrupts with or without printf() being used. It's up to how you implement putchar and getchar. Either way, you are not overriding the interrupts. In a uC you are in complete control. Interrupts are not used by the default putchar/getchar supplied by Keil. Also, I need to prove my code works using the uVision2 simulator because we won't have a prototype for some time. I can't help you there. I always use an In-Circuit Emulator on a simple board with a RS-232 driver. - Mark