Michael Zech, Dreamstime.com
Coding Michael Zech Dreamstime L 140572146

简化嵌入式系统开发ment with Open-Source Software

Aug. 9, 2021
Sponsored by Texas Instruments: Embedded software development is a multidimensional effort that you can address by leveraging open-source compiler tools and operating systems.

Memberscandownload this article in PDF format.

The design, integration, and deployment of embedded-system software presents many challenges related to the operating system, development environment, middleware, compiler, and other software tools.Although you can purchase commercial software products to meet many of your requirements, you might find that open-source tools offer the optimum approach to some or all or your embedded software needs. But be sure to evaluate the tradeoffs before committing to a specific approach.

Commercial software generally comes with training and support. On the other hand, with open-source software you’ll assume more development responsibility—but you can seek support from the open-source development community. Taking a mixed approach, you choose a commercial software package and employ open-source plug-ins or opt for versions of open-source software maintained and supported by a commercial software vendor. Several companies, for example, offer commercial versions of the open-source Linux operating system.

You also want to make sure that the vendor of your target processor supports open-source software.One such vendor is Texas Instruments, which supports the mainline Linux kernel and the kernel.org community organization. TI incorporates kernel.org’s most recent, stable kernels into the software-development kits (SDKs) that support its Arm-based embedded processors.

TI provides new features and functionality as well as TI’s bug fixes to the kernel.org community so that these improvements can be incorporated into mainline Linux. In turn, TI fully evaluates, documents, tests, and productizes SDKs utilizing mainline Linux kernels for its major processors.

Due to the constant evolution of open-source projects, developers often face the dilemma of when to upgrade to a more recent Linux kernel version. The benefits of new features, functionality, and bug fixes incorporated in the new kernel must be weighed against the costs of migration, which include unexpected effects that can require considerable time and effort to overcome.

例如,在migrati丢弃一个补丁on process may have ramifications throughout the software environment, and changes during migration can make maintaining continuity in the code base difficult—thereby potentially compromising a software engineering team’s previous development investment. TI looks to reduce the cost of migrations by allowing users to take advantage of a new kernel version’s advantages. Its support ensures an efficient development environment and avoids the disruption and distraction that can accompany a migration to a new kernel, enabling orderly migration when necessary.

Sponsored Resources:

Open-Source Compiler Tools

In addition, you can leverage open-source software for compiler technology, as exemplified by the LLVM open-source project, which consists of a collection of modular and reusable compiler toolchain building blocks for creating compilers. (The LLVM Foundation emphasizes that LLVM is not an acronym.) A subproject of LLVM is Clang, a C/C++ compiler front end.

Clang offers several advantages, including compatibility with software written for the Gnu Compiler Collection (GCC). Compared with GCC, Clang produces faster, more efficient code that can more easily fit within a memory-constrained device, minimizing the need to choose a costlier device with more memory.

LLVM and Clang have benefited from the support of companies including Apple, Arm, Google, and Microsoft.德州仪器公司’ support includes TI Arm Clang, a new set of compiler tools for TI Arm Cortex microcontrollers. TI Arm Clang combines the Clang front end and LLVM optimizer with proprietary technology, such as TI’s linker and optimized C runtime library, to deliver optimal code size and minimize runtime footprints.Figure 1illustrates how Clang, the LLVM optimizer, and the TI linker and C runtime library fit together.


The TI Arm Clang toolchain produces efficient code as shown inFigure 2,它描述了代码大小的选择ftware stacks—CoreSDK (including the real-time operating system and drivers), OpenThread, and the IEEE 802.15.4g stack—that are part of the SDKs for SimpleLink MCUs. The figure then compares the code size produced by TI Arm Clang (tiarmclang) to GCC and the previous TI Arm compiler (armcl).


AsFigure 2illustrates, for the CoreSDK, TI Arm Clang produces code that’s 5% smaller than code produced by GCC and 3.5% smaller than code produced by armcl. These percentages may seem minor, but they can determine whether your application will fit into your chosen device’s memory. In addition, Texas Instruments has reported that it plans to make further improvements to TI Arm Clang in 2021 that will significantly impact code size.

