Shop OBEX P1 Docs P2 Docs Learn Events
Javelin Stamp Ide BETA — Parallax Forums

Javelin Stamp Ide BETA

Peter VerkaikPeter Verkaik Posts: 3,956
edited 2010-12-14 18:02 in General Discussion
Hi,
About a week ago, I have been given the Javelin Ide sources. The past week
I adapted the code to improve the Javelin Ide message window.
Attached is a beta release of the Javelin Stamp Ide program with this
improved message window.
Just unzip it in your working stamp ide folder and run it from there.
(default c:\program files\parallax inc\javelin stamp ide)

PLEASE NOTE:
This release is not supported by Parallax, so if you have questions or remarks,
post them in this thread. Also, if you are having issues using your code with this release,
try your code with the official release (version 2.0.3 http://www.parallax.com/javelin/downloads.asp·)
and see if the issue persists.

Changes to the message window:
1. You can no longer type characters in the output window
2. I changed the input box to send its contents only after pressing·Enter.
3. I added a small input box to still be able to use keypresses.
4. I added a Start Send button that allows to send a file to the javelin
5. I removed the echo from input boxes to output window
6. I added a Start Log button to save·received text to·a file
7. I added a Save Display button to save the current display content to a file
8. The message window is currently limited to 300 lines·of 200 characters wide.
9. I added linenumbers to the output window
10. The message window will display incoming messages from a running javelin upon startup (no need to program it first)
Just select debug->messages. If the javelin happens to be waiting for data (Terminal.getChar()) you can simply
send text via file or input boxes. It will not reset the javelin.
11. Added a Reset button. This will reset the javelin by toggling the DTR pin. If the comport option is set to AUTO, this
will first·search for·a connected javelin, so·then it takes a few seconds to actually reset.
There is also a reset button added to the main window for convenience.

At the end of this week I will receive a Board of Education usb version. The first priority then
is to try to resolve a timing issue with this usb board, in that javelin programs cannot use Terminal.getChar(),
and that after downloading a small program to the javelin, the javelin does not accept new downloads.

Second on my list is to let the Link command generate a .jem file, and add a command Download that
just downloads a jem file to the javelin. That way you don't need·to use JavelinDirect to just download
a jem file.


Please post any bugs, comments, remarks and requests to this thread.

June 6, 2007
· bug fix Debug window (Project->Debug and Project->Debug resume should work)
June 7, 2007
· bug fix Find and Replace (edit->Find and Replace.. and Edit->Find again (F3) should work)
June 7, 2007
· bug fix Status bar, now shows 4 fields: cursor x:y, file modified/readonly, insert/overwrite, simple messages (hints)
June 8, 2007
· bug fix Print (File->Print now prints the entire file)
June 8, 2007
· bug fix Reopen a nonexistent recent file or close all open files would generate exception errors
and abnormal program termination. This has been fixed.
June 9, 2007
· Added a tab Editor to Project->Global Options.
Here you can set the font and colors used in the editor.
June 13, 2007
· bug fix JavaDoc and Comment style, the settings were saved but not restored properly. This is fixed now.
June 14, 2007
· bug fix, doubleclicking on compile/link error in status window did not jump to correct place in file. Fixed.
June 14, 2007
· bug fix, now handles all exception errors when clicking menu commands while no files are open.
June 15, 2007
· bug fix, menu Edit->Show code templates now operating
· bug fix, Debug window "run" line now fully selected in editor window
· Added linenumbers to the editor windows
· Added linenumbers to the printer output
· Added date,time,filename,pagenumber to footer of printer output
June 26, 2007
· Completed download command (downloads jemfile to javelin)
· Commands link and program now create jemfile if link succeeds
· This beta includes the fixes for usb connections Professional Development Board and Board of Education USB.
· This beta requires the modified Terminal.java (which also works with official release 2.0.3)
June 29, 2007
· Bug fix, after some runtime errors, the comport was not correctly closed so a following program command
· could not find the javelin.
July 3, 2007
· Bug fix, status messages Read Only / Modified and Overwrite / Insert now reflect the status of the file in focus.
July 3, 2007
· Bug fix, editor options color settings, though saved and read from registry correctly, were not activated in
· the editor windows. Fixed.
July 6, 2007
· Fixed and added message window cursor control. Added visible cursor to message window.
July 7, 2007
· Added editor options: Smart Tabs, Smart Tab Delete, Auto Indent
July 8, 2007
· Added editor options: Tab Indent and Tab Width, to enable selected text indent
July 9, 2007
· Added auto fill of Search and Replace search text field in case text was selected
· (if you select text in your java file, then CTRL+F or Edit->Search and Replace opens
· search window with selected text as Text to find)
· Changed 'Unhandled exception error' behaviour. Instead of automatically exiting the debugger
· (which also closes the message window) the debugger session remains active, so you can
· view the message window and simply reset the javelin for another run.
July 11, 2007
· Added multiview ability to the message window. You need the JideTerminal.java class, which
· must be placed in the ...\lib\stamp\core folder.
July 15, 2007
· Completed multiview support in message window.
· Added disclaimer page to Help->About.


regards peter

Post Edited (Peter Verkaik) : 7/15/2007 3:58:25 AM GMT
«134

Comments

  • Don FrenchDon French Posts: 126
    edited 2007-06-05 04:38
    Good improvements, Peter but there is one big problem: Edit>Find doesn't work at all.

    BTW, I am a little surprised by the file date being January 24, 2005. When I went looking for the file on my hard drive, this date threw me. I was looking for something a little more recent.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-05 04:51
    I will look to it.
    That date is because my PC clock is set back.
    regards peter
  • Don FrenchDon French Posts: 126
    edited 2007-06-05 04:57
    Peter,

    While you are looking into the search code, can you see what it would take to make a search wrap? This lack is a constant irritation with the IDE. Thanks.

    -- Don
  • Jon KeinathJon Keinath Posts: 146
    edited 2007-06-05 16:45
    Peter -

    So far the changes look excellent. I will try and test some of the functions later on today.

    As far as requests, I would like to see the ability to change the font to the new Parallax font. That way schematics and diagrams could be added directly to the files like in the Propeller Tool.
    A simple character selector would be nice, but I would be happy with just the ability to use the font.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Jon
    www.jonkeinath.com
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-05 16:57
    All requests are noted. There are a few bugs that must be resolved first.
    The Edit->Find/Replace and the Debug Window does not show
    correct values.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-05 22:55
    A new beta has been posted to the first post in this thread.
    I fixed the debug window, so you should be able to use Project->Debug and Project->Debug resume.
    In contrast to the 2.0.3 version, the·'breakpoint' and 'run' lines·are only marked to the left,
    instead of the entire lines. Since this is purely cosmetic, I postpone these kind of fixes,
    to concentrate on more important issues.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-07 15:56
    A new beta has been posted to the first post in this thread.
    The Edit->Find and Replace... and Find Again (F3) should work now.
    In contrast to version 2.0.3 the Find and Replace window remains active until you close it.
    Also, if you do a Find, and a match is highlighted, then clicking Replace replaces the highlighted text.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-07 18:30
    A new beta has been posted to the first post in this thread.
    · bug fix Status bar, now shows 4 fields: cursor x:y, file modified/readonly, insert/overwrite, simple messages (hints)

    regards peter
  • Don FrenchDon French Posts: 126
    edited 2007-06-07 20:13
    Hooray for you, Peter! The changes to Find are really excellent and were sorely needed.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-07 20:28
    The following bugs will be corrected next·(in that order):
    File->Print
    Project->Make Project, Select Project, Project options
    Edit->Show code templates

    If you know of any more bugs, let me know.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-08 12:43
    A new beta has been posted to the first post in this thread.
    The File->Print command has been fixed. At this moment it merely prints
    the file as·in the editor window (bold keywords, colors, no linenumbers).

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-08 16:04
    A new beta has been posted to the first post in this thread.

    · bug fix Reopen a nonexistent recent file or close all open files would generate exception errors
    and abnormal program termination. This has been fixed.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-09 02:59
    A new beta has been posted to the first post in this thread.
    Added a tab Editor to Project->Global Options.
    Here you can set the font and colors used in the editor.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-09 09:39
    At this point in the development I would like some input on something
    I was thinking of: increasing javelin connectivity.
    The following concerns the Javelin Ide port.

    The javelin can communicate with the PC via its serial programming port.
    Problem is the protocol used, which makes it impossible to use that port
    directly for existing PC applications. The javelin ide program extracts
    messages send to the PC using System.out.print().
    In fact this translates into using CPU.message(char[noparse]/noparse data, int length)
    This means we can send any value, including nulls.

    Normal characters (ascii codes 32-255) are always send to the Javelin Message Window.
    A few control characters (ascii codes 0-31) are assigned to perform specific actions.
    In the following list I use Fixed to·identify already assigned values.

    0· - Proposal: switch to main output (access·standard Jide Message Window)
    1· - Fixed: cursor HOME
    2· - Proposal: cursor set X,Y
    3· - Fixed: cursor left
    4· - Fixed: cursor right
    5· - Fixed: cursor up
    6· - Fixed: cursor down
    7· - Fixed: beep
    8· - Fixed: backspace
    9· - Fixed: tab
    10 - Fixed: newline (linefeed)
    11 - Proposal: reserved for terminal function
    12 - Proposal: reserved for terminal function
    13 - Fixed: carriage return
    14 - Proposal: reserved for terminal function
    15 - Proposal: reserved for terminal function
    16 - Fixed: clear screen (and sends cursor·home)
    17 - Proposal: open file
    18 - Proposal: close file
    19 - Proposal: read from file
    20 - Proposal: write to file
    21 - Proposal: seek (move to position in file)
    22 - Proposal: tell (get current position in file)
    23 - Proposal: flush (write file buffer to disk)
    24 - Proposal: open connection (virtual com port)
    25 - Proposal: close connection
    26 - Proposal: read from connection
    27 - Proposal: write to connection
    28 - Proposal: open terminal (display)
    29 - Proposal: close terminal
    30 - Proposal: read from terminal
    31 - Proposal: write to terminal

    The idea is that if the first character in the data array of CPU.message(char[noparse]/noparse data, int length)
    is a control character, the Javelin Ide Program dispatches any following bytes to the
    correct destination.
    For terminal, I could open multiple message windows, or use a simpler message window. Comment?
    For connection, there is a free nullmodem emulator, that creates pairs of virtual com ports.
    http://sourceforge.net/projects/com0com/
    We can use that to let any existing PC application that uses the comport, connect directly
    to the javelin. That emulator also provides internet connectivity and usb connectivity.
    The codes 19,20,26,27,30,31 and 0, when used as first character in data[noparse]/noparse, set access
    to the correct destination.
    Basically you control access to message windows, files and connections using
    CPU.message().

    Please comment on this proposal.

    regards peter
  • Don FrenchDon French Posts: 126
    edited 2007-06-10 02:41
    Peter,

    I don't suppose that there is any way in software to make the Javelin Demo board compatible with the USBto232 adapter, is there? It would be nice to be able to have more than one Javelin Demo board communicating with the IDE at a time and many people (like me) only have one available COM port. So a USBto232 adapter would be a nice solution. This would be especially helpful if you are working with two Javelins that communicate with one another, as I am doing via XBee radios.

    Ok, I just tried using a USBto232 adapter with a Javelin mounted in a Super Carrier board and it works! So, that is very helpful for me. I will use one carrier board and one Demo board. Now if the IDE would permit multiple Message windows, talking to different COM ports simultaneously, it would be perfect.

    I haven't had time to read and digest your proposal yet, but if it adds functionality without losing anything else, it is all good.


    -- Don
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-10 04:04
    Hi Don,

    What do you mean with "make Javelin Demo Board compatible with USBto232 adapter" ?
    The javelin ide program only communicates with a serial port, so if your USBto232
    adapter is correctly setup in windows and provides a serial port, you can connect
    the JIDE port (the programming port) of the Javelin Demo Board to that serial port.
    You just need to have a USBto232 adapter that works with the Javelin.
    The adapters sold by Parallax (with FTDI chipset) are guaranteed to work with
    the Javelin. Adapters with a Prolific chipset usually are ok too.

    regards peter
  • Don FrenchDon French Posts: 126
    edited 2007-06-10 04:45
    The USBto232 adapter does NOT work with the Demo board. The IDE never sees the Javelin when it is connected through the virtual COM port. Parallax support verified this when I couldn't get it to work and called them to find out what the problem was. They were even kind enough to send me a different board that is compatible with the USBto232 adapter. I don't know what the reason is but it doesn't work. If you have a USBto232 and it does work, let me know. Mine does not.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-10 05:03
    I have a USBto232 adapter with Prolific chipset and it does work with
    the Javelin Demo Board.
    Now, if you have setup two Javelins, that may be the problem.
    Try your USBto232 adapter with the Javelin Demo Board
    by connecting it to the port labeled JIDE (not the port labeled COM)
    and disconnect your Super Carrier Board from your PC.
    (make sure only 1 javelin is connected to your PC).
    Set the comport selection in the javelin ide program to AUTO
    and it should find the javelin (Project->Identify).

    regards peter
  • Don FrenchDon French Posts: 126
    edited 2007-06-10 05:13
    Erk! I have to eat my words. It sees both Javelins now I didn't even have to disconnect the carrier board. I can switch between them by choosing which one I want in Projects>Global Options>Debugger. I can't believe it! I wonder if I was trying to use the COM port instead of the JIDE port. I mean I know better but I just might have done that.

    Ok, so now how about providing the option of having one Messages window operative per connected Javelin?
  • aprunickiaprunicki Posts: 44
    edited 2007-06-10 05:20
    Peter,

    For your proposal, much of the new values seem to do with file I/O. What were your thoughts here? Do you have a use case in mind why the Javelin would want to do file I/O from the host?

    - Andrew
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-10 05:40
    Don,
    What I mean with multiple message windows,
    is to have the ability to output messages from a single javelin
    to different windows.
    I frequently have applications with 3 or 4 bidirectional serial devices
    connected to the javelin. I use the message window to display
    received and transmitted bytes (to log and check).
    With one message window, you can imagine the messages from those
    devices appear interleaved in the message window. Having multiple
    message windows,·I can redirect messages from devices to their
    own message window.

    What you are thinking of, is to let the Javelin Ide Program
    support multiple connected Javelins. That is not so easy to implement.
    I guess it can be done, but it will require to select the proper
    javelin after issueing commands Program. Debug and Debug resume.
    (perhaps a popup window after these commands).

    It might be easier to allow multiple instances·of the Javelin Ide·Program
    running. At present, the Javelin Ide Program prevents running multiple
    instances of itself. Possible problem here is the way settings are stored
    in the windows registry.

    regards peter



    Post Edited (Peter Verkaik) : 6/10/2007 6:59:39 AM GMT
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-10 05:50
    Andrew,
    It will be useful for applications where the javelin is (permanently) connected to a PC
    and you need to store information, for logging for example. It is a cheap
    solution as in that case you don't need to connect a serial storage device
    to the javelin. You can now of course log messages with the new message
    window but that really is only suitable for text messages.
    File I/O would allow for binary files, or logging without using the message window.

    regards peter
  • Don FrenchDon French Posts: 126
    edited 2007-06-10 05:54
    Multiple simultaneous instances of the IDE would be a good solution if you can do it.
  • aprunickiaprunicki Posts: 44
    edited 2007-06-10 05:55
    Peter,

    Thanks for the quick reply.

    If the goal is to allow multiple message windows, what would you think about having the javelin simply print to a virtual console, rather than having to support file I/O? You could then possibly re-use the existing codes depending on the context. As long as there is no interleaving of messages for different consoles, this would work. This would still allow the use of many of the codes for future use.

    - Andrew
  • aprunickiaprunicki Posts: 44
    edited 2007-06-10 05:57
    Peter,

    It looks as if I thought your prior post was in reply to my message. My apologies.

    - Andrew
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-10 06:06
    Andrew,
    That is exactly what codes 24-27 do. These allow access to a virtual comport.
    Another virtual comport is connected to that virtual comport (emulated null modem).
    An external application would use that other virtual comport, in that way
    it actually communicates with the javelin. You can send and receive any value
    between javelin and external program.

    I deliberately specified File I/O and message windows to use different codes
    to make dispatching in the Javelin Ide Program easier. It also means
    no additional program is required to use files and message windows.

    regards peter
  • aprunickiaprunicki Posts: 44
    edited 2007-06-10 06:16
    Peter,

    It seems to me that there are 3 proposals for enhancements;

    - File I/O: I can see some merit. Having the ability to write to a file could be convenient when connected to a host pc.
    - Port communication: it seems like the pc would be server as a router for messages from one serial port to another.
    - Terminal features: The most useful in my opinion

    Rather than having these specific features, what would you think about having a higher level communications mechanism, such as message passing? This would give a lot of flexibility for features no one has yet envisioned, and also would reserve many of those codes for future use.

    Regardless of implementation, for the Port communication, I would like to see it be more abstract, and not tied merely to com ports. The ability to communicate to a process via say a pipe, or even an ip address would be very useful. To this end, specifying a protocol would be great. For instance, for a serial port, you could specify serial://com1, for ip, you could specify tcp://111.111.111.1. The javelin would not know any of these protocols of course, but they would merely help the pc to route the messages.

    Your thoughts?

    - Andrew
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-10 06:28
    Andrew,
    The com0com emulated null modem that provides the virtual serial ports,
    also provides a COM port to TCP redirector.
    http://sourceforge.net/projects/com0com/
    Scroll down to latest news.
    Using virtual com ports only, we can keep the javelin code simple,
    both for Javelin program, as for the Javelin IDE.
    If you want to redirect to windows API or whatever, you can write
    a pc application that connects to a virtual com port to communicate
    with the javelin and·let that program deal with any other type of connection.

    Don,
    On second thought, multiple instances of the IDE is not good.
    I frequently doubleclick a .java file in windows explorer and I
    don't want a new IDE opened every time I do that.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-10 14:39
    Attached is a library class that shows how to use multiple message windows.
    You'll have to assume that the command codes specified are already implemented
    in the javelin ide program. Also note that an entire array sent by CPU.message()
    is treated as a single object. That is why the commands are sent in seperate calls
    to CPU.message(). Note that the first byte in that array might be
    a control code (Normal messages are text only plus Cr and LF).

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-06-10 18:49
    Andrew,
    I think you have a point that my proposals could be done using less codes.
    Consider this:

    0· - CMD: select (cmd 0·followed by handle, handle 0 switches to main message window)
    1· - Terminal: cursor HOME··· FileIO: rewind
    2· - Terminal: cursor set X,Y· FileIO: seek
    3· - Terminal: cursor left·······FileIO: tell
    4· - Terminal: cursor right·····FileIO: flush
    5· - Terminal: cursor up
    6· - Terminal: cursor down
    7· - Terminal: beep
    8· - Terminal: backspace
    9· - Terminal: tab
    10 - Terminal: newline (linefeed)
    11 - reserved
    12 - reserved
    13 - Terminal: carriage return
    14 - reserved
    15 - reserved
    16 - Terminal: clear screen (and sends cursor·home)
    17 - reserved
    18 - reserved
    19 - reserved
    20 - reserved
    21 - reserved
    22 - reserved
    23 - reserved
    24 - reserved
    25 - reserved
    26 - reserved
    27 - reserved
    28 - CMD: open (cmd 28 followed by type (0=terminal,1=file,2=connection),·returns handle)
    29 - CMD: close (cmd 29, closes currently accessed handle)
    30 - CMD: read (cmd 30, read from currently accessed handle)
    31 - CMD: write (cmd 31, write to currently accessed handle)

    If a device has been opened, the access sequence is:
    first send cmd 0 followed by the device handle.
    Then use read and write commands to exchange data. Finally access
    main message window again.

    Only 5 CMD codes. The others may have different meaning, based on the context. Comment?

    regards peter
Sign In or Register to comment.