In this tutorial, we’ll walk you through the process of building a simple C project using the Simple Switch framework. We’ll be using Visual Studio Code (VS Code) for this demonstration, but everything we cover can also be done from the command line.
Installing Simple Switch
- Install the Simple Switch extension for VS Code.
- Configure the extension settings by specifying the SDK location, application name, container name, and template type.
- Review the workspace settings (simple-switch.json) and launch.json file for project-specific configurations and debug configurations, respectively.
Creating and Compiling the Project
- Initialize a new project and select the C template for a debug build.
- Compile your first C project.
- Fix any errors that arise and recompile.
Packaging and Deploying the Project
- Package and deployed the application bundle to the target device.
- Verify that the container has started on the device using the simple-switch helper status command.
Viewing Logs and Debugging
- View application logs directly in VS Code.
- Enable the debug session and repackage the application.
- Redeploy the application and use the debugger.
- Set breakpoints, step through the code, and observe debug output in the logs.
Conclusion
This tutorial has provided a hands-on introduction to developing Simple Switch projects using VS Code. We’ve covered the essential steps of creating, compiling, packaging, deploying, and debugging Simple Switch applications. Feel free to experiment and explore the full capabilities of Simple Switch to build more complex and sophisticated projects.
Talk to the experts!
Let us know about your product or your challenge and our team will get in touch to discuss how we can help.