Embedded systems are designed to solve a particular problem using a specific combination of hardware and software components. That is why all software components in a system are tailored to fulfill this goal. Everything non-essential is disabled and all custom software is integrated into the boot sequence.
Users do not launch embedded programs; they start on system boot. However, during the development process, engineers need to run their applications without rebooting the system.
This is done differently depending on the type of the target platform. For powerful-enough systems based on SoC and running a preemptive multitasking operating system such as Linux, it can be done using a remote shell.
Modern systems usually use a secure shell (SSH) as a remote shell. The target system runs an SSH daemon waiting for incoming connections. Developers connect using a client SSH program, such as SSH in Linux or PuTTY in Windows, to get access to the target system. Once connected, they can work with the Linux shell on the embedded board in the same way as on a local computer.
The common workflow for running the program remotely is as follows:
- Build a program executable in your local system using a cross-compilation toolkit.
- Copy it to the remote system using the scp tool.
- Connect to the remote system using SSH and run the executable from the command line.
- Using the same SSH connection, analyze the program output.
- When the program terminates or gets interrupted by the developer, fetch its logs back to the developer's workstation for in-depth analysis.
MCUs do not have enough resources for a remote shell. Developers usually upload the compiled code directly into the platform memory and initiate the code execution from the particular memory address.