Font Size: a A A

Research And Implementation Of A Full System Emulator For Cortex-M Microcontrollers

Posted on:2015-02-13Degree:MasterType:Thesis
Country:ChinaCandidate:M J ZhouFull Text:PDF
GTID:2268330428956388Subject:Electronic and communication engineering
Abstract/Summary:PDF Full Text Request
An embedded full system emulator for ARM Cortex-M microcontrollers is designed and implemented in the paper. At first, the requirement of the system is analyzed based on the comparison of different type of the emulators. Then the system is divided to some different modules. As the result of comparison of some ways for combination of these modules, the system is divided to some processes.According to the features of the instruction set of ARM Cortex-M CPUs, the paper designs an emulator core, implementing the instruction set, the interrupt controller and the address space. The instruction set is implemented in the interpreting way. A kind of address model is proposed in the paper based on the features of ARM architecture. As the advantage of this model, all the address are treated in the same way by the core. The paper concentrates on the NVIC of Cortex-M CPUs, analyzing the difference of NVIC and the exception mechanism of traditional ARM CPUs. Some advanced feature like nested interrupt and interrupt priority are implemented.In addition to the emulator core, the debug module is also designed in the emulator because the debug function is frequently-used in embedded system design. The paper studies the mechanism of remote debug in GDB, concentrating on the relationship of RSP protocol and GDB commands. A GDB Stub is added into the emulator, used to communicate with GDB so that the GDB can be used to debug the programs running on the emulator.The paper proposes a way of software emulation as well as a way of hardware emulation as the requirement of embedded emulator. In the software way, a peripheral model is proposed. Some different way of software emulation is compared. The paper develops one of these ways and implements it as well. Focus on the Systick to introduce how to implement the registers and interfaces of a certain peripheral. Moreover, a hardware way is also proposed. The principle and architecture are introduced. And a hardware interface protocol is defined. In the last, the paper summarized the work and found some future work to do. A list of the shortage of the paper and emulator is given.
Keywords/Search Tags:Emulator, Storage model, GDB Stub, Peripheral model, Hardwareperipheral emulation
PDF Full Text Request
Related items