- ctrlX AUTOMATION SDK build environment
- ctrlX AUTOMATION SDK version
ctrlX COREvirtual or ctrlX CORE
Visual Studio Code installed on your host computer
Find out the supported samples¶
- Hello World recommendation -> start with this example
- Hello PLC
- ctrlX Data Layer Easy Client
- ctrlX Data Layer Client
- ctrlX Data Layer Client Subscription
- ctrlX Data Layer RegisterNode
- Diagnostics Logbook
- ctrlX Data Layer Diagnosis
- Launch Visual Studio Code as your IDE
- If the IDE is started remote connect via Remote Explorer extension to your builder environment (SSH target)
- Ensure that Visual Studio Code extensions "C/C++ Extension Pack" and "CMake Tools" are installed in your SSH target.
- Open the folder of the desired cpp sample under
Build a Snap¶
See Samples Overview
Important: Before building an arm64 snap run script
Create an Executable for Debugging¶
Select the CMake symbol in the sidebar, click '...' at the top of the explorer window and select 'Clean Reconfigure All Projects'.
Then make these settings in the status bar (blue area) :
- CMake (Current build variant): Select 'Debug'
- Active kit: Select 'GCC ... x86...'
- Select 'x64...' as build target
Click Build and observe the progress in the output window - the build process should finish without errors (exit code 0).
Now the executable for debugging is available in the subdirectory: generated/ubuntu22-gcc-x64/Debug/
To start debugging select 'Run and Debug' in the side bar, select 'x64...' as launch configuration an press F5 (or green start button).
The executable will be started and the debugger will set automatically a breakpoint at the beginning of the main() function.
All automatically created files are located in subfolders
If there are unclear messages during the build process, it might help to delete the folders
generated and restart the build process.
If you've found an error in these sample, please file an issue
If you've any questions visit the ctrlX AUTOMATION Community