This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

printf on lpc2129

I can't seem to get printf going on my system. I've declared putchar as extern and written a routine called putchar to output to the serial port, but the application dies whenever I try to printf. I dare say I'm not doing something fairly fundamental!

Parents
  • I did a bit more reading and fiddling tonight. After reading a bit more on how to create a project (I had previously added to the blinkyirq sample project), I created a new project, added the same files as I had used previously and sprintf started working. I then tried printf which also worked through my interrupt driven comms. So I'm happy, don't ask me what changed though to make it work apart from creating a new project. I found to get printf working with my code I had to add syscalls.c to the project (I had tried that previously with no luck). Thanks.

Reply
  • I did a bit more reading and fiddling tonight. After reading a bit more on how to create a project (I had previously added to the blinkyirq sample project), I created a new project, added the same files as I had used previously and sprintf started working. I then tried printf which also worked through my interrupt driven comms. So I'm happy, don't ask me what changed though to make it work apart from creating a new project. I found to get printf working with my code I had to add syscalls.c to the project (I had tried that previously with no luck). Thanks.

Children