Termina for Visual Studio Code
Support for the Termina programming language:
a language server, the tests of a project in the Testing view, and debugging of
the application and of the tests on the host and on the boards.
Features
- Syntax highlighting of
.fin files, and file icons.
- The language server of
termina lsp: diagnostics, go to definition, find
references, highlights, hover, and the symbols and outline of each module.
It restarts when termina.yaml changes.
- Termina: New Project, from the Command Palette or from the Explorer of an
empty window, creates an application or a library with
termina new and
opens it. It runs the termina of the machine or the one of the container
image, and starts Docker when it is stopped.
- The Testing view lists the tests of the project by platform, test and case.
A case, a test or a whole platform can be run or debugged. A failed check
shows its values and its position in the
.fin module.
- The debug type
termina. It builds the application or a test and debugs it
with the C/C++ extension: with LLDB or GDB on posix-gcc, and with
gdb-multiarch through the GDB server of the board otherwise. Breakpoints
go in the .fin modules.
Requirements
termina, installed on the machine or inside the container of the project
(.devcontainer/ of a project made with termina new --vscode).
- For debugging, the C/C++ extension.
The first debugging session offers to install it when it is missing.
- For the boards:
gdb-multiarch, and the GDB server of each board running
(GRMON on the Nexys A7, ST-LINK_gdbserver on the NUCLEO-L432KC, hw_server
and an XSDB server on the PYNQ-Z2, and OpenOCD connected to Spike, on port
3333, for the Spike simulator).
- Docker, to create projects with the container image.
Debugging
termina new --vscode writes this launch.json:
{
"version": "0.2.0",
"configurations": [
{ "name": "Debug", "type": "termina", "request": "launch" }
]
}
F5 builds the application and debugs it on the platform of app in
termina.yaml. Ctrl+F5 runs it, on posix-gcc only. A configuration may
instead debug a case of a test:
{
"name": "Debug counter",
"type": "termina",
"request": "launch",
"test": "counter",
"platform": "rtems5-leon3sf-nexysa7",
"case": "counter_test.overflow"
}
platform is needed when the test runs on more than one platform. Without
case every case of the test runs.
On the PYNQ-Z2 the XSDB server runs the script of xsdb-init in
termina.yaml before loading the binary.
Settings
The settings describe the machine, so they go in the user settings, or in the
settings of the container.
| Setting |
Default |
|
termina.path |
termina |
The termina executable, a name looked up in the PATH or a full path |
termina.osalDir |
TERMINA_OSAL_DIR, or /opt/termina/osal |
Folder of the OSAL |
termina.toolchains.rccDir |
TERMINA_RCC_DIR |
RCC, for the Nexys A7 |
termina.toolchains.rtems6Dir |
TERMINA_RTEMS6_DIR |
RTEMS 6 toolchain, for the PYNQ-Z2, Spike and the Arty A7 |
termina.toolchains.armNoneEabiDir |
TERMINA_ARM_NONE_EABI_DIR |
Arm toolchain, for the NUCLEO-L432KC |
termina.debug.gdbHost |
localhost, or host.docker.internal in a container |
Host of the GDB servers of the boards |
termina.debug.gdbPorts |
the port of each platform |
Port of the GDB server of the boards of a platform, one entry per platform |
termina.debug.xsdbPort |
0, the port of the platform (3122) |
Port of the XSDB server that prepares the PYNQ-Z2 |
termina.debug.gdbPath |
gdb-multiarch |
Debugger of the boards |
termina.newProject.runner |
auto |
container, native, or auto to use the one available |
termina.newProject.image |
ghcr.io/termina-lang/docker-termina:latest |
Image of the container runner |
Compatibility
| Extension |
Termina |
| 0.5.x |
0.8.x |
| 0.4.x |
0.7.x |
| 0.3.x |
0.6.x |
| 0.2.x |
0.4.x |
| 0.1.x |
0.3.x |
License
See LICENSE.
| |