
Developed by Saleconix: edge AI and embedded systems · saleconix.be
HMC-20 Layout Studio
Firmware version
The Firmware choice at the top sets the firmware the simulation and the validation follow; the newest is chosen by default and your choice is remembered. 1.2.1+1 answers property reads on the command interface (page.widget.txt without = gives 0x03 and the value); 1.2.1+0 ignores such a line. When the Device console is connected to a board that reports another version, the console and the activity list say so and the choice is marked.
Edit and Run
Edit: click a widget to change its properties in the Inspector, drag it to move it (arrow keys nudge 1 px or one grid step, Shift = 10×). Add, duplicate, delete widgets and change their layer; drag the yellow handles of the selected widget to resize it, or with Touch areas on the cyan dashed outline to change its touch area (Alt+drag grows it from the box edge); double-click a button or text to type its text in place (Enter adds a line, Ctrl+Enter or a click elsewhere confirms, Escape cancels); click an empty spot of the panel (or "Page properties") to edit the page itself: background, colour, image. Right-click a widget for rotate, mirror, duplicate, delete and layers; while dragging, Space turns it 90° (Shift+Space the other way), X or F mirrors left-right and Y top-bottom, as in Altium. Firmware 1.2.1 cannot rotate text or images, so rotating is only offered for shapes, LEDs and bars. Undo/Redo with Ctrl+Z / Ctrl+Y.
Run: the simulation runs. Press, release and drag (or the mouse wheel) fire the widget events like the firmware interpreter; timers, PIN codes, functions, backlight and flip work. Editing is blocked; back in Edit the panel shows the layout as designed. Restart reboots the application from its first page.
Activity
The Activity tab lists what happened, newest at the bottom: edits, files read and written, touches in Run and the interpreter commands they ran. Copy output copies the tab as text, for example to paste it into an AI chat.
Events composer
"Compose…" next to an event builds the interpreter commands step by step, including nested events with their quoting. Test shows the result on the panel; Cancel puts everything back, Apply writes the commands into the layout.
Python scripts and serial links
Studio: double-click tools\HMC20-Studio.bat (or python -m hmc20.studio F:\). It opens this page with the SD-card folder loaded; pick a script, enter its arguments and press Run script. Its serial port is connected to the simulated panel and its output appears under Script console; type input for it on the input line.
Without the studio: start the script with python -m hmc20.simrun your_script.py, open this page as a local file and press "Connect Python script". "Connect serial port" links a real application board through a USB-serial adapter (Chrome or Edge).
Saving
In the studio, Save layout writes <app>/<app>.json into the SD-card folder (the previous file is kept as .bak; Store from SD copies only .json, .bmp and .jpg files, so back-ups can stay in the folder); Images you copy into an app folder with Explorer are picked up as soon as you come back to this window, and so are layouts changed in another editor (unless they have unsaved changes here). "New application…" creates a folder with its layout file, empty or as a copy of the current application. With a folder opened in Chrome or Edge the same happens in that folder; otherwise the layout is downloaded, or copied from the JSON tab.
Device console
Connect a real HMC-20 with its USB-C cable and press Connect device (Chrome or Edge; the virtual port works at any speed). You see the board's user console as in a terminal; type a menu option or an answer and press Enter (Line end chooses CR or LF: the board ends an input at either, so CR+LF would count twice; Echo shows what you typed because the board does not echo it). The buttons send the menu options of firmware 1.2.1; when the board asks something (which application, the clock, the value) the question opens in a window with buttons to pick or a line to type. Cancel does what the board allows: N for a Y/N question, an empty answer for a number question (the board then says "Not a valid number" and, in firmware 1.2.1 (+0 and +1), leaves touch stopped until another action succeeds or it reboots); Set clock cannot be cancelled on the board. Options that change or erase things ask first here and then answer the board's own "Sure? Y/N" with Y. The flash use the board reports also appears in the Memory tab. Dump layout (option 1) catches the JSON the board prints; Open dump turns it into an application here, so you can compare it with your design. Reconnect opens the port again when the cable is plugged back in.
Touch sound
In Run, the beeps follow the firmware (the same in 1.2.1+0 and 1.2.1+1): pressing a widget that has an e_press event gives 4 kHz for 100 ms; a swipe gives 1 kHz for 10 ms (also without a move event). Pressing a widget without e_press is silent, and a widget with sound = false never beeps (the default is true). The topmost active widget takes the touch even when it has no event; widgets with visible = false let it through. Inside a layer the firmware draws (and checks touches) in name order, not in the order of the JSON. Switch the sound off with Touch sound under Device.
JSON tab
The layout as text, formatted like the file on the SD card. Edit it directly (Tab indents); every valid version is shown on the panel straight away, a syntax error shows its line (the panel keeps the last valid version). Verify checks the layout rules. Save (Ctrl+Enter) asks first, then makes it the layout (one Undo step) and writes the file; Cancel keeps your edits. Reload throws the edits away (asks first). Copy puts the JSON on the clipboard. Names are chosen automatically (they address widgets and pages in events and scripts) and can only be changed here.
What the preview is based on
Release notes