Skip to content

01 Intro to EdgeDevX

Dave Glover edited this page Feb 9, 2022 · 2 revisions

Introduction to EdgeDevX

EdgeDevX is API compatible with the Azure Sphere DevX APIs. This means with EdgeDevX and AzureSphereRemoteX you can build Azure Sphere DevX high-level applications on your desktop and port to Azure Sphere. The main advantage is rapid application development as well as source code compatibility.

The EdgeDevX supports the AzureSphereDevX Bindings as documented at AzureSphereDevX Library wiki

Video introduction to EdgeDevX

Note. The video refers to the DesktopDevX library. The DesktopDevX library has been renamed to EdgeDevX.

Introduction to EdgeDevX

EdgeDevX goal and limitations

The goal of the EdgeDevX project is to provide a rapid Azure Sphere prototyping experience.

  1. EdgeDevX is excellent at application interaction modelling, especially for cloud enabled devices.
  2. The development cycle is fast as you don't need to deploy your application to Azure Sphere to develop and test.
  3. The both the source code and application model are identical on the desktop and device when using AzureSphereDevX.
  4. When used in conjunction with the Azure Sphere RemoteX client library enables remote access to Azure Sphere Hardware.
  5. Application timing will be consistent for desktop and Azure Sphere versions as timing is driven by an event loop.
  6. Azure IoT Hub and IoT Central using Device Provisioning Service (DPS) or a connection string.
  7. Hardware definitions are supported.
  8. Azure Sphere mutable is supported.
  9. Did I mention the developer cycle is fast :)

There are some important considerations when using this project:

  1. The available memory resources on an Azure Sphere device is considerably less that your desktop computer.
  2. You need to think like an embedded developer especially when considering memory allocation.
  3. Only a subset of POSIX APIs are available on Azure Sphere. Check the Azure Sphere SDK Sysroots to understand what is available and code accordingly.
  4. Azure Sphere services such as deferred updates are not available for prototyping with this project
  5. No support for intercore apps.
  6. No IoT Plug and Play support (for now).
  7. No memory tracking usage (for now).

Adding EdgeDevX library to your project

You would normally git submodule the EdgeDevX project into your project.

git submodule add https://github.com/Azure-Sphere-DevX/EdgeDevX

Referencing EdgeDevX in your project

Open the CMakeLists.txt file and add the following:

################################################################################
# Following lines required for EdgeDevX
add_subdirectory("EdgeDevX" edge_devx)
target_link_libraries(${PROJECT_NAME} "edge_devx")
################################################################################

EdgeDevX flags

Enable RemoteX client library

The EdgeDevX repo submodules . If you wish to enable the RemoteX library that is included with EdgeDevX you need to add the folowing variable to your CMakeLists.txt file.

set(ENABLE_EDGE_DEVX_REMOTEX ON CACHE  BOOL "ENABLE EdgeDevX RemoteX peripheral support" FORCE )

Enable RemoteX client library flags

In the EdgeDevX examples repo, RemoteX is configured in the RemoteX.cmake file.

Azure Sphere IP Address

This is the address of the Azure Sphere running the AzureSphereRemoteX.Server.

add_compile_definitions(AZURE_SPHERE_REMOTEX_IP="192.168.10.117")

SPI peripheral performance mode

Enabling this flag will improve performance of SPI peripherals that don't require a response. For example a LED 8x8 Panel.

add_compile_definitions(AZURE_SPHERE_REMOTEX_PERFORMANCE_MODE)