From the course: IoT Foundations: Operating Systems Fundamentals

Using the exercise files

From the course: IoT Foundations: Operating Systems Fundamentals

Start my 1-month free trial

Using the exercise files

- [Instructor] The exercise files, except for the one in chapters 3.4, contain the Visual Studio projects which are tested to run on Windows 10 with Visual Studio 2017. Note that Visual Studio 2017 needs to run on specific versions of Windows. For more details on this, please check the Visual Studio 2017 system requirements. I'm using Windows 10 Enterprise with the free Visual Studio Community 2017. If you use the latest Windows 10 Home, Education or Pro, that should be fine. If you are using Mac or Linux, you can run the exercise files by setting up a Windows 10 virtual machine with, for example, Virtual Box or VMWare. If you don't want to install anything for now, you can check the source code while working included in the exercise files. Assuming you have Windows 10 ready, let's install the Visual Studio Community of 2017. Its installation process is mostly straightforward but make sure you choose to install the desktop development with C++ workload. Once we have the Visual Studio installed, we'll build a first example in exercise files package. You can download and extract the exercise files anywhere on your computer. But I just extracted them to my desktop. If you open the extracted exercise files folder, you'll see there are multiple exercise file folders for each chapter. Plus, two folders containing free RTOS source and free RTOS plus. Free RTOS source folder contains the source code of the free RTOS version 10 kernel. Free RTOS plus folder contains additional (mumbles) and network communication libraries and the demos, which we won't touch for this course. As example, let's see how to build the exercise files project for chapter 3.3. First, we navigate to the Windows example directory and then open the Win32.sln file. This is the Visual Studio solution file containing the example project we're going to build. There may be a couple of dialogs showing up after you open up the solution file and you can just click okay buttons to dismiss them. Once we open the solution with the Visual Studio, we can see the project files in the solution explorer pane on the right. Where the main file we'll work on is under the node example source. In particular, the main_app.c. We sometimes need to refer to the RTOS configuration file under the configuration files node. The free RTOS source node contains the kernel source code. For any free RTOS API function or symbol in doubt, you can refer to the source code by directly opening the source code file or using the Visual Studio code navigation feature by right-clicking the function or symbol to navigate to its definition in the source code. Now you can view the project and exclude it by clicking the green arrow on the toolbar. Shortly you should see the results on the console. You can use the debug feature with the Visual Studio as well, if you want to debug this program. Note that odd compile files are contained in the debug folder here, where you can manually run the exe file from there as well. You can follow these similar steps for other exercise files.

Contents