-
Notifications
You must be signed in to change notification settings - Fork 0
How to setup the first SGX Project
This tutorial describes how to to setup a first SGX project with Eclipse.
We will start with an new C/C++
project.
We choose C++ Managed Build
in the following assistant for using make
in the building process.
At the next step we will choose Empty project
and use the Linux GCC
.
In the next section nothing needs to be changed. We will use Release
and Debug
.
After this we see the new project in eclipse. Rightclick on the project folder to open the context menu an click on Add Intel(R) SGX Nature
Now we can see a new Makefile
which contains the building information, generated by Intels SGX Plugin.
Next, we will add our enclave to the project.
In the following dialog, we have to enter a name for the enclave application.
After entering an enclave name, we can see the generated enclave file structure (trusted/untrusted parts). Eclipse will show you an error for an ecall function. This is caused by missing files, which will be generated by building the project. The project can be built by pressing the button with the hammer symbol in the upper left corner.
After running the build process we have to Rebuild C/C++ Index
.
In order to be able to run and debug the application, the corresponding runtime configurations must be set up.
First, a new Launch Configuration must be created.
Launch Mode: Run Launch Configuration Type: C/C++ Application
Click next and set the C/C++ Application to the sample application. Click on "Search Projekt" and select "Sample"
The settings under Main should now look as follows.
After that set the GDB debugger to Intel SGX.
GDB debugger: /opt/intel/sgxsdk/bin/sgx-gdb
Finally we've got an working enclave example application.
🛠️ How to install Intel SGX Driver on Ubuntu
🛠️ How to install Intel SGX SDK on Ubuntu
🎯 Validate that your Intel SGX Setup is working correctly
💻 How to setup the Eclipse IDE (with SGX Plugin)
⭐ How to setup the first SGX Project
📊 How to analyse an SGX Enclave? (Installation and Usage)
📁 Brief introduction: SQLite's Virtual File System