Managing Hemera Devices and Emulators from Client SDK Tools

Once Client SDK Tools are installed, you can use them to install Hemera Devices and Emulators.

Using VirtualBox with Hemera emulators

Hemera Emulators are based upon VirtualBox, an open source and multiplatform Virtual Machine Manager. VirtualBox (at least 4.2) is a hard requirement for running Hemera SDK on your host. Most of the times, you won't need to interact with VirtualBox directly nor have any VirtualBox knowledge, as Hemera makes this detail completely transparent.

When installing an emulator, VirtualBox is automatically configured depending on what your PC reports. This automatic detection works most of the times, but it might fail on some older machines. See Troubleshooting for more details. Most machines will require no additional intervention once an emulator is installed.

If you wish to make modifications, VirtualBox machines can be altered to give an emulator more/less RAM or CPU power, or to enable additional peripherals or features. Hemera fully supports filesystem sharing (which is used extensively in the SDK) and other advanced features: all Hemera VirtualBox targets fully integrate VirtualBox guest additions by default.

Note
Installing VDIs manually is strongly unadvised, even though Hemera SDK supports VM conversion. This is because Hemera Emulators require some peculiar settings which are set upon installation by the SDK.

Using Qt Creator

Managing Hemera Emulators using Qt Creator

Open up Qt Creator, and go to Menu Tools->Options. Select the tab Devices then. You should be presented with a similar screen:

Hemera Devices management window

Clicking the "Add" button in the upper right will prompt you about the kind of device you want to add. Select "Hemera Emulator". The install screen looks like this:

Add Emulator Page

Select either the (compressed) VDI file or enter a Start! token, and click Next. The installation procedure will begin.

Note
If you are supplying a compressed (bz2) emulator, the emulator will be decompressed first. This operation takes a long time, and no progress will be displayed.

Qt Creator will then test your device to make sure it is reachable. It will also create a Kit containing all the needed information for compilation.

Managing Hemera Devices using Qt Creator

Note
Before adding a device, you will need to add its associated emulator. You cannot add a Device without associating an emulator to it.

In the same fashion, open Qt Creator, Menu Tools->Options, Devices. When selecting Add, choose "Hemera Device". The install screen looks like this:

Add Device Page

If you already have connected a device to your PC, it should appear already in the list. If not, connect it to your PC and it should appear. If it still doesn't appear, you can enter a URL manually, but this is strongly unadvised. When selecting one, enter a name for it and click Next. You will be then prompted to choose an emulator to associate. If the association procedure succeeds, your device is ready for use.

Using command line tools (hsdk)

Installing Hemera Emulators using hsdk

You can usually get an emulator from two sources:

  • A (compressed) VDI file you got from your vendor or through direct delivery.
  • A Start! token for immediate download.

Using hsdk, installation is really easy:

hsdk emulator install [emulator_name] [path_to_vdi/Start! token]

The operation might take a while. A sample command is:

hsdk emulator install berta_emulator berta_emulator_Hemera_Aegis_v1.0.0.vdi.bz2

This will create and make available in your system a Hemera emulator named **berta_emulator** ready to be used.

Note
If you are supplying a compressed (bz2) emulator, the emulator will be decompressed first. This operation takes a long time, and no progress will be displayed.

Updating Hemera Emulators using hsdk

Most of the times, Emulators will be capable of self-updates. However, you might need for any reason to replace the Emulator's hard drive or force an update. You can use again the install command in the very same form:

hsdk emulator install berta_emulator berta_emulator_Hemera_Aegis_v1.1.0.vdi

If target berta_emulator exists, its hard drive will be replaced with the new one and reconfigured. The previous hard drive will be deleted, unless you specify the –keep option.

Removing Hemera Emulators using hsdk

You can use hsdk to delete an Emulator from the system:

hsdk emulator remove berta_emulator

Unless you specify the –keep option, all associated files (including the hard drive) will be deleted permanently.

Installing Hemera Devices using hsdk

Hemera Devices are managed via Hyperspace. There are two ways to add a Hemera device

  • By ID through its Hyperspace discovery (recommended)
  • By URL if Hyperspace discovery is not available (only useful if you are dealing with complex network/firewalling configurations)

After plugging in your device and making sure it has access to a reachable Hyperspace network (the main screen should tell you that) which is reachable by your host as well, issue:

hsdk device scan

This will list all known devices in the Hyperspace networks of the host. Output will be something like:

unregistered (ababababab) | 10.42.0.1 | 8080

You can now add the device to your host.

hsdk device add [name] [hardwareid]

Which would, in turn, become:

hsdk device add berta ababababab

Your device is now correctly registered. If you wanted to use a URL approach, you might have done

hsdk device add berta https://10.42.0.1:8080/

Again, this approach is not advised when discovery is available. If the board changes URL for any reason, your Device won't be reachable anymore!

Removing Hemera Devices using hsdk

Simply issue

hsdk device remove berta

Associating Hemera Devices with Emulators using hsdk

To start building for a target Device, it first needs to be associated to an Emulator. For this to happen, the device needs to be plugged in and reachable. In our previous example, we would do something like this:

hsdk device associate berta berta_emulator

The procedure might take a while. Device and Emulator will be checked for compatibility and if the command does not return any error, the association was successful.

You can now start developing applications for your Device!

Troubleshooting

I installed an emulator, but when I try starting it nothing happens.

Probably your PC has no support for VT-x/AMD-V even though Hemera detected it. To solve this problem, open VirtualBox, click on the Virtual Machine representing your emulator (it is in the Hemera/Emulators/Generated group), and click "Settings" in the top menu. From there, click on the "System" tab and on the "Advanced" tab. Deselect "Enable VT-x/AMD-V" and try starting the emulator again. If this still does not work, try starting the emulator from VirtualBox, you will have more details on the startup error.

The emulator starts, but sits on a grey screen.

Some features in the Virtual machine settings might be misconfigured. Open VirtualBox, select the VM representing your Emulator and click "Settings". In the tab "System", select "Processor" and make sure Enable PAE/NX is enabled.

The emulator works correctly, but when running several applications on a Planet makes compilation hang, or the emulator becomes extremely slow.

The emulator, by default, is configured with a very minimal RAM setting (512MB). For how the VirtualBox target works, applications are rather expensive in RAM when executed over OpenGL. If you experience performance issues, try raising the RAM to a more comfortable setting until you are satisfied.