Javelin Stamp Ide BETA
Peter Verkaik
Posts: 3,956
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
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
Comments
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.
That date is because my PC clock is set back.
regards 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
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
The Edit->Find/Replace and the Debug Window does not show
correct values.
regards peter
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
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
· bug fix Status bar, now shows 4 fields: cursor x:y, file modified/readonly, insert/overwrite, simple messages (hints)
regards peter
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
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
· 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
Added a tab Editor to Project->Global Options.
Here you can set the font and colors used in the editor.
regards peter
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
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
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
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
Ok, so now how about providing the option of having one Messages window operative per connected Javelin?
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
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
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
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
It looks as if I thought your prior post was in reply to my message. My apologies.
- 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
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
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
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
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