Remote Development
2 minute read
-
In the
Main MenuopenFile → SettingsunderBuild, Execution, Deploymentyou will find theToolchainsmenu. -
Add a new toolchain by pressing the
button and selectRemote Host.
-
In the
Credentials:press thebutton to enter theSSH Configurationsmenu. Add a new configuration by pressing thebutton and fill in the following data:- Host:
192.168.2.100 - Port:
22 - User name:
admin - Password:
vectioneer
- Host:
-
Press the
Test Connectionbutton to make sure your connection isOK. If not, re-check your controller connection. -
If the connection is good you can press
OKto close theSSH Configurationsmenu. -
Wait for
Cmakeand theC/C++ Compilerto be detected:- CMake:
Remote host CMake - Build Tool: Default,
Detected: make - C Compiler: Default,
Detected: cc - C++ Compiler: Default,
Detected: c++ - Debugger:
Remote Host GDB
Press the
Applybutton to save theToolchainsettings. - CMake:
-
Under
Build, Execution, Deploymentopen theCmakemenu, setToolChain, toRemote Hostwithdropdownfunction. Set other parameters to (default):- Build type:
Debug - Generator:
Use default Unix Makefiles - Cmake options:
-G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug - Build directory:
cmake-build-debug-remote-host - Build options:
-- -j 9
- Build type:
-
Press the
OKbutton to save theCMakesettings and close theSettingswindow. -
Wait for a couple of seconds while remote and local systems are synchronized.
-
Make sure that your controller is not running a Motorcortex application. Open the
TerminalinCLionand run the following command:
ssh admin@192.168.2.100 'echo vectioneer | sudo -S motorcortex stop'
-
In
CLionset yourRun/Debug ConfigurationtoDebug-Remote Host.
-
Press
playtobuildandrunthe application. -
To compile code with the latest modifications press
Rebuild Project.
-
Congratulations you are now ready to start remote developing your Motorcortex application.