Handmade Network»Forums»Work-in-Progress
Taylor Robbins
42 posts / 1 project
I love programming and the joy that comes from creating useful things. I'm the author of Const Port. I like to make toy games as a hobby.
[Approved] Const Port: A Serial COM Port GUI
Edited by Taylor Robbins on Reason: Added [Approved] Tag
Hey everyone,
I've just started on a project recently called Const Port. (Name is subject to change) The project has now been approved as a Handmade Network project. You can find it here: https://constport.handmade.network/

Icon:


Description:
Const Port is a custom designed application for reading and writing to serial COM ports. The current design is focused around providing a smooth and appealing way for firmware engineers to read serial output from embedded applications. The application is aimed at being simpler and more directed than alternatives like Putty and Tera Term while also being cleaner and easier to use. Everything is rendered in OpenGL giving a consistent feel across platforms as well as providing the ability to fully polish the interaction and design of the menus.

Currently Const Port is very early in development. The project should be runnable on any Windows 7+ (x64) based system but has only been tested on Windows 10. The platform layer is mostly in place but will heavily modified for robustness. The application itself supports only the minimum functionality at the moment. Much of the interaction is still done through keyboard shortcuts. Much of the configuration GUI has not been completed yet, which means it will not be suitable for most people as of now. You can, however, download a release of the application if you would like to test and experiment with it. Or you can download the source code if you'd like to compile it yourself.

You can download the initial release from http://www.siltutorials.com/blog/2017/6/18/const-port-v10
Or you can download the Source Code from BitBucket: https://bitbucket.org/stampede247/constport

Const Port is being developed by single person and largely for personal use. I do not guarantee it will work on all platforms. However, I would like to get it to a point of stability that it might be released as a fully Open Source and cross platform project that people can contribute to. If you are interested in helping with the project in it's early stages, send me an email at [email protected]. For further information about me and my projects you can visit my website: https://www.siltutorials.com/

Screenshot:


Versions:
1.0
  • View a list of available COM ports (obtained via attempts to connect to known COM port names)
  • Connect to a COM port at static settings (115200 baud, 8bits, No Parity, 1 Stop Bit)
  • Entire GUI is rendered in custom OpenGL code (GLFW and GLEW used for window and context creation)
  • Support for a large number of lines before we start to drop below 60 FPS
  • Text is rendered to Bitmap Font using STB TrueType (Temporary implementation version)
  • Text selection using custom outline shader
  • Timestamps saved for each line of text received (Recorded at receive of first character in the line)
  • Hover over a line and hold cntrl for "Time Ago" readout (Hold Shift for formatted date-time)
  • Copy selected text to clipboard (Ctrl+C)
  • Currently only supports ANSI characters but handles invalid ANSI characters gracefully
  • Type into the view port to send ANSI characters (No auto-echo at the moment)
  • Enter sends line feed character '\n'
  • Line numbers displayed on left (with hovering position in the status bar)
  • Ctrl+Shift+C to clear screen
  • Ctrl+A to select/deselect all
  • Ctrl+O to open COM port window which shows available COM ports. Click on one to connect to it
  • Carrot rendered at mouse hover position, along with hovering line is slightly different color
  • Home and End go to beginning and end of buffer
  • PageUp and PageDown to move a page of text (or click above or below scrollbar)
  • Auto follow end of buffer ONLY if you are scrolled to the bottom already
  • Should support 64 bit Windows 7-10 operating systems (Though currently testing has only been done on Windows 10)
  • Scroll wheel and arrow up/down to move view
  • Platform layer loads the application code from a DLL allowing run-time reloading of the application code
  • Platform layer is coded in a very "Handmade Hero Way" with minimal function calls in-between the two layers
  • Color of line can be determined by application by sending 0x01-0x04 invalid ANSI characters at the beginning of the line (These are not rendered on the screen and do not get copied to clipboard when selected)
  • Application icon is embedded in executable (Currently not loaded into the window information though)
Jeroen van Rijn
248 posts
A big ball of Wibbly-Wobbly, Timey-Wimey _stuff_
[Approved] Const Port: A Serial COM Port GUI
We were just discussing this project within the team, in fact. :)

I for one am very much in favour. It doesn't get much more handmade than tools that help in hardware development.

We'll let you know the results as soon as Chronal has weighed in. Thanks for submitting this project.
Taylor Robbins
42 posts / 1 project
I love programming and the joy that comes from creating useful things. I'm the author of Const Port. I like to make toy games as a hobby.
[Approved] Const Port: A Serial COM Port GUI
Oh shoot, I spelt the name wrong in the title of this thread....
Mārtiņš Možeiko
2559 posts / 2 projects
[Approved] Const Port: A Serial COM Port GUI
Edited by Mārtiņš Možeiko on
It's a nice project. I don't want to sound very negative, but wanting/having GUI for text-only output sounds strange to me.
If I have text only data I want to see it in my text terminal, not in GUI. I have my text terminal configured to have UI look/fonts/clipboard and keyboard shortcuts I want it to have. Now I need to customize GUI app to have same look&feel? Why? That's waste of my time. I feel majority of power users would feel the same way. So this having-GUI-app feature would not sell well :)

