=== Working With Devices

Available devices can be listed with the 'device list' command. Additional devices may be defined using %{IdeVariant} (Qt Creator). Devices corresponding to available %{OsVariant} emulators are added automatically. Emulators can be managed and controlled using the 'emulator' command. Packages can be deployed to a device with the 'deploy' command. The device to deploy to is determined by the 'device' configuration option.

On Windows, under the MSYS2 environment (this is the case of using sfdk under Git Bash), command line arguments to sfdk are subject to pathname conversion realized on MSYS2 side (applies to all native Windows programs executed from the MSYS2 environment). All arguments or their portions that resemble POSIX absolute paths are converted to corresponding Windows paths which may or may not exist. This is often unwanted for sfdk use. E.g., when a path on a remove device is passed as an argument, it is incorrectly converted to a local Windows path:

    $ sfdk device exec ls -l /usr/bin/myapp
    ls: cannot access C:/Program Files/Git/usr/bin/myapp: \
        No such file or directory

It is possible to selectively disable pathname conversion with the help of the 'MSYS2_ARG_CONV_EXCL' environment variable. It is also possible to work it around by using two leading slashes in the POSIX absolute path, imitating an UNC-like path which is not subject to pathname conversion.

    $ export MSYS2_ARG_CONV_EXCL='*'
    $ sfdk device exec ls -l /usr/bin/myapp
    -rwxr-xr-x 1 root root 104648 Oct 13 23:21 /usr/bin/myapp
    $ unset MSYS2_ARG_CONV_EXCL
    $ sfdk device exec ls -l //usr/bin/myapp
    -rwxr-xr-x 1 root root 104648 Oct 13 23:21 //usr/bin/myapp

Check MSYS2 documentation for more information.
