-
Notifications
You must be signed in to change notification settings - Fork 7
Adding the DevX Library
Dave Glover edited this page Sep 4, 2021
·
1 revision
Adding the Azure Sphere DevX Library
This example assumes you are using git, otherwise download the Azure Sphere DevX library and add to the directory to your project.
git submodule add https://github.com/gloveboxes/AzureSphereDevX.git
add_subdirectory("AzureSphereDevX" out)
target_link_libraries (${PROJECT_NAME} applibs pthread gcc_s c azure_sphere_devx)
target_include_directories(${PROJECT_NAME} PUBLIC Azure-Sphere-DevX/include )
The following is an example of what the completed CMakeLists.txt file could look like.
cmake_minimum_required (VERSION 3.10)
project (AzureSphereAzureIoT C)
azsphere_configure_tools(TOOLS_REVISION "21.01")
azsphere_configure_api(TARGET_API_SET "8")
add_subdirectory("Azure-Sphere-DevX" out)
set(Source
"main.c"
)
source_group("Source" FILES ${Source})
set(ALL_FILES
${Source}
)
# Create executable
add_executable(${PROJECT_NAME} ${ALL_FILES})
target_compile_definitions(${PROJECT_NAME} PUBLIC AZURE_IOT_HUB_CONFIGURED)
target_link_libraries(${PROJECT_NAME} applibs pthread gcc_s c azure_sphere_devx )
target_include_directories(${PROJECT_NAME} PUBLIC Azure-Sphere-DevX/include . )
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-unknown-pragmas)
azsphere_target_add_image_package(${PROJECT_NAME})
AzureSphereDevX Examples Wiki
- Home
- Build Tools
- Adding the DevX library
- Azure IoT Hub Messaging
- Azure IoT Hub Device Twins
- Azure IoT Hub Direct Methods
- Avnet IoT Connect messaging
- Handling multithreaded async events
- Working with GPIO
- Working with UARTS
- Working with PWM
- Working with Event Timers
- Intercore Messaging
- Application termination
- Deferring updates
- Utility functions
- Tools and scripts
- Hardware Definitions