IntroductionTorizon offers a Microsoft Environment for developers familiar with Visual Studio. This article will show how to install, configure and use it to build a "hello world" application and deploy it to a target device. Prerequisites
Setting Up Torizon EnvironmentAfter having installed the extension, you are read to start a first configuration of the work environment for Torizon. After opening Visual Studio click on Continue without code: Download Base SDK Image ContainersVisual Studio Extension For Torizon uses Docker container images that have all the toolchain and SDK for C/C++ development for Toradex Boards. It is recommended to download these container images before starting development. Select menu Tools -> Download update base and sdk containers : Downloading and updating container images may take a few minutes. Wait until you have the following message in the output: Torizon DevicesVisual Studio Extension For Torizon needs to be connected to a target device, which will be the context for deploying the developed applications. To connect to Toradex devices with Visual Studio Extension For Torizon use the Torizon Devices Explorer. Select the menu View -> Other Windows -> Torizon devices: On the Torizon Devices Explorer click on the Detect device on the network: The window below will be shown: Enter the IP address of the Toradex board, which will be the target device, and the Torizon user credentials then click the {.note} These credentials are the same that were added during the first Torizon boot. This detection process will perform an exchange of credentials between Visual Studio and the Toradex board to pair the board with the Torizon Visual Studio Extension. After detection we should have in Torizon Devices Explorer a new entry for the target device. Click on Torizon ToolbarAnother feature that must be enabled before we create our first project is the Torizon Toolbar. Right click on the Visual Studio toolbar and select Torizon Toolbar: After this first environment setup we are ready to create our projects. Create New ProjectTo create a new Torizon C/C++ project select File -> New -> Project ...: On the On the
On the create task Visual Studio will ask for This will create a blank Torizon C/C++ Application template. Deploy and DebugAfter the development of your application, in the case of this guide a simple message to be written, it is time to run the application to test and debug it on the target device. To debug your application you can enable breakpoints selecting the lines of code that you want debug: After selecting any breakpoint in your source code, run the application to debug it. For this, click on the As shown in the GIF above, when clicking on The first time the application containers are built takes some time: You will get the following messages in the output tab when the application container build has completed successfully: When the build of the application container finishes Visual Studio will start the deployment onto the target device. A window to The deployment of the container application to the target device can take some time during the first deployment. Wait until the deployment finishes successfully. After this the application will wait until the deployment finishes successfully. After that the application will be running on the target device and the breakpoint will be reached. Click on the After the first time, future deployments with the Deploy and ReleaseWhen the application is ready, debugged and tested, it can be deployed and released. To do this switch the Next step is to put the extension in release mode. To do this, select Project -> Properties -> Torizon C/C++ Application -> Configuration -> HelloWorld Properties and change the combo box For the Release configuration you will need to add two new properties. Click on the Setting the Click Wait until the build is completed. After that it is necessary to build the application container, so click on the After the deploy, refresh the list of images and containers on Torizon Devices Explorer: You can see that now there are two images and two containers. One of these containers and image is for the debug, it will no longer be needed and can be deleted to free up space. First remove the debug container and then the image. Still using Torizon Devices Explorer click on the names listed in After that the same can be done for the debug image. Using Torizon Devices Explorer click on the names listed in Next Steps / Additional ResourcesNow that you have the extension set up and deployed your first hello world application, how about continuing with something more advanced? See these other articles using that use the Visual Studio Extension For Torizon: |