Site Information

 Loading... Please wait...

Blog

C Programming For The Internet-Of-Things (IoT) Under Linux

Posted by Technical Literature on

Applying C For The IoT With Linux

Applying C is the book you need if you are programming for Single Board Computers (SBCs) that operate under Linux, or if you perform any coding in C that interacts with the hardware. As there is not the right name for this body of knowledge, it is not easy to find a single source for it. This book collects all of these low-level, hardware-oriented, and often hardware-specific ideas. As such, it is a reasonably advanced book. This is not to say that it is difficult, but it does assume that you already know how to program in C and that you know the essential idioms of C.

Starting from the straightforward task of making a program run automatically, we look at how your program works with user-mode Linux. If you are working with hardware, arithmetic cannot be ignored, and separate chapters are dedicated to integer, fixed-point, and floating-point arithmetic. Equally, to handle I/O you need to have a solid grasp of files and the pseudo-file system. The dev/mem file, coupled with memory-mapped files, makes it possible to work with raw memory without leaving user mode. Sockets are a general-purpose method of communicating over networks and related infrastructure, and here the focus is on transmitting data over the internet. For this, we build a web client and a server.

Next, we examine graphics, which you might find unusual in a book on small systems, but these days even small systems have GPUs, and graphics come as standard. It is customary to think of adding low-cost output devices such as 7-segment displays to IoT devices. Still, with low-priced HDMI/DVI displays available, it becomes cost-effective to use the built-in graphics hardware in a straightforward approach.

After this, we turn to the idea of multi-tasking using Pthreads. As well as looking at threads, we contemplate locking, using mutex and condition variables, and scheduling. Although interrupts do not exist in user-mode Linux, we can get very close using poll and threading. Now that multiple cores are a feature of even low-cost SBC, in later chapters, we cover managing cores, look at C11’s atomics and introduce its memory models and barriers. Finally, we take a quick look at how to incorporate assembler with C.

More Information...


Raspberry Pi 3 B+ System With Dual CAN Bus Interface

Raspberry Pi 3 B+ System With Dual CAN Bus Interface

The Raspberry Pi 3 System With Dual CAN Bus Interface (PiCAN2-DUO) comes with a pre-installed Raspbian operating system.

The system is equipped with a PiCAN2 DUO board, depending on the selected option, with or without SMPS (Switch Mode Power Supply). The SMPS allows the powering of the whole system, i.e. the Raspberry Pi and the PiCAN board, per external power connection (e.g. the 12 VDC supply in a vehicle).

The Raspberry Pi 3 B+ is equipped with a high-performance heatsink set to reduce chip hot-spots and to increase the thermal dissipation surface area.

The PiCAN2 DUO board provides Controller Area Network (CAN) Bus capabilities for the Raspberry Pi. It uses the Microchip MCP2515 CAN controller with MCP2551 CAN transceiver. Connection are made via 4-way screw terminals.

There is an easy-to-install SocketCAN driver, and programming can be accomplished in C or Python.

More Information...

Practical Guides To Mastering Embedded Linux Programming

Mastering Embedded Linux Programming: Unleash the full potential of Embedded Linux with Linux 4.9 and Yocto ProjectThis complete guide shows the technologies and techniques needed to incorporate Linux into embedded systems. The reader will begin by learning about the essential elements that underpin all embedded Linux projects: the toolchain, the bootloader, the kernel, and the [...]

Read More »


SAE J13939 Data Recorder With Raspberry Pi Zero

Our jCOM.J1939.USB gateway board is a vehicle network adapter for SAE J1939 applications, which allows any host device with a USB COM port to monitor SAE J1939 data traffic and communicate with the SAE J1939 vehicle network.The board supports the complete SAE J1939 protocol according to SAE J1939/81 Network Management (Address Claiming) and SAE J1939/21 [...]

Read More »


Fanless Embedded System With NXP i.MX 8M Processor With Isolated CAN Bus Port For In-Vehicle Applications

Axiomtek, a design and manufacturing company in the industrial computer and embedded field, announced the release of their Agent336, a RISC-based fanless embedded box PC certified for in-vehicle applications. The Agent336 measures 6.46" x 4.65" x 1.7" and weighs about 2.2 lbs. The embedded computer can endure harsh operating environments with an operating temperature range [...]

Read More »


8th Generation Intel Core Motherboard Designed For AIoT Applications

iBASE Technology, a manufacturer of embedded boards and industrial computing systems, announced its MT800M-P, an NVIDIA MXM compatible motherboard designed for AIoT applications. The MT800M-P supports the latest 8th Generation Intel Core processor family, allowing customers to profit from enhanced processing and graphics performance and interfacing capacity.Given the growing need for AI-enabled inference platforms, IBASE developed the [...]

Read More »


Industrial IoT Gateway With CAN Bus Port Compatible With Windows 10 IoT And Linux Operating Systems

Axiomtek, a design and manufacturing company in the industrial computer and embedded field, announced its ICO320-83C, a fanless DIN-rail embedded system with four RJ-45 Gigabit PoE ports for facility monitoring systems, IP video surveillance, Access Point, and intercoms.It represents an industrial IoT gateway that comes with IP40-rated heavy-duty aluminum extrusion and steel enclosure for application [...]

Read More »


Raspberry Pi 4 Step-By-Step Guides To Innovative Linux Projects

RASPBERRY PI 4 COMPLETE MANUAL: A Step-by-Step Guide to the New Raspberry Pi 4 and Set Up Innovative ProjectsThe Raspberry Pi 4 can accomplish a remarkable variety of embedded applications. Amateur technology enthusiasts use Raspberry Pi boards as media centers, file servers, retro games consoles, routers, and network-level ad-blockers, for starters. However, that is just [...]

Read More »


NXP i.MX8X System-on-Module (SoC) With Up To Three CAN FD Ports

Compulab (Israel) introduced their CL-SOM-iMX8X System-on-Module (SoM) whose processor is part of NXP’s i.MX8X System-on-Chip (SoC) family and provides three CAN FD ports. The module has been created with the vast I/O capabilities of the i.MX8X SoC in mind. Besides the three CAN FD ports, other peripheral interfaces include PCI Express, dual 1-Gbit/s Ethernet, USB ports, four UARTs, [...]

Read More »


IoT Enabled Single Board Computer With Arm Cortex-A53 i.MX 8 Processor

iBASE Technology, a manufacturer of industrial PCs and embedded computing systems, announced the release of their IBR210 3.5-inch single-board computer (SBC) featuring NXP’s dual or quad-core Arm Cortex-A53 i.MX 8 processors in 1.3GHz and 1.5GHz CPU frequencies. The board is suitable for applications such as multiple signage displays at airports, train and bus stations, and shopping [...]

Read More »


IoT-Ready Computer-On-Module With Two CAN Bus Ports And Linux Operating System

The TS-4100 by Technologic Systems is a low power, high-performance Computer-on-Module powered by the NXP i.MX 6UltraLite ARM® Cortex®-A7 core that is running at up to 695 MHz clock frequency. The standard power consumption is approximately 300 mW with up to 1 GB RAM, 4 GB eMMC flash, 32 bit programmable off-load engine, microSD with UHS support (up to [...]

Read More »