Install Microvisor App Development Tools on Unsupported Platforms
Danger
This is historical documentation, and tooling and console operations are no longer available.
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) Windows Subsystem for Linux (WSL).
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.
Danger
These instructions are not supported. Use at your own risk!
Windows
1. Install the Pre-requisites
Download and run the following tools’ installers. In each case, make sure you accept the offered option to add the tools to the Path:
Visual Studio Build Tools 2022. When the Visual Studio Installer runs, under the Workload tab select Desktop development with C++. In the Installation Details list at the right of the Window, make sure only MSVC v143 VS 2022 C++ and C++ CMake Tools for Windows are selected from among the options.
The Microvisor CLI
2. Configure the Microvisor CLI
From the Start menu, select Visual Studio 2022 > Developer Command Prompt for VS 2022.
Run microvisor login to configure the tool and create a profile.
3. Build the Demo App
Still in the Developer Command Prompt, run these commands:
cd \Users\<YOUR_USER_NAME>
md GitHub
cd GitHub
git clone https://github.com/korewireless/Microvisor-Demo-CMSIS-Freertos
cd Microvisor-Demo-CMSIS-Freertos
git submodule update --init --recursive
cmake -S . -B build -G "NMake Makefiles"
cmake --build build
microvisor apps bundle build\Demo\gpio_toggle_demo.bin build\Demo\gpio_toggle_demo.zip
microvisor apps create build\Demo\gpio_toggle_demo.zip
macOS
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.
1. Install Rosetta 2 (Apple Silicon Macs only)
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
2. Install the Pre-requisites
brew install cmake curl git jq node bash
3. Install the Correct ARM GCC Cross-compiler
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:
curl https://raw.githubusercontent.com/Homebrew/homebrew-cask/17d156bba668109dcb6bba337a75fcf41be2d71b/Casks/gcc-arm-embedded.rb \
-o gcc-arm-embedded.rb
brew install --cask gcc-arm-embedded.rb
Warning
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 Homebrew formulae and casks but not gcc-arm-embedded
.
4. Install the Microvisor CLI
brew tap microvisor/brew && brew install microvisor
Remote Debugging Notes
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.
Raspberry Pi OS
Installing Microvisor development tools is straightforward.
1. Install the Pre-requisites
This will install an older version of the ARM GCC cross-compiler, but it is sufficient to compile Microvisor apps.
sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi \
build-essential libsecret-1-dev cmake curl git jq \
gdb-multiarch
2. Install the Microvisor CLI
curl -O -L https://korewireless.com/downloads/microvisor/latest
tar -xvf microvisor*gz
sudo mv microvisor /usr/local/bin
Remote Debugging Notes
Remote debugging on the Raspberry Pi uses the same gdb-multiarch
tool as used under Ubuntu.