Managing SDKs
A Solution Development Kit (SDK) contains all of the important toolchains and libraries required for creating a C++ program.
Compatibility:
SDKs are specific not only to devices but also to firmware releases and to the operating system on the computer you're using for programming. So downloading, installing and uninstalling SDKs might be a frequent task when programming.
SDKs are specific not only to devices but also to firmware releases and to the operating system on the computer you're using for programming. So downloading, installing and uninstalling SDKs might be a frequent task when programming.
SDKs can be managed by means of
- the PLCnext CLI out of the iCube Engineer Toolchain
- the Visual Studio® extension
- the Eclipse® add-in
Managing SDKs by means of the PLCnext CLI
Obtaining an SDK
- Unpack the downloaded.zip file of an SDK.
- Install the SDK on the console use the following command: plcncli.exe install sdk –d [Installation path] –p [Path to archive file]
- The -d option sets the installation path which needs to be empty or non-existent.
- The -p option sets the path to the SDK archive file. OnWindows®, a .tar.xz file is expected; on Linux® an .sh file is expected.
Introducing an SDK
Using the PLCnext CLI& for SDK installation automatically makes the installation known to the PLCnext CLI.
-
To introduce already unpacked SDKs to the CLI, enter the following command: plcncli.exe set setting SdkPaths –a [Path to SDK]
- To receive a list of all available settings and the set values, enter the following command: plcncli.exe get setting –a
Getting a list of installed SDKs
-
Use the following command to get information about all installed SDKs: plcncli get targets
- Use the following command to get all information about installed SDKs including the path to each SDK: plcncli get sdks
Adding or removing a project target
-
Use the following command to add or remove a project target: plcncli set target
-
Add the following mandatory options to the command:
-
-n → name of a target
-
-a → add a targetor
-
-r → remove a target
-
-
Add the following option to the command to specify the version to add/remove (if the target name is not exclusive): -v → version of target
-
Add the following option to the command to set the project path (if the current directory is the targeted project, this is optional): -p → project path for installation
Getting a list of all SDKs set for a project
-
Use the following command to get all project information including the project targets: plcncli get project-information
- The following command returns all information regarding the SDKs set for a project: plcncli get project-sdks
Uninstalling an SDK
-
To uninstall an SDK, enter the following command: plcncli.exe set setting SdkPaths –r [Path to SDK]↪ The uninstalled SDK is removed from thePLCnext CLI, but will be retained in the folder system.
Managing SDKs by means of Visual Studio®
-
To open the SDK management from the iCibe Engineer Toolchain tools, go to Tools → Options.
-
Search for iCube Engineer and open the SDKs submenu.↪ You get a list of paths of all installed SDKs.
Tip: To easily identify an SDK it is recommended organizing the SDKs for different devices and firmware releases in a set of nested directories liketarget name/firmware release on your computer.
Installing an SDK from an archive file
The
Options
dialog box provides two different buttons:
-
Add... is used for adding an SDK again to theVisual Studio® IDE that has previously been installed and is unpacked already.
-
Install... is used directly with the& downloaded archive file.
Installing an SDK from an archive file
-
To install an SDK, press Install...
-
Browse... to the folder containing the archive file.
-
Browse... to the destination path for the installation.
-
If you want to clear the original folder content so it's empty before installation, check☑ Force installation into this destination.
-
Click OK to apply the changes.↪ The newly added SDK will appear in blue letters in the Options dialog box.
Removing an SDK
-
To remove an installed SDK, select the dedicated SDK from the list and click Remove.
↪ The entry in the list will appear in gray letters.
-
Click OK to apply the change or click Cancel to revert all changes.↪ A pop-up dialog asks you for confirmation.
☑ Delete SDK directory from disk removes the unpacked data if you won't need that SDK any more.
Adding, changing or removing a project target
-
To change the project targets, right click on your project in the Solution Explorer and select iCube Engineer → Set Targets.
-
↪ The Edit Project Targets dialog pops up.
-
TheAvailable Targetslist on the left window side shows all installed SDKs.
-
TheSelected Targetslist on the right window side shows all targets added to the project.
-
-
Add new targets by selecting an available target on the left and move it to the right via Add >>.
-
Remove targets by selecting an entry on the right and move it to the left side via << Remove.
-
Save and Close applies the setting.
-
↪ The targets with ared-letterentry do not have an SDK installed on your computer any more, e.g.:
Managing SDKs by means of Eclipse®
-
In Eclipse®, go to
Window → Preferences, search for iCube Engineer and open the
SDKs
submenu.
↪ In the Preferences dialog box, a list of paths to all installed SDKs is displayed.
Adding an SDK
The
Preferences
dialog box provides two different buttons:
- Add... is used for adding an SDK again to the Eclipse® IDE that has previously been installed and is unpacked already.
- Install... is used directly with the downloaded archive file.
Installing an SDK from an archive file
- To install an SDK, press
Install...
.
- Browse... to the folder containing the archive file.
-
Browse...
to the destination path for the installation.
Note: ☑ Forcing the installation into a destination clears the original folder content to be empty before installation. - Click
OK
to apply the changes.
↪ The newly added SDK will appear in blue letters in the Preferences dialog box.
Removing an SDK
- To remove an installed SDK, select the dedicated SDK from the list and click
Remove.
↪ The entry in the list will appear in gray letters. - Click
OK
to apply the change or click
Cancel
to revert all changes.
↪ A popup will ask you for confirmation. - If you won't need that SDK any more, check the ☑ Delete SDK directory from disk to remove the unpacked data.
Adding, changing, or removing a project target
- To change the project targets, go to Project → Properties, search for iCube Engineer Targets.
- The Available Targets list on the left window side shows all installed SDKs.
- The Selected Targets list on the right window side shows all targets added to the project.
- Add new targets by selecting an available target on the left and move it to the right via Add.
- Remove targets by selecting an entry on the right and move it to the left side via Remove.
-
Apply and Close
applies the setting and
Cancel
reverts all changes.
↪ The targets with a red-letter entry do not have an SDK installed on your computer any more, e.g.: