Software injection technology based on C8051F023 (1)

Publisher:RadiantBreezeLatest update time:2011-02-28 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The emergence of single-chip microcomputers is a milestone in the development of modern computer technology. Its birth marks the formal formation of two major branches of computers: general-purpose computer systems and embedded computer systems. In recent years, computer theory research, semiconductor technology and ultra-large-scale integrated circuit technology have made great progress, and embedded computers supported by them have gradually become the core components of various embedded systems.

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

Due to the advantages of expansion, it has become the mainstream of various control applications. This embedded system for control is also widely used in various fields. Due to the structural characteristics, faster computing speed and larger storage capacity, the single-chip MCU is not only used for control, but also gradually used for various computing applications. Therefore, software injection for MCU is the most common and representative application in embedded systems. The following will discuss the implementation of software injection based on C8051F023 .

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.

Embedded system software injection schematic

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.

Software injection implementation 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.

Reference address:Software injection technology based on C8051F023 (1)

Previous article:Design of CAN bus intelligent node based on C8051F040
Next article:Software injection technology based on C8051F023 (2)

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号