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.
This guide will walk your through the Microvisor Factory Process, the procedure by which a 'raw' STM32U585-based device is provisioned first with Microvisor and then your production application firmware.
The procedure we will follow below is also the one we ourselves use to install Microvisor onto new Microvisor Nucleo Development Boards for beta program participants.
The PC set up at the start of the process is the assembly line station at which Microvisor and your application are securely installed into each device under test (DUT). Tests are run to verify the operation of the hardware that Microvisor requires, and the hardware used by your application.
We recommend that your acclimatize yourself to the Microvisor Factory Process before you designing and developing your connected product. You can try out the flow using a standard Microvisor Nucleo Development Board (NDB) in place of the DUT.
When you come to the Program your DUT section, you will need to perform a few extra steps in this case. Specifically, the NDB has already been programmed with Microvisor, so must be inlocked before the factory installer can provision Microvisor to it. The Program your DUT section includes instructions to show you how this can be achieved.
To install Virtual Box, please download version 6.1.50 and its Extension Pack from the Virtual Box downloads page and follow these instructions. Once the install has completed, run the following commands in a terminal:
sudo usermod -a -G vboxusers $USER
sudo shutdown -r now
Unlike regular application deployments, factory-provisioned application firmware is delivered via the SPI flash image copied to the DUT during the provisioning process. Your application test code is also incorporated into the image, along with Microvisor itself and the Microvisor hardware test code, both of which you can obtain from the links below.
If you are assessing the factory process and using a Nucleo development board as your DUT, you can download, build, and bundle our FreeRTOS demo as your application firmware.
You will also need to create an application test bundle, but this is straightforward: clone our App Test Demo repo, which will build a suitable (but of limited functionality) app test bundle that can be consumed in step 2, below.
Now use the Twilio CLI Microvisor plugin to build your SPI flash image. You will need to be signed in to the Twilio CLI on the computer used to generate the image:
Create an app bundle:
1twilio microvisor:apps:bundle /path/to/compiled/app/bin \2/path/to/app/bundle/zip
Sign the app bundle:
1twilio microvisor:apps:create /path/to/app/bundle/zip \2--bundle-out /path/to/signed/app/bundle/zip
Create an app test bundle:
1twilio microvisor:apps:bundle /path/to/compiled/app/test/bin \2/path/to/app/test/bundle/zip
Sign the app test bundle:
1twilio microvisor:apps:create /path/to/app/test/bundle/zip \2--bundle-out /path/to/signed/app/test/bundle/zip
Assemble the image:
1twilio microvisor:factory:image \2--application /path/to/signed/app/bundle \3--application-test /path/to/signed/app/test/bundle \4--microvisor /path/to/downloaded/kernel \5--microvisor-test /path/to/downloaded/test \6/path/to/write/spiflash.img.bin
You now need to send your spiflash.img.bin
file to your manufacturer for use when they reach step 5 of Configure the Assembly Line PC.
This needs to be performed only once. The PC can then be used to prime multiple DUTs one after the other, across multiple production runs.
Steps 1 through 8 need to be performed only once. Steps 9 and up will need to be followed every time the PC is power-cycled.
In the Terminal, run:
mkdir $HOME/factory
In the Terminal, run:
cd $HOME/factory
microvisor_factory.tar.gz
.
spiflash.img.bin
to the
$HOME/factory
directory.
In the Terminal, run:
vagrant box add --name microvisor_factory microvisor_factory.tar.gz
In the Terminal, run:
lsusb
Locate the HSM reader's two ID values and note them down.
In the Terminal, run:
vagrant up
localhost:8080
into the address field, then hit
Enter
.
spiflash.img.bin
on the PC, and click
Upload
.
smartcard not present
is shown under
HSM Status
, check that the smartcard reader is connected to the PC and that the smartcard is inserted, then click the first
Refresh
button. When the HSM is ready, you will see its state, firmware version and the number of remaining device licenses it contains.
This sequence will need to be followed for each DUT being provisioned.
Make sure you connect power last. The other connections must already be in place when you do.
The sequence must be followed for every DUT being provisioned.
If the PROGRAM DEVICE button is deactivated, it means that the DUT has already been programmed. This will likely be the case if you are using a Nucleo development board as a DUT to test the factory process. You will need to unlock the DUT before proceeding. Unlocking the DUT temporarily removes the STM32U585's RDP (Readout Protection) control; it will be re-enabled when the DUT is re-programmed.
The installer will check that it can contact the Microvisor cloud and verify your Twilio API credentials. If these checks fail, installation will halt, the cause will be reported in the web browser UI. If the checks pass, the SPI flash image will be copied to the DUT.
Now reconnect the USB-C power cable.
An on-board hardware test will now take place, checking the cellular modem, the SIM card, and WiFi and Ethernet connectivity.
The provisioning script will communicate with the Microvisor Cloud to receive a valid device-specific certificate which will be stored on the DUT.
Next, an on-board application test will take place.
The DUT is now programmed with Microvisor and ready for packaging, shipment, and use.
The assembly line operator can now pass the DUT on to the next stage of assembly and place a new DUT in the station: start again at Set up the DUT.
We welcome all inquiries you may have about Microvisor and its implementation, and any support questions that arise once you've begun developing with Microvisor. Please submit your queries via a KORE Wireless ticket: log in to the Kore console and click the Contact Support button in the left-hand navbar.