Skip to content

Commit

Permalink
Merge pull request #1408 from FelixTing/update-csdk-gettingstarted
Browse files Browse the repository at this point in the history
fix: Update C SDK GettingStarted page
  • Loading branch information
cloudxxx8 authored Dec 20, 2024
2 parents dca46ab + e54566d commit 988888d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ See the [Getting Started - C Developers](../../../../getting-started/Ch-GettingS

The next step is to download and build the EdgeX device service SDK for C.

1. First, clone the device-sdk-c from Github:
1. First, clone the device-sdk-c from GitHub:
``` bash
git clone -b v3.0.1 https://github.com/edgexfoundry/device-sdk-c.git
git clone -b {{edgexversion}} https://github.com/edgexfoundry/device-sdk-c.git
cd ./device-sdk-c
```

![image](EdgeX_GettingStartedSDKCloneC.png)

!!! Note
The clone command above has you pull v3.0.1 of the C SDK which is the version compatible with the Minnesota release.
The clone command above has you pull the {{ edgexversion if edgexversion != "main" else edgexversion+" branch" }} of the C SDK.

2. Then, build the device-sdk-c:
``` bash
Expand Down Expand Up @@ -55,11 +53,17 @@ compiled in an earlier step.

1. Tell the compiler where to find the C SDK files:
``` bash
export CSDK_DIR=../device-sdk-c/build/release/_CPack_Packages/Linux/TGZ/csdk-3.0.1
export CSDK_DIR=../device-sdk-c/build/release/_CPack_Packages/Linux/TGZ/csdk-0.0.0
```

!!! Note
The exact path to your compiled CSDK_DIR may differ depending on the tagged version number on the SDK. The version of the SDK can be found in the VERSION file located in the ./device-sdk-c/VERSION file. In the example above, the Minnesota release of 3.0.1 is used.
The exact path to your compiled CSDK_DIR may differ depending on the version number set in the SDK's `CMakeLists.txt` file.
By default, the version number is 0.0.0. If you require a specific version in the build output,
you can modify the `CSDK_DOT_VERSION` variable in the `CMakeLists.txt` file before building the SDK.
For example, update this line in `CMakeLists.txt`:
``` cmake
set (CSDK_DOT_VERSION "4.0.0")
```
2. Now build your device service executable:
Expand Down

0 comments on commit 988888d

Please sign in to comment.