Microvisor is in a pre-release phase and the information contained in this document is subject to change. Some features referenced below may not be fully available until Microvisor's General Availability (GA) release.
These instructions are not supported. Use at your own risk!
Microvisor development is formally supported only under Ubuntu Linux 20.04. Supported development on other platforms involves running either a virtual machine into which you have installed Ubuntu 20.04, using Docker, or (Windows only) using Windows Subsystem for Linux.
However, it is possible to build apps for Microvisor natively on other platforms, and this page collates the extra information you need to do so.
Download and run the following tools' installers. In each case, make sure you accept the offered option to add the tools to the Path:
twilio login
to configure the tool and create a profile.Still in the Developer Command Prompt, run these commands:
1cd \Users\<YOUR_USER_NAME>2md GitHub3cd GitHub4git clone https://github.com/twilio/twilio-microvisor-freertos5cd twilio-microvisor-freertos6git submodule update --init --recursive7cmake -S . -B build -G "NMake Makefiles"8cmake --build build9twilio microvisor:apps:bundle build\Demo\gpio_toggle_demo.bin build\Demo\gpio_toggle_demo.zip10twilio microvisor:apps:create build\Demo\gpio_toggle_demo.zip
The easiest way to install the development tools under macOS is to use the Homebrew package manager, and this is the approach taken here. If you do not have Homebrew installed on your Mac, please get it now.
Not all of the available tools yet support Apple Silicon, so if you have a Mac based on the M1 or above, please make sure you also install Rosetta 2 to allow you to continue to run tools compiled for x86-64, such as the ARM cross-platform compiler:
softwareupdate --install-rosetta
brew install cmake curl git jq node bash
Homebrew can install the ARM GCC cross-compiler using the cask gcc-arm-embedded
. However, the latest version, 12.2.rel1, doesn't compile Microvisor apps correctly. Instead, you must install an older release, 11.2-2022.02. This involves downloading an older version of the public Homebrew gcc-arm-embedded
installation script:
1curl https://raw.githubusercontent.com/Homebrew/homebrew-cask/17d156bba668109dcb6bba337a75fcf41be2d71b/Casks/gcc-arm-embedded.rb \2-o gcc-arm-embedded.rb3brew install --cask gcc-arm-embedded.rb
Important If you subsequently run:
brew upgrade
you will update the ARM GCC cross-compiler to a more recent version that will not compile the Microvisor SDK. To avoid this issue, replace the last command with this one:
brew upgrade $(brew list | grep --invert-match gcc-arm-embedded)
This will upgrade all your installed Homenbrew formulae and casks but not gcc-arm-embedded
.
brew tap twilio/brew && brew install twilio
Installing the ARM cross-compiler as outlined above also installed a suitable version of the debugger GDB.
To perform remote debugging operations on a Mac, follow the instructions in the remote debugging documentation but use arm-none-eabi-gdb
in place of gdb-multiarch
. For example, to initiate a debugging session for our Remote Debugging Demo, call:
arm-none-eabi-gdb -l 10 ./build/demo/mv-remote-debug-demo.elf
If you'd like to use Visual Studio Code to host remote debugging sessions, you will first need to edit the ./vscode/launch.json
file. Look for the key gdbpath
and set its value to the path to your arm-none-eabi-gdb
installation. The command which arm-none-eabi-gdb
will help you here.
Installing Microvisor development tools is straightforward, but requires some extra work to get an up-to-date version of Node.js and to install the Twilio CLI.
This will install an older version of the ARM GCC cross-compiler, but it is sufficient to compile Microvisor apps.
1sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi \2build-essential libsecret-1-dev cmake curl git jq \3gdb-multiarch
You will also need to install Node.js version 14.0 or higher in order to run the Twilio CLI:
1curl -sL https://deb.nodesource.com/setup_19.x | sudo -E bash -2sudo apt install -y nodejs
Twilio does not recommend installing the Twilio CLI using npm
. However, the recommend method, using apt
, does not yet support either 32- or 64-bit Raspberry Pi OS, so you will have to use npm
. This makes use of the version of Node.js you just installed.
npm install -g twilio-cli
Remote debugging on the Raspberry Pi uses the same gdb-multiarch
tool as used under Ubuntu.