Const Port v1.6

Another version of Const Port is ready. And with this version comes the first release of the OSX version of Const Port. I've done a decent amount of work trying to get the OSX version to run inside an application bundle so hopefully it will be easy to install. That being said I know there are still a lot of things to learn about distributing on OSX. I am largely a windows user I must admit so if anybody has any suggestions I'm open to all critique.

I'm going to try and keep the explanation short here since I don't have a whole ton of time today. There are a couple of major features I'd like to point out in this version. The first is the new and improved Com Menu:


The menu layout has been redesigned to be more friendly to tall windows and a large number of available ports. It handles really small window resolutions quite nicely and it now opens on startup automatically.

Another nice feature that's been added is the input text box. Instead of echoing the characters directly to the port you can now type into an editable text box near the bottom of the screen. This allows for much nicer editing features and relieves the application of the burden of echoing characters and handling backspaces. It also allows us to record previously input lines and allow you to easily recall them using up/down arrows.

There's a lot of other small features and improvements and some major reworkings of some of the core platform functionalities as well. These have both fixed a lot of bugs and added a decent amount more. There's still a long list of things that I'd like to get fixed but I think in the interest of time I'd like to release it as it is. If you run into any bugs feel free to report them on the github, Handmade Network, or as a comment on this post and I will be sure to get them on the list if they aren't already.

Alright enough talk, here's the download links:


  • Redesigned the Com Menu to handle various resolutions and long lists of available ports better
  • Support for opening COM25-COM256
  • Ctrl+W now closes the currently open port
  • Escape key closes com menu and popup messages
  • Added an input text box to allow better editing features and recall functionality. (Can be disabled in the configuration settings)
  • Added support for regular expression triggers that evaluate after every character received
  • Added a small running indicator to the bottom left side of the screen
  • Added support for pasting from clipboard
  • Added support for replacing the matched line with a format string that contains the captured groups in the regular expression
  • Fixed a problem where we wouldn't render/respond to operating system events when receiving large amounts of data
  • Added better indications for the window not being active
  • You can now send binary data to the port by typing in the hexadecimal representation and hitting ctrl+enter (or hold ctrl while pressing the send button)
  • Added support for line-wrapping
  • Added support for a few for trigger effects (save, new_line, and clear_screen)
  • Added better support for keys being held down (repeated key events)
  • Added a few temporary check boxes in the overhead menu to toggle various options

Const Port v1.5

Finally I've gotten around to polishing off some new features in Const Port and making a version that can be released. There's a few major features added in this version and a lot of smaller things changed to the existing tool set, so let's get started explaining them.

The main feature I'd like to point out is the ability to run python scripts that interpret the input from the COM port and output data for Const Port to show. There are now a list of configuration options to set exactly how this works and what python script should be run. Then in Const Port if you hit ctrl+P it will attempt to start an instance of python and attach itself to the stdin and stdout so it can send and receive data from it. This means anything printed out by python will show up in the Const Port output window, and if you have the configuration set up correctly, any data received from the COM port will be piped to the python program for processing. There's still a bit of weirdness with how the stdio works in python so you'll have to do sys.stdout.flush() for any output to be pushed to the screen before the script has ended. For now there is an example python script called that will take the com port data and output the hex values of the characters (spaces and new lines preserved).


Another major feature that has been added is the ability to define and customize your regular expression triggers to a far greater degree. You can now define as many regular expressions as you want each with it's own list of effects that should be applied should it match the line. This allows you to set more complicated formatting and line coloring than ever before. A list of possible effects can be found in the commented example expression. "new_line" and "clear_screen" have not been implemented yet but the rest of the effects work and more will be added as the project progresses.

We've also done a bit of an upgrade on the com menu to support disconnecting from the current port and configuration options for renaming the ports with any alias you want. As you can see in the screenshot above I have named my FTDI cable coming from my controller "PIC32MZ", and the other two ports that show up are for other devices on my system that I don't use so I've named them "System1" and "System2".

