A Tale of Many Divisions – Naive Prime Factorization Across a Handful of Architectures

Compiler Explorer Dissassembly

CNXSoft: Another guest post by blu where he looks at how a small piece of code involving divisions behaves on different architectures. Once upon a time (i.e. the other week) I was giving tips to my 5th-grader how to efficiently compute least common multiples, when it struck me I could do better ‒ I could write a prime factorizer that could be useful to the elementary-school-goers in this house, as well as to the people checking the formers’ homeworks. Moreover, a naive prime factorizer could show kids how computers would carry out algorithms taught in class. There was also a bit of curiosity involved ‒ last time I wrote a prime factorizer I was in high school, and the language was Applesoft BASIC, so 30 years later, armed with a modern C++ arsenal and a supercomputer (by late ‘80s standards), I wondered what one might come up with today, approaching the problem from first principle (sorry, no Euler today). The …

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

How to Migrate from Github to Gitlab

Github is by far the most popular web-based hosting service for version control using Git, but it’s not the only option as Gitlab and Bitbucket offer alternatives. If for whatever reasons, you feel the need to migrate from Github to another service, it’s actually quite easy, and I’ve tried it with Gitlab, which offers a very easy solution to import your code repositories from Github. First, you’ll need to sign-in to Gitlab. That part does not need explanation. The next step is to go to Settings->Account, and in the Social Sign-in section, connect Gitlab to your Github account. After logging in to your Github account, youl should be set. Now click on the + icon on the op of the web page, and select New Project. Click on the Import project tab, and import project from Github. You’ll be asked to input your Github password again, and be brouhgt to your list of repositories. Now you can simply click on …

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

Embedded Linux Conference & IoT Summit 2018 Schedule

The Embedded Linux Conference 2018 and the OpenIoT Summit 2018 will jointly take place next month, on March 12 – 14, 2018 in Portland, Oregon, USA. The former is a “vendor-neutral technical conference for companies and developers using Linux in embedded products”, while the latter is a “technical conference for the developers and architects working on industrial IoT”. The Linux Foundation has already published the schedule, and it’s always useful to learn what will be discussed about even for people who won’t attend. With that in mind, here’s my own virtual schedule with some of the talks I find interesting / relevant to this blog. Monday, March 12 10:50 – 11:40 – Progress in the Embedded GPU Ecosystem by Robert Foss, Collabora Ltd. Ten years ago no one would have expected the embedded GPU ecosystem in Linux to be what it is now. Today, a large number of GPUs have Open Source support and for those that aren’t supported yet, …

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

Gumstix AutoBSP Automatically Generates Device Tree Files for Hardware Designed with Geppetto

Gumstix launched Geppetto Design-To-Order (D2O) system back in 2013, and at the time you could design complete baseboard for their Overo CoMs right in your Chrome or Firefox web browser, and once complete, order the board from the website. The system is meant to save you time, and “design” here does not mean drawing schematics, and laying out PCBs, but instead selecting board size, and adding ports as needed. Since then, the company has added support for more modules, and you can now easily build you own baseboard for Raspberry Pi Compute Module, Technexion PICO-IMX6 module, Toradex Colibri SoM, 96Boards Mezzanine, and they even have Beaglebone Black and 96Board CE or IoT connectors, among others. Support for Qualcomm DragonBoard 410c, Atmel (Arduino) , and STMicro platforms is also being worked on. Their latest feature – AutoBSP – automatically generates device tree files for your custom boards, so you can simply copy it to your favorite image and get started as …

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

Learn More About Linux’s New GPIO User Space Subsystem & Libgpiod

Sysfs was used to control GPIOs on Linux system with the GPIOs defined in /sys/class/gpio, but starting with Linux 4.8, a new GPIO interface for user space was introduced, with gpiochip becoming char devices foudn in /dev/gpiochip0, dev/gpiochip1, etc.. , and sysfs allegedly become deprecated. But a quick check in NanoPi Duo with Linux 4.11 shows both GPIO user space interfaces appear to be enabled: Nevertheless overtime, sysfs will die out, and the new subsystem will likely be used by all systems, so it might be useful to learn more about it. One way to do that is to watch Bartosz Golaszewski’s ELCE 2017 talk entitled “New GPIO Interface for User Space” with the video embedded below. But I first I’ll summarize some of the key points. Now GPIO handling from user space becomes similar to other char driver with ioctl, poll and read functions, and beside assigning numbers to GPIOs you can assign names. The API (in linux/gpio.h) provides …

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

Arm’s Platform Security Architecture Aims to Secure the Internet of Things (IoT)

News are published nearly everyday about a security breach or flaw in IoT devices, and last year, Softbank CEO, and new Arm owner, Masayoshi Son explained that to reach his goal of one trillion IoT devices and singularity, security had to be addressed, as everything was currently too easily hackable, including cars equipped with lots of electronics but very weak security. As Arm Techcon 2017  is underway, the company has been working on improving IoT security and announced the Platform Security Architecture (PSA) designed for low cost IoT devices. PSA has three major components: Threat Models and Security Analyses derived from a range of typical IoT use cases. Architecture specifications for firmware and hardware. An open source project, similar to Arm Trusted Firmware for mobile clients. PSA is designed for low cost IoT devices, which would have not the resources (processing power, memory, battery power…) to run a full Trusted Execution Environment (TEE) , aims at protecting assets such keys, …

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

Secure96 is a 96Boards Mezzanine Expansion Board To Experiment with Hardware Based Security

With the Internet of things booming and taking a more important role in our lives, security will become more and more critical. So far, it has often been an afterthought with modems & routers frequently shipping with default username and password, and getting security right is really hard, as shown by the recent CLKSCREW attack that somehow leverages DVFS to break ARM TrustZone security, and that “is not a software bug, nor a hardware bug, it’s a fundamental part of the energy management design”, so most ARM platforms are vulnerable. Optimal security normally combines software and hardware, so having a platform to experiment with different HW security solutions would be useful, and that’s what Secure96 Mezzanine board for 96Boards aims for. Secure96 expansion board specifications: Security ICs Microchip Atmel ATSHA204A SHA-based CryptoAuthentication crypto element device Microchip Atmel ATECC508A crypto device with ECDH (Elliptic Curve Diffie–Hellman) key agreement Infineon SLB 9670 TPM 1.2/2.0 Storage – EEPROM USB – micro USB port connected …

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