In addition to being compatible with code written for GCC, TI Arm Clang is supported by the latest SDKs for TI’s CC3220, CC3230, CC3235, CC1312, CC1352, CC2642, and CC2652 microcontrollers. The SDKs include sample projects for TI Arm Clang as well as support for previous compilers. (TI has reported it will not introduce new features for armcl, but it will continue regular maintenance releases for bug fixes.) You can use TI Arm Clang today to develop Wi-Fi, Bluetooth Low Energy, Zigbee, IEEE 802.15.4, and other applications.

TI Arm Clang also offers support for code coverage (including function, line, region/statement, and branch coverage), a feature that’s becoming increasingly important for functional-safety applications. In addition, current users of armcl will find that porting code or projects to TI Arm Clang is a smooth, simple process. TI Arm Clang uses the same TI linker as armcl; therefore, users needn’t modify the linker command file.

Conclusion

Open-source software can offer advantages in many embedded applications, from Bluetooth Low Energy to IEEE 802.15.4 low-rate wireless networks. Nevertheless, it also presents challenges, such as forgoing the training and support that generally come with commercial software. Nevertheless, you may be able to bring the necessary open-source expertise in house with the help of the open-source community.

Open-source software tools span operating systems like Linux to LLVM compiler tools. With respect to the latter, the TI Arm Clang toolchain compiles efficient code while preserving compatibility, allowing you to leverage source code written for GCC and keep your code base portable.

Sponsored Resources:

From Our Partners

CISPR 25 Class 5 2.2-Mhz Rated 30-W Automotive Dual USB Type-C ® Charger Reference Design

A fully assembled board has been developed for testing and performance validation only, and is not available for sale.. Download ready-to-use system f…

Isolated Power Architecture Reference Design for Communication and Analog Input/Output Modules

A fully assembled board has been developed for testing and performance validation only, and is not available for sale.. Download ready-to-use system f…

65-W USB Type-C™ High Density Active Clamp Flyback with GaN Reference Design

A fully assembled board has been developed for testing and performance validation only, and is not available for sale.. Download ready-to-use system f…

30-W/In3, 93.4% Efficiency, 100-W AC/DC Adapter Reference Design

A fully assembled board has been developed for testing and performance validation only, and is not available for sale.. Download ready-to-use system f…

>95% Efficiency, 1-kW Analog Control AC/DC Reference Design for 5G Telecom Rectifier

A fully assembled board has been developed for testing and performance validation only, and is not available for sale.. Download ready-to-use system f…

UCC12050DVE isolated DC-DC converter evaluation module

Overview. Order & start development. TI's Standard Terms and Conditions for Evaluation Items apply.. Technical documentation. Content is provided "as is"…

Voice your opinion!

This site requires you to register or login to post a comment.
No comments have been added yet. Want to start the conversation?

From Our Partners

CISPR 25 Class 5 2.2-Mhz Rated 30-W Automotive Dual USB Type-C ® Charger Reference Design

A fully assembled board has been developed for testing and performance validation only, and is not available for sale.. Download ready-to-use system f…

Isolated Power Architecture Reference Design for Communication and Analog Input/Output Modules

A fully assembled board has been developed for testing and performance validation only, and is not available for sale.. Download ready-to-use system f…

65-W USB Type-C™ High Density Active Clamp Flyback with GaN Reference Design

A fully assembled board has been developed for testing and performance validation only, and is not available for sale.. Download ready-to-use system f…

30-W/In3, 93.4% Efficiency, 100-W AC/DC Adapter Reference Design

A fully assembled board has been developed for testing and performance validation only, and is not available for sale.. Download ready-to-use system f…

>95% Efficiency, 1-kW Analog Control AC/DC Reference Design for 5G Telecom Rectifier

A fully assembled board has been developed for testing and performance validation only, and is not available for sale.. Download ready-to-use system f…
2018beplay

Microsoft Lures Away Key Apple Engineer to Work on Server Chips

Jan. 14, 2022
The departure is a blow to Apple, which recently lost another top chip engineer, Jeff Wilcox, to Intel.
2018beplay

Intel Replaces Departing Head of PC Unit, Hires New Finance Chief

Jan. 13, 2022
Gregory Bryant is stepping down as leader of the PC unit at Intel. The semiconductor giant is tapping Michelle Johnston Holthaus, EVP of sales, marketing, and communications at...
Baidu