Elektor Mag - embedded world Special - Sample

Page 32

ELEKTOR INDUSTRY

What’s New in Embedded Development?

Rust and Keeping IoT Deployments Updated

Embedded Development By Stuart Cording (Elektor)

While the products embedded systems engineers release to the market make it seem like technology is moving forward rapidly, the industry itself is, by comparison, slow. That’s why it was such a shock when Raspberry Pi, the renowned single-board computing creator, brought out the RP2040 microcontroller (MCU) with its dual Cortex-M0+ cores and no onboard flash. Dualcore in this class of devices is unheard of. But that is about as exciting as it has got. Progress in the world of embedded systems is otherwise measured, meaningful, and considered. But several developments are underway that could change embedded development in the decade ahead, as we shall see.

32 embedded world Special 2022 www.elektormagazine.com

Embedded software development without C is almost impossible to imagine. As assembler became too cumbersome to develop entire applications, C displaced it except in specific cases when highly-optimized, hand-coded assembler was the only option. The language, developed by Dennis Ritchie [1] at Bell Labs, provides enough flexibility to develop complex applications while also providing easy access to registers. This is critical to writing compact microcontroller code that handles register accesses in interrupt routines. It is also easy to implement tasks such as bit manipulation of registers. And, unlike code written in assembler, the resultant code is easier to read. C also ranks consistently as a preferred programming language, ranking in the top three programming languages in surveys and market analyses (Figure 1) [2][3].

C Is Old

However, C, developed in 1972, is now 50 years old. It has a range of limitations that are well known, many of which relate to the use of pointers. While pointers make it easy for embedded developers to access registers, they can also result in unwanted out-of-bounds memory accesses. Additionally, compared to more modern programming languages, C compilers undertake comparatively few code checks. As a result, unused variables are simply ignored, something which could signify a coding mistake. To ensure unsafe C code is not integrated into embedded systems, developers use coding standards such a MISRA C [4]. This standard came about as C grew in importance in the automotive industry as a programming language for embedded systems. C++ resolves some


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.