Skip to content
hxdyxd edited this page Apr 7, 2020 · 3 revisions

arm_emulator

C/C++ CI

Introduction

Simple armv4 emulator with embedded freertos and linux operating system support

Currently supported features

  • All ARMv4 instructions
  • Interrupts (timer interrupt, 8250 serial interrupts)
  • Prefetch Abort, Data Abort, Undefined instruction, IRQ ,FIQ exceptions
  • CP15 coprocessor, Memory Management Unit(MMU) and Translation Lookaside Buffer(TLB)
  • Network support via serial port and TUN/TAP devices for host
  • Console support via serial port
  • Step by step running

Other codes

Usage Example

./arm_emulator -m bin -f hello.bin
./arm_emulator -m bin -f hello.bin
./arm_emulator -m linux -f zImage -r rootfs.ext2
./arm_emulator -m linux -f Image -t arm-emulator.dtb -r rootfs.ext2

Usage

  usage:

  arm_emulator
       -m <mode>                  Select 'linux' or 'bin' mode, default is 'bin'.
       -f <image_path>            Set image or binary programme file path.
       [-r <romfs_path>]          Set ROM filesystem path.
       [-t <device_tree_path>]    Set Devices tree path.
       [-d]                       Display debug message.
       [-s]                       Step by step mode.

       [-v]                       Verbose mode.
       [-h, --help]               Print this message.

Reference: https://github.com/hxdyxd/arm_emulator

Build armemulator

make V=1 STATIC=1
sudo make install

Build linux zImage with buildroot

sudo apt-get install libncurses-dev flex bison bc
sudo apt-get install unzip rsync python3 texinfo
git clone https://github.com/hxdyxd/buildroot
cd buildroot
make armemulator_defconfig
make menuconfig
make
ls output/images/

Reference