Skip to main content

1. Software prerequisite

At first, you could install the MadMachine extension for Visual Studio Code. It allows you to create a new project, compile and download it to your board.

info

We only support macOS 12.0 and above, as well as Linux. Windows is not supported yet.

1. Install USB-Serial driver

  1. Download the macOS driver and unzip it.
  2. Install the dmg format driver in the zip file.
  1. Drag CH34xVCPDriver into Application folder.
  1. Open LaunchPad and open the CH34xVCPDriver app.

    Click Open if there is a popup window.
  2. Click the Install button.

If there is a popup message saying System Extension Blocked.

Click Open System Settings button.

Click Allow.

The driver is installed successfully.

info
  1. To uninstall the driver, remove the app to Trash.
  2. Restart the computer before reinstalling the driver.

After the driver is installed, you should see the port tty.wchusbserialx in serial monitor if you connect your board to the computer.

2. Download mm-sdk

Download the mm-sdk according to your operating system and unzip it.

3. Setting up the Swift development enviroment

Since the current pre-release version of the SDK is based on the main branch (September 25, 2024 or newer) build of the Swift toolchain, you need to install the development snapshot of the Swift toolchain for compatibility. Step 2 will no longer be necessary after Swift 6.1 is released.

  1. Download and install Xcode.
  2. Download and install the development snapshot (main branch build) of the Swift toolchain(.pkg), it will install itself to /Library/Developer/Toolchains.

4. Install MadMachine extension for VS Code

  1. Open the Visual Studio Code. Click the Extension icon on the left activity bar.
  2. Enter MadMachine in the search box to find the extension in its marketplace.
  3. Click the Install button.
Install the MadMachine extension
info

For advanced users, you could edit your code wherever you like and use the mm-sdk to compile your code.

  1. Click ⚙️ / Extension Settings to open the settings.

The extension relies on the mm-sdk to do all its work. You need to indicate sdk's path before using the extension.

Set the MadMachine extension
  1. Enter the path of the sdk in the box that matches your operating system.
Indicate the path of sdk on macOS.
important

Make sure the sdk path is correct, or the extension won't work.

Now, the extension gets ready👏.

The extension is at the bottom of the Explorer panel. All you need for your project is these three buttons:

  • Build: build your project after you finish the code. If there are any errors, you can modify your code according to the message in the terminal.
  • Download: download the generated file after building your project.
  • New Project: create a new MadMachine project. You will choose the project type and the board type.
MadMachine extension