the code works exactly how you wrote it, from my point of view.
Why the board stops? The board not stop but is waiting for input from serial. Because the method pc.getc() inside pc.putc(pc.getc()+1); will stay until you not send a char from your pc.
So simply send a number from your serial terminal to your board and then the board will reply your number +1 and loop will be done and will starting again.