bugSimulavr: an AVR simulator - Bugs: bug #25875, Example stdiodemo not working


bug #25875: Example stdiodemo not working

Submitted by:  Knut Schwichtenberg <kschwi>
Submitted on:  Sun 15 Mar 2009 04:42:45 PM UTC  
Category: Test SuiteSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedComponent Version: simulavrxx

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Mon 20 May 2013 02:07:55 PM UTC, comment #7:

A lot of special chars are already added in current HEAD for SerialRx.

I think that there are a lot more of them :-) But I want to close this old entry now, cause SPACE is handled correct now.

Feel free to create a new entry if someone need a actually not supported special char.

Klaus Rudolph <zfrdh>
Project Administrator
Sun 22 Mar 2009 07:38:04 PM UTC, comment #6:

Attached you find the diffs for the related modules:

SPACE-handling included in method NewCharEntered. A ' ' is converted into the string "SPACE"
Into the serialRx-field entering of characters is prohibitted.

reconverting of the received string "SPACE" into character ' '

I've not check all 255 characters based on my limited knowledge of TCL. The second change to gui.tcl shall prevent native speakers from reading footers ;-) :-) (see other email of this thread.

I think this bug is fixed now.

(file #17756, file #17757)

Knut Schwichtenberg <kschwi>
Mon 16 Mar 2009 08:48:54 PM UTC, comment #5:

LOL! Nothing was wrong with it. Reader issue. Problem was
was between my ears. :)

It works as you described.

This stays open until you have the space issue corrected.
Out of curiosity, can you try all 256 possible input values?

Joel Sherrill <joelsherrill>
Project Administrator
Mon 16 Mar 2009 08:40:53 PM UTC, comment #4:


:-) please, what is unclear in my initial open issue statement? :-)

Please use any whitespace BUT NOT blank (e.g. a TAB will do).

The problem is: In the GUI the a string is created for the transmission via the port such as "receiver char "(without ") for each character entered. The split within the simulator is done on the ' ' character. So how is your ' ' is different from the parameter-separator? :-)

Knut Schwichtenberg <kschwi>
Mon 16 Mar 2009 08:29:29 PM UTC, comment #3:

I completely understand the native language issue and I don't
have any idea offhand for better labels. :-D I will think
on it.

I have attached another display2.png and I still don't see
the "u text" or "l text" working.

Perhaps I am not doing something right. :(

Ran from inside the tree this time. Committing a minor fix
for that.

(file #17713)

Joel Sherrill <joelsherrill>
Project Administrator
Mon 16 Mar 2009 08:19:25 PM UTC, comment #2:


:-) :-) The window you entered the command is described in the footer as "Serial Receiver of PC" - which I thought means this window shows the received data on the PC - or what is send by the AVR. The window below with the footer "Serial transmitter of PC" is the window to enter data to be transmitted from the PC to the AVR. Maybe not the best description but your are the native speaker - so feel free to give me a better explaination.

Please keep this bug under work status. I found a solution for the open issue with the "blank", but have not tested it.

I'll look if there is a chance to prevent the display window from data entering.

Knut Schwichtenberg <kschwi>
Mon 16 Mar 2009 08:01:59 PM UTC, comment #1:

I have committed the attached patch but the "l" and "u" commands
still do not work as I think they should from reading the code.

I attached a screen capture from my machine to make sure it
matches your expectations.

Run in a separate build tree.

(file #17712)

Joel Sherrill <joelsherrill>
Project Administrator
Sun 15 Mar 2009 04:42:45 PM UTC, original submission:

The example stdiodemo is not working - unclear window usage, handling of entered data impropper,...

Problem / Solution:
The problem for this behaviour has to do with the way the input in the TCL-script gui.tcl is handled in the serialTx frame. Each character is moved from the graphic to the simulator at occurance of the key-pressed event. The first parameter of the key-pressed event (used in the past) gives the proper ASCII-value for characters and numbers but a description for special keys like "Return", "Tab",...
The keyboard handler was modified to handle the entered character properly.
Additionally the SerialRx and SerialTx frames show a descriptive footer.

Open issue:
Currently the character "blank" (0x20) can not be transferred between the serialTx and the simulation. Entering of a space hangs the simulation.

A diff to gui.tcl 1.4 is attached

Knut Schwichtenberg <kschwi>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #17756:  gui.tcl.diff added by kschwi (1KiB - text/x-patch)
file #17757:  serialtx.cpp.diff added by kschwi (342B - text/x-patch)
file #17713:  display2.png added by joelsherrill (8KiB - image/png)
file #17712:  stdiodemo.png added by joelsherrill (8KiB - image/png)
file #17698:  gui.diff added by kschwi (2KiB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by zfrdh (Posted a comment)
  • -unavailable- added by joerg_wunsch (Updated the item)
  • -unavailable- added by joelsherrill (Updated the item)
  • -unavailable- added by kschwi (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 20 May 2013 02:07:55 PM UTCzfrdhStatusNone=>Fixed
    Sun 22 Mar 2009 09:41:09 PM UTCjoerg_wunschComponent VersionNone=>simulavrxx
    Sun 22 Mar 2009 07:38:04 PM UTCkschwiAttached File-=>Added gui.tcl.diff, #17756
      Attached File-=>Added serialtx.cpp.diff, #17757
    Mon 16 Mar 2009 08:29:29 PM UTCjoelsherrillAttached File-=>Added display2.png, #17713
    Mon 16 Mar 2009 08:01:59 PM UTCjoelsherrillAttached File-=>Added stdiodemo.png, #17712
    Sun 15 Mar 2009 04:42:45 PM UTCkschwiAttached File-=>Added gui.diff, #17698

    Back to the top

    Powered by Savane 3.1-cleanup1