Maybe this is Windows vs Linux/OSX/BSD... issue, because Windows doesn't have good COM terminal. But on Linux'like OS'es this is totally not an issue. Having extra OpenGL window to render text-only data is just strange. Sure, currently I need to use putty or similar GUI app on Windows, but I would really like console-like app on Windows so when I run it under ConEmu I get everything as usual - shortcuts, UI look, etc.. ConEmu is best Windows terminal replacement there is, which even handles ANSI/xterm escape codes.
Taylor Robbins
42 posts / 1 project
I love programming and the joy that comes from creating useful things. I'm the author of Const Port. I like to make toy games as a hobby.
[Approved] Const Port: A Serial COM Port GUI
Thanks for the input!

I totally get what your saying, and I agree to some extent. I think the difference of opinion here comes from a difference of design goals. The main purpose of this project is for my own benefit. I spend a lot of time reading output from my program and I would appreciate a program that helps me decipher it as quick as possible.

With that being said I take a look at how much time I spend reading the text and I look at the amount of time I actually spend editing, copying, or working with the text in normal ways and it's probably about a 10:1 ratio. The main things I do, IF I ever touch the text with my mouse/keyboard, are clear the screen, select text, copy/paste from clipboard, and type in test commands. Those are all simple tasks. Sure, there's still room for error or missing ability in even those simple things but I think with enough love and effort we can support most of the features people tend to use with these sorts of operations.

Now on the other hand if I look at the number of features I would love the application to have that would be HARD to do with a traditional text editing field, there's probably about 15-20 items that I can think of off the top of my head. I think there is a lot of improvement space to be explored with things like application defined coloring and formatting for lines, application defined line breaks/marks, tagging of lines with user information/marks, timing indications/helpers that are automatically generated, rendering/handling of invalid characters, indicators for flow control, rendering parts of the output next to each other, scrollbar interaction when the buffer is constantly increasing in size, etc. There's a lot of things that I would love to have in my terminal application that really aren't anything like something you would find in a regular text editing field. And the main reason is because handling console output from a running program is NOT like handling static text in a file. They may seem like they are in a similar problem space but in my opinion there are only a few features that overlap.

So all-in-all I still like the way I am heading with this project being custom rendered in OpenGL. And the worst that could happen is nobody else uses it and now I have a simple program for myself that saves me time and makes me happy. And that's all I could really ask for. But maybe that's not the case. And maybe there is a class of people that actually want an application that does those things I mentioned. In that case I've done a lot of work to make some people's lives better and that makes me even happier.

So that's kinda my thoughts on that. Let me know if there's any major features that I'm missing that I haven't thought of. So far those text editing features seem pretty doable to me. Plus you can't do things like this in a Windows Forms Text Field:

http://imgur.com/a/r1VTS
6 posts
None
[Approved] Const Port: A Serial COM Port GUI
Cool. I use real-term currently and will try this out next time I get a chance. You may also want to check out this project "portlist" on github (https://github.com/tonynaggs/portlist) which is a program that can tell you which COM ports are available just like in windows Device Manager.
Shazan Shums
159 posts
Some day I will make quality software. Programming FTW.
[Approved] Const Port: A Serial COM Port GUI
ConstPort.exe is not working on my PC Windows 10.

Does it use any specific opengl version? My pc only supports upto 3.1.
Taylor Robbins
42 posts / 1 project
I love programming and the joy that comes from creating useful things. I'm the author of Const Port. I like to make toy games as a hobby.
[Approved] Const Port: A Serial COM Port GUI
Edited by Taylor Robbins on
Yeah currently I believe the version requested and version specified in the shaders is 4.0. However this isn't for any particular reason. I will look into what version I actually want to target in the next version and see how far I can lower it. I believe it should be fairly easy to support down to 3.0 and maybe further.

If you'd like to compile it yourself you can download the source and change the version requested in win32_main.cpp and the version of the shaders and see if it runs.
Jeroen van Rijn
248 posts
A big ball of Wibbly-Wobbly, Timey-Wimey _stuff_
[Approved] Const Port: A Serial COM Port GUI
This project is now live at https://constport.handmade.network/

Welcome, Taylor!
Taylor Robbins
42 posts / 1 project
I love programming and the joy that comes from creating useful things. I'm the author of Const Port. I like to make toy games as a hobby.
[Approved] Const Port: A Serial COM Port GUI
Awesome! Thanks for hosting my project! Maybe someone in the Handmade Community will find it helpful!

I've got some cool features coming up in the next version. I'd like to get a rudimentary configuration window up and running so you can change the baud rate and stuff. I'm also gonna start experimenting with different sorts of line markings.

Quick question, I've noticed that other projects will have forum threads listed on their page that relate to the project. Is there something I have to set on the thread to make this one show up?
Taylor Robbins
42 posts / 1 project
I love programming and the joy that comes from creating useful things. I'm the author of Const Port. I like to make toy games as a hobby.
[Approved] Const Port: A Serial COM Port GUI
Const Port version 1.2 is now finished! I added a 1.1 version to the bitbucket repository but there was only a few random features added so I didn't go through a full release announcement process.

Version 1.2 is mainly focused around adding the ability to configure the UART settings (Baud Rate, Parity, etc.) through the COM menu. There's also a lot of other smaller features and fixes added on the side.

There is also now an official release thread on the project's forums. You can find a full changelog and the latest release there: https://constport.handmade.networ...ms/t/2450-offiicial_update_thread