The C-SPY debugger will set a hardware breakpoint in this function, and whenever this breakpoint is reached it will read out the register to read/write the character. (For the curious, you can see in the disassembler that the putchar() / getchar() functions linked into the code when using I/O emulation are just NOP instruction dummy functions. But it can surely be a handy tool for debugging your application anyway. You will probably notice that if you try to printf too much text it will make the output lag a bit. When entering debug mode you get the debug console window displayed by selecting View -> Terminal I/O from the top menu. ![]() This will make the linker use its special low-level I/O routines (putchar(), getchar() ) which will route it to/from the debug terminal I/O console. For this to work with the debugger console you will have to go to Project options -> Linker -> Output (tab) and in the "Format" section where you have selected "Debug information for C-SPY" you need to have "With I/O emulation modules" checked (this requires "with runtime control modules"). ![]() All you have to do is to #include and use printf() in your code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |