Starting programs in a basic solution image

To start a program in a basic solution image:

  1. Open the program project directory in Visual Studio Code.
  2. Make sure that the project was correctly identified based on the appearance of additional extension buttons in the lower panel. If the buttons do not appear, manually activate the solution by running the command KOS: Activate extension in this directory.
  3. Make sure that the basic solution image is started according to the instructions provided in the Starting a basic KasperskyOS-based solution image section.
  4. Click the button for selecting the device or QEMU emulator lower_panel_select_device in the lower panel.
  5. Select the previously started basic solution image.
  6. Build the program according to the instructions provided in the Building a program in Visual Studio Code section.
  7. Make sure that the program has been packed into a KPA package.

    You must use the CMake commands of the kpa library to pack a program into a KPA package.

    Important! When creating a startup configuration using the CMake command add_kpa_component(), you must specify the kl.Kds value in the EIID field.

    Also, if the started program uses file systems (via the VFS component), you must specify the value VFS_FILESYSTEM_BACKEND=client:kl.VfsSdCardFs in the ENV field when creating a startup configuration using the CMake command add_kpa_component().

    For example:

    add_kpa_component(Hello.kpa RUN_CONFIGURATION "app" NAME "Hello app" TYPE "service" EIID "kl.Kds" PATH "bin/Hello" ENV "VFS_FILESYSTEM_BACKEND=client:kl.VfsSdCardFs")

  8. Click the button in the lower panel that displays the name of the build target (for example: all). In the drop-down list, select the built program KPA package that is signed as [application] in the list.
  9. Click the start button Build all targets in the lower panel. The program will be installed to the selected device or an emulator and will automatically start.

    When you click this button, the program starts with the default parameters (without arguments and environment variables). If you need to specify the startup parameters, you can start the program using the launch.json startup configuration.

Page top