当前位置:网站首页>Five skills of selecting embedded programming language
Five skills of selecting embedded programming language
2022-06-24 17:38:00 【Software test network】

Suggest #1 – Avoid dead or dying language
as time goes on , Programming languages are no longer popular , It's inevitable . Invented a new way of doing things , Invented a new language to solve today's programming problems . The language that used to be used is disappearing , Instead, a new language .
Please note that , Assembly language is the second language in the world 8 The most popular programming language ! however , You know how many people are actively writing applications in assembly language ? in the majority of cases , Assembly language is dead . Of course , We occasionally write assemblers to optimize certain functions , But we don't write assembly language every day . therefore , Please make sure the language you choose is not dead or disappearing .
Suggest #2 – Choose an object-oriented language
Almost every system today can be data driven 、 Object oriented architecture to describe . I believe that many embedded systems naturally fall into this design paradigm , There's no need to torture our designs to get them . however , Choosing a programming language that supports the concept of object-oriented programming is very important to build an extensible and reusable software system .
When we look at the list of programming languages for embedded systems , We will notice a small problem with the first five languages ; C Object oriented and assembly languages are not ! They do not provide the modern toolset that embedded developers need to implement modern software architecture . Besides , These languages require a lot of extra work to get the functionality naturally built into other languages .
Suggest #3 – Use only standardized language
People who build commercial products that must be maintained and updated for many years should not use non standardized language , Unless they can afford the technical debt associated with constantly upgrading software . In image Rust Before the same standardized language , The norms of the language are constantly changing . As language develops and determines the best way to do things , It's changing . This means that you may use a compiler to get the results A, Then use another compiler to get the result B. The same language , Different results , It's all because the language is not standardized !
Although the new language is exciting , But for most enterprises, it makes sense to use standardized language . I believe that the development of these standards and their use have positive significance . image C++ Such a language is a good choice . C++ There is a well-defined standard , The standard is updated every three years . result , It provides developers with new technologies and new functions to improve their software , Make language live . It also provides a consistent standard , In this way, the team does not have to bear the technical debt of change , If they don't want to do this . contrary , They continue to use the standard version they use .
Suggest #4 – Balance language runtime weights
A key consideration for embedded development teams is the runtime weight of their language .
If you check C/C++, You will find that running C The code size required by the application is much smaller than 1 KB. The overhead of running code is negligible or even non-existent , C/C++ With lightweight runtime weights . If you check Python or MicroPython, You will find that this is not the case . MicroPython Interpreters are usually built to 300 – 400 KB Between ! The overhead of running the interpreter is relatively small , But the weight of the interpreter is quite high .
If the cost of memory is considered cheap or unimportant , Then heavyweight runtime may not be a big deal . under these circumstances , Use something like MicroPython Such a language can bring many benefits . for example , Almost everyone knows Python Or you can learn it quickly . Besides , It has strong adaptability , There are more coding standards than people think . Upgrading application code can also be as fast as updating some script modules .
In any case , Embedded development teams should carefully consider the costs associated with the language of their choice . for example ,python、Java、Labview Etc. may have higher runtime costs than other languages .
Suggest #5 – Use the language that suits you
in the final analysis , you ( The team ) You need to decide which features and languages best suit your needs . for example , If the whole industry is turning Python, But assembly language makes more sense , Because you provide a manually optimized library , Then choose assembly language . On the other hand , If you have a bunch of C Legacy code written , And hope to continue to use existing assets , Then please use C.( Or package your C Code and use C++!).
Don't let the language fashion of our time persuade you to change . contrary , Use a meaningful approach and consider the suggestions we discuss in this article .
Embedded developers and teams can indeed choose rich programming languages to develop their embedded software . The language they choose will depend on the type of software they write 、 The needs of companies and the technical debt they incur when maintaining code . When choosing the language to use , The recommendations in this article should provide some additional considerations . When in doubt ,C/C++, In especial C++, May be a good default .
边栏推荐
- Use BPF to count network traffic
- How much does it cost to develop a small adoption program similar to QQ farm?
- Classic examples of C language 100
- The 'ng' entry cannot be recognized as the name of a cmdlet, function, script file, or runnable program. Check the spelling of the name. If you include a path, make sure the path is correct, and then
- Solutions for RTSP video streaming played by several browsers
- How to learn go language happily? Let's go!
- March 27, 2021: give you a head node of the linked list, and rotate the linked list
- Leveldb source code analysis -- writing data
- EasyPlayer流媒体播放器播放HLS视频,起播速度慢的技术优化
- Setting the Arduino environment for tinyml experiments
猜你喜欢

How to create simple shapes in illustrator 2022

NVM download, installation and use

How to decompile APK files
SQL basic tutorial (learning notes)

Etching process flow for PCB fabrication

Error reported after NPM I
Issue 39: MySQL time class partition write SQL considerations
Using flex to implement common layouts
About swagger

Why do you develop middleware when you are young? "You can choose your own way"
随机推荐
专有云TCE COS新一代存储引擎YottaStore介绍
Snapshot management for elastic cloud enterprise
持续助力企业数字化转型-TCE获得国内首批数字化可信服务平台认证
[DB Bao 45] MySQL highly available mgr+consult architecture deployment
Open up the construction of enterprise digital procurement, and establish a new and efficient service mode for raw material enterprises
RestCloud ETL抽取动态库表数据实践
Solutions for RTSP video streaming played by several browsers
Leveldb source code analysis -- writing data
Radiology: contralateral preoperative resting state MRI functional network integration is related to the surgical results of temporal lobe epilepsy
Can yangjianyun's new media operation in 2021 bear all the expectations of the enterprise's private domain traffic demand?
How to create simple shapes in illustrator 2022
Provide secure and convenient Oracle solutions for smart contract developers
[MySQL practice] binlog, a sharp tool for problem analysis
[play with Tencent cloud] check 9 popular Tencent cloud products
腾讯云TCS:面向应用的一站式PaaS 平台
Kubernetes 1.20.5 helm installation Jenkins
How to use SEO to increase the inquiry volume?
Welcome to the network security threat information sharing program
Customizing security groups using BPF
The 'ng' entry cannot be recognized as the name of a cmdlet, function, script file, or runnable program. Check the spelling of the name. If you include a path, make sure the path is correct, and then