How to static and cross compile the C-based Azure Tutorial with an IoT client?

AZ ADM Steffens, Martin 0 Reputation points
2024-06-06T09:17:59.01+00:00

I successfully did this Tutorial with an C-based IoT-client:

https://learn.microsoft.com/de-de/azure/iot-central/core/tutorial-connect-device?pivots=programming-language-ansi-c on a Ubuntu based virtual machine

Now I would like to excecute this sample on a ARM architekture, which means I would have to do a static cross compiling because I want to copy the executable on an embedded system.

Unfurtunatey there is no information in the tutorial include how you can do a cross compiling with cmake. Has anybody information how you can do this?

Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
364 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. José Simões 0 Reputation points MVP
    2024-06-06T21:28:44.5066667+00:00

    For that you have to do some adjustments on the CMake, plus you have to pull in libraries to provide (at least) TLS and network stack. Not very straightforward...

    If you are onto embedded systems and .NET may I suggest that you take a look at .NET nanoFramework ? Ready to flash images for several MCUs (from STM32 to ESP32, NXP, TI, Silabs, etc). And NuGet packages with Azure SDK.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.