Another helpful feature that's been added to the platform layer is the ability to launch the default program to edit a specific file. This allows us to make better use of the gear button on the main menu to open up the GlobalConfig.json file for you to edit quickly and easily. Many of the options in the JSON file will have UI counterparts later so you won't have to leave Const Port in order to change the settings. However, for now this is a good option to make finding and opening the file easier. NOTE: If you're having trouble with it opening the file make sure you have a default program for the .json file type.

The last major thing I'd like to mention briefly is the vastly improved support for different themes. We've added a ton of new configuration color options so almost every piece of the UI color scheme can be set separately. Along with this we've made a mock "Neon" color scheme to show the potential:


So with all of those things out of the way, let's get that download link.

And, as before, there is also a debug version that will open the console window so you can see the debug output of the program if something is going wrong.

As a final note, one of the reasons this version has taken so long to release is a lot of the time has been spent on a OSX platform layer. I was planning on getting the layer usable before this release but we are still having some trouble with making the application bundle work and various configuration options like that so I've decided to release the changes as they stand now and wait till the next version before releasing the OSX variant. That being said, you can go download the source code and compile a fairly usable version for OSX if you would like. The majority of the progam's functionalities are working so it could be a very useful tool. You can download the source code below.


  • Added support for running a python instance with stdin and stdout routed to through Const Port so you can make scripts that interpret the output of the COM port or perform other tasks when certain things happen.
  • Changed the way regular expression triggers are defined the configuration options to allow support for any number of triggers each with it's own list of effects that will be applied when they match the line
  • Made the settings button open the configuration file for editing with the default program chosen by the operating system.
  • Added an info window with a short description of the program that can be accessed by pressing the information button
  • Removed the arrow button from the main menu
  • Added options to switch the RX and TX LEDs between square and circular modes
  • Added more options for how the RX and TX LEDs are sized
  • Added a temporary implementation of routing the recieved text to a file without showing it on the screen. This can be started and stopped with the Ctrl+F shortcut. The file will be named after the COM port and saved in the current working directory.
  • Added an option to make the application automatically open the saved file for editing when "Save to File" button is pressed
  • Fixed some of the formatting problems with different font sizes so the buttons and windows should work a bit better with smaller or larger font sizes
  • Added the ability to choose a separate font size for the main text versus the UI text elements
  • Made the application regenerate the fonts when the configuration file is reloaded with Ctrl+R
  • Added the ability to disconnect from the current port without connecting to another one.
  • Added configuration options to allow renaming of ports with a user defined alias
  • Added better support for different naming conventions of the platform layer for available ports
  • Made the COM menu tabs more dynamic in how they choose to format their text to allow for longer names and various font sizes
  • Added a lot of new color options to allow the user to change the UI theme to much greater accuracy
  • Added an example "Neon" color scheme
  • Made the rendering of the main menu button circles dynamic to allow for greater customization
  • Made the rendering of the exit button on the menus dynamic instead of using a predefined image
  • Changed the way the main menu's height is chosen to support a greater variety of options for the RX and TX LEDs and font sizes
  • Changed the naming convention of the configuration options to be all lower case and underscores between words
  • Added a file cursor that will always show at the end of the file. Disabled the hover cursor and hover line options by default
  • Added an option to turn on auto-echo of input text  to free up the embedded application the responsibility of echoing the user's input

Const Port v1.4

Lately things have gotten really busy with the Eclipse and family visiting so it's taken me a little while to get this version ready to go.

I've added a couple new big features that I hope people are going to like. The first and foremost feature is configuration files. I've set up a nice system to allow you to change many of the features of Const Port through configuration files found in the Resources/Configuration folder.

There are 3 files currently. GlobalConfig.json, PlatformConfig.json, and RegularExpressions.rgx. All three can be opened and edited by a text editor of your choice. The .json files are parsed using the JSMN (pronounced "Jasmine") library which can be found here. The .rgx file is parsed using a simple custom syntax parser. There's a brief explanation of the file format in the file itself but overall it's a really straightforward way of allowing you to input regular expressions without having to escape them in JSON strings.

There's a large variety of things you can change about the application and I'm adding more options all the time. I would like to make as many things modifiable as possible. Later on I might decide to scale back and get rid of some of the unneeded options or put them in a separate file so they don't confuse people. However, for now I'm just going to keep throwing out new options and see what sticks. So if you have any options you'd like to see added just let me know.

