The latest development version of this page may be more current than this released 0.4.2 version.

macOS Command Line Compilation Environment Setup

Download Tools

  • Recommended version of CMake: 3.25.1 (version cannot be lower than 3.20), official download link: CMake — Download;Backup download address: Download

  • Ninja recommended version: 1.11.1, official download link: Ninja — Download;Backup download address: Download

  • Ccache recommended version: 4.7.4 (optional), official download link: Ccache — Download;Backup download address: Download

  • Recommended use of Python: Python3 (version not less than 3.8), official download link: Python — Download (MacOS system provides installation packages);Backup download address: Download

  • Toolchain, macOS requires users to build their own toolchain from Toolchain. Refer to toolchain-build-ck804.

    • Toolchain download address: not available.

  • Besides downloading from the above addresses, macOS systems can install these tools via third-party package managers, which is not detailed here.

  • If these tools already exist on your system and meet the version requirements, you can use them directly without reinstalling.

  • Install Python dependency packages

Assuming the WM IoT SDK has been downloaded and named wm_iot_sdk

python -m pip install --user -r /Users/wm/wm_iot_sdk/tools/wm/requirements.txt

Additionally, the Tkinter module needs to be installed for Python on macOS. You can use brew install python-tk (or brew install python3-tk ) to install it.

Set Environment Variables for Tools

If tools are installed by third-party package managers like brewport (recommended), environment variables might already be set and do not need to be configured again.

  • Add CMake to PATH

export PATH=/Users/wm/tools/cmake/bin:$PATH
  • Add Ninja to PATH

export PATH=/Users/wm/tools/ninja:$PATH
  • Add Ccache to PATH

export PATH=/Users/wm/tools/ccache:$PATH
  • Add Python to PATH

macOS provides an installer, just install it.
  • Add Toolchain to PATH

export PATH=/Users/wm/tools/csky-elfabiv2-tools/bin:$PATH
  • Set WM IoT SDK Environment Variable

export WM_IOT_SDK_PATH=/Users/wm/wm_iot_sdk
  • Add wm.py Tool to PATH

export PATH=$WM_IOT_SDK_PATH/tools/wm:$PATH

The above operations are temporary settings,, only effective for the current session. To make them permanent, save the environment variables to the ~/.bashrc file.