📜 ⬆️ ⬇️

Visual C ++ for IoT Development: Breakthrough or Frustration?

enter image description here


As you know, the world does not stand still and is actively developing. Especially in the field of IT and specifically software development. The most difficult thing in this business is to keep track of all the new items and grab the most valuable and useful ones. So I just recently stumbled upon an addition to Visual Studio called Visual C ++ for IoT Development, which has been around for almost a year. Potentially - a very useful thing, but for now it is more a bright name than the present Visual C ++ for IoT. Let's see why.


The idea of ​​using Visual Studio when working with microcontrollers has been visiting me for a long time and regularly. And recently this idea has become a practice. All my projects have long been tightly integrated with Visual Studio. The first time I used it simply as a means of interacting with version control systems. Then I began to partially write code in it, and now I also use the Unit test system built into it. But compilation and debugging have always been somewhere overboard.


Seeing the header of Visual C ++ for IoT Development, I thought that the age of torment was over! Stop writing code in one place, and compile and debug in another by constantly switching here and there. There was hope to do everything in Visual Studio.


enter image description here


This extension appeared in March 2016. And the reviews about him are not very good. Apparently, therefore, it remained in the shadow for almost a year.


So what is Visual C ++ for IoT Development? It turned out that this is a “by-product” of attempts to connect the GDB Debugger to Visual Studio.


This story began in 2014. First, Visual Studio introduced the ability to remotely debug C ++ code for Android. After half a year, the possibility of remote debugging of C ++ code was announced just under Linux systems. In November 2015 , a preview version appeared . Well, now the add-on for remote debugging of code on Linux from under Visual Studio is already fully accessible and actively developed. Last update was 12/22/2016. This has even been written on Habré .


And then IoT? But it turned out that a project called OpenOCD has long existed. Its full name is Open On-Chip Debugger, In-System Programming and Boundary-Scan Testing. The meaning of this project is that it is a "single" debugging interface for almost any microcontroller. Whether the hardware system is debugging or software, whether it is an external JTAG / SWD adapter, or whether it is “smeared” on the debug board — it doesn't matter. Currently, OpenODC has configuration files for almost all existing debugging tools. And it unifies all this just in GDB.


It looks like this:


enter image description here


This opens the socket at localhost: 3333. Accordingly, this is the GDB server that allows for remote debugging. Visual Studio connects to it.


In general, that's all. More Visual C ++ for IoT Development is nothing new to do properly and can not. Yes, there you can configure NMake and still do a compilation in console mode. And there are IntelliSense settings. But all this was so in the Makefile projects.


enter image description here


To date, the developers have tested everything in conjunction with the ARM GCC tools . OpenOCD , pyOCD and JTAG Segger debugger.


What would you like from this add-on? Full-fledged work with ARM GCC as well as with regular projects, and not to configure NMake. Then you can lead the whole project in Visual Studio, using all its facilities.


And there are no technical problems for this. Moreover, such attempts have already been made . There are even commercial projects - VisualGDB . Why Microsoft does not do this itself remains a mystery.


Summing up, we can say that Visual C ++ for IoT Development is great and you can use it. But uncomfortable. There are several scenarios and all of them suggest “crutches”, at best, in the form of NMake. I hope that this extension will not be abandoned and will develop as actively as Visual C ++ for Linux Development . Although, since the last update was 03/31/2016, hopes can be in vain.


')

Source: https://habr.com/ru/post/320120/


All Articles