Be warned: One side effect of having so many options is that I haven't tested all the options. I'm sure it's easy to crash the application by putting large numbers or weird combinations of options. Once we have a more solid list of options I will start bounds checking the inputs and confirming that the options are valid. For now however, just be nice with your inputs and you should be fine.

With the addition of options it's now entirely possible to change the color scheme of Const Port to whatever you like. The UI is rendered using a combination of various grays, blacks, and whites. However you can change these to whatever colors you like using a variety of JSON color formats.

The second major addition that was made was regular expression support. (Hence the RegularExpressions.rgx file) I've decided to try and use the C++ library Boost.Regex to allow me to add support for various features that will use regular expressions in the future. The main features right now are hard coded as configuration options in the GlobalConfig.json file. Each of these regular expressions is checked against each line that comes in (after we receive the new line character(s)) and if a match is found we produce some change. These have replaced the hard-coded line coloring methods and opened the line colors up for use with whatever input you'd like to color. You can only define 1 regular expression per color right now and they have to be the Highligh1-Highlight5 colors but this will change in the future to allow you to completely customize the look and feel of your input.

There's a few more features but I think I've gone on long enough. Here's your download link:

The debug version is the same as the regular but with the Console Window enabled so you can see all the debug output of the application. This is useful for debug purposes, especially if the application isn't running on your platform or crashes unexpectadly.

As always the source code can be downloaded from BitBucket:


This one is just Sublime Text but it's an example of the GlobalConfig.json file

This one is just Sublime Text but it's an example of the GlobalConfig.json file


  • Added JSON configuration files in the Resources/Configuration folder that contain a variety of configuration options for Const Port. Edit these at any time and then use the Ctrl+R keybinding to reload the configuration
  • Added a RegularExpressions.rgx file in the Resources/Configuration folder. This file uses a custom syntax and is used in conjunction with the configuration files to allow you to easily define regular expressions without having to escape them in JSON strings.
  • Replaced the hard-coded line coloring to be defined by the user using Regular Expressions
  • Added an option for a regular expression that increments a generic counter. Use this to have Const Port count occurrences of some line for you
  • Added an option for a regular expression that automatically adds a line break
  • Fixed a bug where we weren't able to open COM ports above COM9
  • Did some work to try and get Const Port  to run on Windows 7. Still need to do more work on this but I've made some improvements on the required OpenGL version

Const Port v1.3

It's time for another release of Const Port! Version 1.3 adds some cool new features and fixes a host of small bugs. As before you can download the compiled x64 Windows version:

or download the source code from the BitBucket Repository and compile it yourself:



  • The way the buffer is sized and worked with has been completely revamped to allow dynamically sized lines. This allows us to do a lot of cool things. The first of which is Time Elapsed Banners
  • Added Time Elapsed Banners which will automatically show up after 15s or more have passed between lines. The minimum time is configurable in the code but cannot be configured after build in this version. Configuration options are coming soon.
  • Horizontal scrolling has been added. You can use the arrow keys left and right or Shift+Scroll Wheel. There is no horizontal scrollbar in this version
  • Added a Clear button in the upper right hand corner that does the same thing as Ctrl+Shift+C
  • Added an End of Buffer button below the scrollbar
  • Status messages in the bottom bar can now be delivered from anywhere in the program
  • Tx and Rx indicators have been added in the upper right corner allowing you to easily see when data is sent or received
  • Save to File button now appears when text is selected. Currently the output file is fixed in the program's directory with a timestamp appended on the end. Ctrl+S does the same thing as pressing the button
  • Line marks are displayed slightly different. Thick line marks make the line spacing between lines a little larger to make the break a little more clear
  • Escape key now closes the COM menu. Enter key hits the Connect button.
  • Added support for COM13-COM24.
  • Added a single frame flip right after the window is created to allow for a blank window to show even if the application DLL isn't loaded or rendered correctly. Also allows for the window to show sooner
  • Fixed a problem with empty lines being left with a timestamp of 0