All Products
Document Center

IoT Platform:Prepare a development environment

Last Updated:May 10, 2023

This topic describes how to prepare a development environment when you integrate Link SDK for C with a device.

Hardware environment

Link SDK for C of Alibaba Cloud supports various operating systems and hardware devices. To integrate or port the SDK, make sure that your device meets the following requirements:

  • The device supports the TCP/IP protocol stack or supports the protocol stack by integrating external modules.

  • The device has at least 20 KB of ROM and 2 KB of RAM.

  • No limit is set on the operating system of the device.

    The sample code file in Link SDK for C is developed based on the Linux operating system. You can run the code on Linux.

  • For more information, see Port Link SDK for C.

Development environment

You can port Link SDK for C across platforms. Take note of the following requirements when you prepare the development environment:

  • Development language: C programming language of the C99 standard.

  • Development tool: a tool that supports compilation of the C programming language.

  • Compilation method: Makefile-based compilation.

Compilation and running

In the Linux and macOS operating systems, you can compile and run the sample code in Link SDK for C after you configure the SDK. To compile and run the sample code, go to the root directory of the SDK and perform the following steps:

  1. Run the make command to compile the SDK.

  2. The executable sample code file is generated in the ./output/ directory.

    To establish a Message Queuing Telemetry Transport (MQTT) connection, you can run the ./output/mqtt-basic-demo command to run the executable file.


If the operating system of your device is not Linux, use a compilation tool that is supported by your operating system to compile the SDK.