Skip to content
Serge Vakulenko edited this page Jan 21, 2015 · 28 revisions

How to build QEMU for MIPS

On Ubuntu Linux, use these commands:

$ sudo apt-get install libpixman-1-dev libfdt-dev
$ git clone https://github.com/sergev/qemu.git
$ cd qemu
$ ./configure --prefix=/usr/local/qemu-mips --target-list=mipsel-softmmu
$ make
$ make install

It will build QEMU for MIPS (little endian) and install the binaries to /usr/local/qemu/mips directory. You can choose whatever destination you want.

Supported PIC32 microcontrollers and boards

Machine selector Microcontroller and board
pic32mx7-explorer16 PIC32MX7 on Microchip Explorer-16 board
pic32mx7-max32 PIC32MX7 on chipKIT Max32 board
pic32mx7-maximite PIC32MX7 on Geoff's Maximite board
pic32mz-explorer16 PIC32MZ on Microchip Explorer-16 board
pic32mz-meb2 PIC32MZ on Microchip MEB-II board
pic32mz-wifire PIC32MZ on chipKIT WiFire board

To select the processor and board, use "-machine" option. Different boards use different assignments for console UART port, and SPI port for SD card.

Run PIC32 simulation

(TODO)

You can get the binary files, mentioned below, using these links:

  • boot-max32.hex - bootloader image for chipKIT Max32 board
  • hello-max32.hex - simple application example for Max32 board (sources)
  • unix.hex - kernel of RetroBSD operating system for Max32 board
  • retrobsd.img - filesystem image for RetroBSD (download and unzip)
  • boot-wifire.hex - bootloader image for chipKIT WiFire board
  • vmunix.hex - kernel of LiteBSD operating system for WiFire board
  • litebsd.img - filesystem image for LiteBSD (download and unzip)

Run 'Hello World' application on Max32 board:

/usr/local/qemu-mips/bin/qemu-system-mipsel -machine pic32mx7-max32 \
    -nographic \
    -monitor none \
    -serial stdio \
    -bios boot-max32.hex \
    -kernel hello-max32.hex

Run RetroBSD on Max32 board:

/usr/local/qemu-mips/bin/qemu-system-mipsel -machine pic32mx7-max32 \
    -nographic \
    -monitor none \
    -serial stdio \
    -bios boot-max32.hex \
    -kernel unix.hex \
    -sd retrobsd.img

Run LiteBSD on WiFire board:

/usr/local/qemu-mips/bin/qemu-system-mipsel -machine pic32mz-wifire \
    -nographic \
    -monitor none \
    -serial vc \
    -serial vc \
    -serial vc \
    -serial stdio \
    -bios boot-wifire.hex \
    -kernel vmunix.hex \
    -sd litebsd.img
Clone this wiki locally