Embedded systems are application-centric and computer-based systems. Software and hardware can be tailored. They are suitable for special computer systems that have strict requirements on functions, reliability, cost, volume, and power consumption. They are a product of highly integrated software and hardware. The key to realizing their system functions lies in various application software designed with high efficiency. Unlike general-purpose computer software, software in embedded systems is generally solidified in read-only memory, rather than being replaced at will on disks. Therefore, application software in embedded systems has a long life cycle, just like embedded products. In addition, application systems and products in various industries rarely make sudden jumps. Therefore, software in embedded systems also emphasizes inheritability and technical connectivity, and has a relatively stable development. The above two points make it possible to complete software upgrades of embedded systems based on the original hardware platform, thereby saving users' costs and improving product competitiveness and service efficiency of system suppliers. Software injection is one of the technologies that can achieve this software upgrade method.
In terms of embedded systems, software injection refers to the use of online programmable memory to store software modules in embedded systems, which can be injected through external injection devices when needed. It is very helpful for software upgrades and improvements of embedded systems that require tight packaging, such as mechatronics products.
1 Feasibility Analysis of Software Injection
Among all kinds of embedded computers, microcontroller MCU (Micro Controller Unit) has low power consumption, high reliability, rich on-chip peripheral resources and easy
|
To achieve software injection, the MCU used in the embedded system must have in-system programmability, that is, the program memory supports erasing and rewriting of application programs. In addition, the embedded system should have a large program storage space and a fast running speed so that it can store and calculate more complex software algorithms.
C8051F023 belongs to Cygnal's C8051F series. The chip core CIP-51 adopts a pipeline instruction structure, with a maximum speed of 25MIPS (Million Instructions Per Second), and 70% of the instructions can be completed within 1 to 2 system clock cycles, which provides the necessary conditions for embedded devices to use complex algorithms. At the same time, the chip integrates a 64KB Flash memory for program code and non-volatile data storage, and the software can use MOVX instructions to program the Flash memory in the system.
From the above analysis, we can see that C8051F023 has all the conditions to implement software injection.
2 Technical measures and implementation solutions for software injection
General-purpose computers have a complete human-machine interface, and you can add some development applications and environments to develop yourself. However, embedded systems do not have the ability to bootstrap development, so they must have a set of development tools and environments to develop. These tools and environments are generally based on software and hardware devices on general-purpose computers, as well as various logic analyzers, mixed signal oscilloscopes, etc. Figure 1 shows a software injection implementation solution based on a general-purpose computer platform.
Figure 1 Schematic diagram of embedded system software injection
As can be seen from Figure 1, in order to achieve software injection, in addition to having relevant development tools (such as VC++, VB, Delphi, etc.) running on a general-purpose computer platform, it is also necessary to formulate software injection procedures and develop software injection equipment. The injection procedure includes the mechanical and electrical characteristics of the physical interface between the embedded system and the injection equipment, the communication protocol with password verification function and error control mechanism, etc.; the injection equipment is divided into injection cards and injection guns. The former uses the standard interface of general computers such as RS232, USB, etc. to interconnect with general computers, and is used to input software programs into the injection gun, and can also be directly injected into embedded devices. The latter is a mobile injection device, which is convenient for completing software upgrade services for embedded systems that are not local.
After developing the software injection procedure and having the corresponding injection equipment, it is necessary to solve the connection problem between the new injection program and the firmware in the MCU to realize the function of the new injection code. Figure 2 shows a solution based on C8051F023.
Figure 2 Software injection implementation based on C8051F023
This solution is a functional modular solution based on MCU. With the support of the main program module and boot loader module solidified in Flash, module 1, module 2, module 3, etc. can all update the program code. The main program module in the solution completes the initialization of the MCU and some default settings required by the injectable module, while the unavailable sector and reserved sector are the characteristics of C8051F023. The former provides chip security options, but does not support in-system programmability of applications; the latter is factory-specific and cannot store user programs.
In the address space of 0x1000~0xFBFF, each module is a relatively independent software code with a certain function. The address space it occupies can be defined and modified through pseudo instructions according to the size of the program code. When the memory capacity is large, the remaining address space can be reserved for storing newly added functional module codes.
Previous article:Design of CAN bus intelligent node based on C8051F040
Next article:Software injection technology based on C8051F023 (2)
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Initial performance test of R329 development board
- Arteli-AT32F4xx timer input capture mode
- How to capture the instantaneous waveform with an oscilloscope and automatically lock it?
- What is the difference between classic Bluetooth and Bluetooth Low Energy?
- Prize-giving activity - the embedded operating system I know
- MCU obtains the network camera video stream problem, please help! ! !
- msp430f5529 capture plus serial port source code
- Share: Regarding the 2021 eSports race, you must be familiar with these!
- Conversion from C to VHDL in SOC system.rar
- Learn knowledge and win gifts | Tektronix Semiconductor Materials and Device Test Technology Power Characteristics!