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.

Install the extension

  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

BTW, Serial Monitor provided by Microsoft will be installed automatically. Go here for a detailed tutorial.

info

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

Set the extension

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

  1. Download the latest sdk version according to your operating system and unzip it.

  2. Then come back to the VS code. In the menu bar, select Code / Preferences / Settings.

Set the MadMachine extension
  1. In the Settings, select Extensions / MadMachine. Enter the path of the sdk in the box that matches your operating system. Windows is not supported since we are waiting for the full Window support of Swift language...
Indicate the path of sdk on Mac.
info

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

Now, the extension gets ready👏.

Quick look

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