-
Notifications
You must be signed in to change notification settings - Fork 4
Theia Extension
The Theia Extension provides a Widget to deploy and monitor code remotely on devices using the well-known Theia IDE Environment.
It compiles the code and sends a deployment request, including the binary data, for a specific device to the Deployment Server, which forwards the request to the responsible Device Connector and transfers the monitoring output back to the Theia Extension.
- NodeJS Version >= 12.20.1
- Yarn Version >= 1.22.18
- Arduino CLI >= 0.20.0 (last tested 0.21.1)
To have an easy installation and start of the CDT.cloud Services run the ./cdtcloud
script from the root directory.
You can either run Theia natively on your system or in a Docker container.
The Arduino CLI needs to be running on startup.
Start the daemon with arduino-cli daemon --port 50051 --daemonize
- Initialize the Arduino CLI by running
arduino-cli config init
- Update the core and library indexes with
arduino-cli update
- Install the base cores by entering
arduino-cli core install arduino:avr
- Install the dependencies using
yarn --cwd=cdtcloud
- Build Theia either for
- Browser
yarn --cwd=browser-app run theia build --mode=production
- Electron
yarn --cwd=electron-app run theia build --mode=production
- Browser
- Download the necessary plugins by running
yarn --cwd=cdtcloud theia download:plugins
- Run Theia in either in
- Browser using
yarn --cwd=browser-app start
and enter Theia by heading to localhost:3000 - Electron using
yarn --cwd=electron-app start
- Browser using
- Select View > Cdtcloud Widget to open the extension widget
- Run the
./cdtcloud
script from the root directory - Select
docker
to run the docker tools - Enter the command
start:theia:d
to start the service - You can use the
docker
section to attach and kill containers as well - Head to localhost:3000 to enter Theia
- Select View > Cdtcloud Widget to open the extension widget
- Head to Theia and choose File > Preferences > Open Settings
- Select the Extensions Tab
- Set the correct variables for the connection to the Deployment Server
More devices or cores can be supported by installing them through the Arduino CLI.
This needs to be done in the Device Connector as well.
It is possible that the code needs to be slightly adjusted to be able to select the correct output file.
A new core support can be installed within the Arduion CLI by running the following commands:
arduino-cli core update-index
arduino-cli core install base:core
arduino-cli config add board_manager.additional_urls https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
arduino-cli core update-index
arduino-cli core install STMicroelectronics:stm32