Zero-overhead Destructors in C

CNXSoft: This is another guest by Blu, this time about C programming, and specifically destructors in C programming language If you asked seasoned C++ developers what their favorite features in the C++ language might be, chances are that destructors would be on everybody’s shortlist. As many other C++ developers, I too tend to do my occasional share of C, and if there’s one feature I dearly miss in C that is destructors ‒ precisely in their capacity of automating the release of resources at the right moment. But first a disclaimer is in order: many people call simple application of destructors ‘RAII’ ‒ ‘Resource Acquisition Is Initialization’; I find this acronym unnecessarily awkward and obfuscating an otherwise straightforward concept, so you won’t see this acronym through the end of this text. Instead, I’ll be using ‘end-of-scope’ action. Traditionally, in the language of C end-of-scope (more often end-of-function) actions are achieved via deliberate arrangement of the control flow, often via goto’s …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

Visual Studio 2017 with an Embedded Linux Arm Device

This is a non-sponsored guest post written by Marc Goodner: Principal Program Manager, Microsoft, and Jeremias Cordoba: Innovation Engineer, Toradex. Today many embedded devices run some flavor of Linux as their primary operating system. This poses a challenge to developers who run Windows on their development machine. This article explains a new way to use the latest Visual Studio for C++ development on an embedded Arm Devices from a Windows Host PC using containers for the build environment. The device we are deploying to is from the Toradex Colibri Family of System on Modules using the NXP i.MX 6ULL SoC, which features an Arm Cortex A-7. As a demo project we will connect a Bluetooth Sensor with the Toradex Colibri Module. Please note that Visual Studio support for this case is in an early state, you will see improvements from Microsoft and Toradex in the coming months. Prerequisites Colibri i.MX 6ULL with Wi-Fi/BT and an Aster Carrier Board TI SensorTag (Bluetooth low energy) …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

Embedded Systems Conference 2018 Schedule – IoT, Security, Artificial Intelligence, and More

The Embedded Systems Conference takes place each year in Boston, US in April or May. This year, the event will occur on April 18-19, and the organizers have published the schedule with 7 tracks: Advanced Technologies, Center Stage (free), Embedded Hardware Design & Verification, Embedded Software Design & Verification, IoT and Connected Devices, Keynotes (free) and Special Event (free). Even if you can’t attend, it’s always useful to have a look at the schedule to learn about potential industry developments. So I’ve made my own virtual schedule with some of the sessions I found relevant to this blog. Wednesday, April 18 8:00 – 10:00 – An Introduction to RTOS by Jean Labrosse (Software Architect, Silicon Labs) This tutorial will help you understand what RTOSs are and how they work so that you can make better use of their features. The class will explain what an RTOS is and why you should use one. We’ll explain what tasks are, why you …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

FOSDEM 2018 Open Source Developers Meeting Schedule

FOSDEM (Free and Open Source Software Developers’ European Meeting) occurs every year on the first week-end of February, where developers meet for two days discussing about open source software projects. FOSDEM 2018 will take place on February 3-4 this year with  652 speakers, 684 events, and 57 tracks, an increase over  last year 608 speakers, 653 events, and 54 tracks. There will be 8 main tracks namely: Community, History, Miscellaneous, Performance, Python, Security and Encryption, Space, and Global Diversity CFP Day. There will also be 33 developer rooms, and since the full schedule is now available, I’ll make a virtual schedule mostly based on sessions from the Embedded, mobile, and automotive, Hardware Enablement, and Internet of Things devrooms. Saturday 3, 2018 09:50 – 10:15 – Turning On the Lights with Home Assistant and MQTT by Leon Anavi In this presentation you will learn the exact steps for using MQTT JSON Light component of the open source home automation platform Home …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

When Your Code Lands You in Jail

You’ve probably heard about Volkswagen emission scandal that surfaced last year. Basically, the company used some tricks to detect when the vehicle was under test and ran in low emission mode during those tests, and normally on the road emitting up to 40 times over the U.S. pollution limits. Cheating is quite easy because testing is performed indoor with the car wheels on rollers as shown in the picture below, so all the software had to do is detect whether the car was actually moving forward to select the right mode. Several executives involved in the decision to rig the emissions tests got charged as expected, but what happened to the engineer who implemented the code following his  boss(es)’ request? Reuters reports that he’s been sentenced to 40-month prison term, and a $200,000 fine, after pleading guilty early on, and collaborating with authorities. His lawyer argued that Jiang (Engineer surname) was no a “mastermind” of the emissions fraud, and “blindly …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

XOD is a Visual Programming Language for Arduino, Raspberry Pi, and other Maker Boards

When you think about visual programming on the Raspberry Pi or Arduino board, Scratch may come to mind, but some developers have decided to create their own visual programming language working for Arduino, Raspberry Pi, and other boards. Meet XOD, pronounced ksəud. The developers explains their used “functional reactive programming principles and added graphical functionality”. XOD is comprised of “nodes” that represents either some physical device like a sensor, motor, or relay, or some operation such as addition, comparison, or text concatenation, which you can link together through inputs and outputs to create a program, and XOD IDE will compile the resulting diagram to create and upload a binary program to Arduino, Raspberry Pi, etc… You can also convert a XOD diagram into a node with inputs and outputs to use it in another diagram, so the language is scalable. The developers are now looking for testers to play with XOD private alpha, but XOD language, IDE, and library sources …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

Top Programming Languages & Operating Systems for the Internet of Things

The Eclipse foundation has recently done its IoT Developer Survey answered by 713 developers, where they asked  IoT programming languages, cloud platforms, IoT operating systems, messaging protocols (MQTT, HTTP), IoT hardware architectures and more.  The results have now been published. So let’s have a look at some of the slides, especially with regards to programming languages and operating systems bearing in mind that IoT is a general terms that may apply to sensors, gateways and the cloud, so the survey correctly separated languages for different segments of the IoT ecosystem. C and C++ are still the preferred languages for constrained devices, and developers are normally using more than one language as the total is well over 100%. IoT gateways are more powerful and resourceful (memory/storage) hardware, so it’s no surprise higher level languages like Java and Python join C and C++, with Java being the most used language with 40.8% of respondents. When it comes to the cloud with virtually …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

Android Studio 3.0 Preview Release with Support for Kotlin Programming Language, Android O Preview Images

Most Android apps used to be programmed in Java with the Eclipse IDE, then Google introduced Android Studio in 2013 which has now replaced the latter, and with the release of Android Studio 3.0 Canary 1 preview, the company is now offering developers to program apps using Kotlin language instead of Java. Kotlin programming language is 100% compatible with Java language, and you can even mix Kotlin and Java in your code. Kotlin can make your code much more simple while declaring classes, and it has a few other improvements over Java. Android Studio also include a Java to Kotlin converter. The language has already been used by Expedia, Flipboard, Pinterest, Square, and others. Android Studio 3.0 also brings many other improvement, such as performance profiling tools for the CPU, memory, and networks showing your app performance in real-time, and faster Gradle builds for large sized app projects. Android Studio 3.0 also brings changes specific to the Android platform development …

Support CNX Software – Donate via PayPal or become a Patron on Patreon