Help center

pulpLab: compile Arduino C++ with the compile relay

pulpLab programs your circuit boards in the browser. MicroPython works with nothing to install: the program is sent as is to the board, which runs it. Arduino C++, on the other hand, first has to be compiled for the board before it is uploaded, and a browser can't do that on its own. So pulpLab hands this step to a compile relay: a small program running on your computer that uses the Arduino compiler installed on that machine.

What works without the relay

  • Writing code, MicroPython, the serial monitor and the plotter.
  • The virtual board, in every browser.
  • Uploading a file already compiled elsewhere (for example with the Arduino IDE): ⋯ › Upload a file (.bin, .uf2, .hex)…

For a real board plugged in over USB, use Chrome or Edge on a computer: they are the only browsers that can reach plugged-in boards.

Install the Arduino compiler

  1. Install the Arduino command-line compiler (arduino-cli), which is free and published by Arduino, following the instructions on its website.
  2. Install support for the boards you use: Arduino Uno, Nano and Mega, ESP32, Raspberry Pi Pico… For ESP32 and the Pico, first add the manufacturer's board catalog. Arduino's website explains these steps.
  3. If needed, install the libraries your programs use (for example the one for servo motors).

Get the relay running

The relay ships with pulpSuite. It has to run on the computer you are using for as long as you program in Arduino C++. If it is not running, ask whoever administers your installation to start it: how to do so depends on the installation and is described in the technical documentation that comes with pulpSuite. A demo version, with a fake compiler, lets you try things out without installing anything.

On the pulpLab home page, a line shows the relay's status:

MessageMeaning
Compile relay running (compiler …)All set: Verify and Upload compile your program.
Relay running, but the Arduino compiler is not installed on this machineInstall the compiler (see above).
Compile relay not runningArduino C++ can't be compiled. MicroPython doesn't need it.

Compile errors show up in the editor, with the file and line involved.

If you use pulpSuite from your own computer, the relay works directly. On an installation published on a server, it's up to the administrator to provide one.

MicroPython firmware

The relay can also download, when you ask, the official MicroPython firmware for your board. Without the relay, download your board's file from micropython.org, then pick it in pulpLab.

Relay security

  • It can only be reached from your computer, and only by pulpSuite.
  • One compilation at a time, with a time limit; a project sent to it can't exceed 64 files and 1 MB.
  • Your code is not kept anywhere: it is not written to the logs and temporary files are deleted after each compilation.

Frequently asked questions

The Verify button says “Compile service not found”.

The relay isn't running, or pulpLab can't find it. Have it started (see above) and check the status line on the pulpLab home page.

Do I need the relay for MicroPython?

No. The MicroPython program is sent straight to the board.

Is my code sent over the internet to be compiled?

No. Compilation happens on the computer where the relay runs. Only downloading MicroPython firmware, when you ask for it, contacts the official site.