Shop OBEX P1 Docs P2 Docs Learn Events
Simple IDE Hello.c — Parallax Forums

Simple IDE Hello.c

RockyDRockyD Posts: 17
edited 2012-08-29 11:24 in Propeller 1
I installed the SimpleIDE on Debian 64. I started with the hello.c demo. I ran into a few issues.

1) The printf line is: printf("Hello World %d\n", n); But 2 new line type characters are being sent. I did hexdump -c /dev/ttyS0 and got this output:
0000000 H e l l o W o r l d 3 9 \n \n
0000010 H e l l o W o r l d 4 0 \n \n
0000020 H e l l o W o r l d 4 1 \n \n

Is printf adding a \r to the \n? Why not just have the user do "\r\n" if that is what they want?


2) I noticed the SimpleIDE serial terminal will occasionally skip lines. See below for a sample.

Hello World 404
Hello World 405
Hello World 406

Hello World 408
Hello World 409
Hello World 410
Hello World 411
Hello World 412
Hello World 413

Hello World 415
Hello World 416
Hello World 417
Hello World 418
Hello World 419
Hello World 420

Hello World 422
Hello World 423
Hello World 424
Hello World 425

Comments

  • ersmithersmith Posts: 6,095
    edited 2012-08-29 08:59
    \n is indeed translated into carriage return + newline, because that's the most likely combination to work as newline on most terminals. This translation is skipped for files opened in binary mode (with a 'b' appended to the read/write mode in fopen).
  • jazzedjazzed Posts: 11,803
    edited 2012-08-29 11:24
    Terminal behaves better with the most recent version of the application. I'll post a Debian 64 version tomorrow - no time right now because of previous appointments.
Sign In or Register to comment.