Skip to content

add support for pic32 microcontrollers

Serge Vakulenko qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest16 patches 13 repliesIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16pic32: make the CPU clock frequency configurable per platformhw/mips/cputimer.c hw/mips/mips_fulong2e.c hw/mips/mips_jazz.c +5 more+15 -151 reply
2/16pic32: use LCG algorithm for generated random index of TLBWR instructionhw/mips/cputimer.c+6 -32 replies
3/16pic32: add support for external interrupt controller mode (EIC)hw/mips/cputimer.c hw/mips/mips_int.c target-mips/cpu.h +1 more+41 -101 reply
4/16pic32: add two MIPS processor variants: M4K and microAptivUPtarget-mips/translate_init.c+46 -02 replies
5/16pic32: add file pic32_peripherals.hhw/mips/pic32_peripherals.h+210 -03 replies
6/16pic32: add file pic32mx.hhw/mips/pic32mx.h+1290 -00 replies
7/16pic32: add file pic32mz.hhw/mips/pic32mz.h+2093 -00 replies
8/16pic32: add file mips_pic32mx7.chw/mips/mips_pic32mx7.c+1641 -01 reply
9/16pic32: add file mips_pic32mz.chw/mips/mips_pic32mz.c+2829 -00 replies
10/16pic32: add file pic32_load_hex.chw/mips/pic32_load_hex.c+238 -00 replies
11/16pic32: add file pic32_uart.chw/mips/pic32_uart.c+228 -01 reply
12/16pic32: add file pic32_gpio.chw/mips/pic32_gpio.c+39 -00 replies
13/16pic32: add file pic32_spi.chw/mips/pic32_spi.c+121 -01 reply
14/16pic32: add file pic32_sdcard.chw/mips/pic32_sdcard.c+428 -01 reply
15/16pic32: add file pic32_ethernet.chw/mips/pic32_ethernet.c+557 -00 replies
16/16pic32: update makefiles to cover pic32 supportdefault-configs/mipsel-softmmu.mak hw/mips/Makefile.objs+4 -00 replies

Reviews trailers per patch

2 of 16 patches have a Reviewed-by or Acked-by.

PatchAurelien Jarno
1/16
2/16R-b
3/16
4/16R-b
5/16
6/16
7/16
8/16
9/16
10/16
11/16
12/16
13/16
14/16
15/16
16/16

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH pic32 v3 00/16] add support for pic32 microcontrollers

Please find below a set of patches, which allow to simulate Microchip PIC32 microcontrollers on QEMU. For examples of real PIC32 applications running on QEMU, see page: https://github.com/sergev/qemu/wiki

(1) Make the CPU clock frequency configurable per platform. Currently the clock rate for all MIPS platforms is fixed at 100MHz. Need to make it 40MHz for pic32mx7.

(2) For TLBWR instruction, the generated random index value has been not quite random and did not take into account the Wired register value. Fixed.

(3) Added support for external interrupt controller mode (EIC). Required for pic32.

(4) Added two processor variants: M4K and microAptivUP. Needed for pic32mx and pic32mz simulation.

(5) Added two machine platforms: Microchip pic32mx7 and pic32mz microcontrollers. Several board types supported for each platform:

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

Sergey (16):
pic32: make the CPU clock frequency configurable per platform
pic32: use LCG algorithm for generated random index of TLBWR
instruction
pic32: add support for external interrupt controller mode (EIC)
pic32: add two MIPS processor variants: M4K and microAptivUP
pic32: add file pic32_peripherals.h
pic32: add file pic32mx.h
pic32: add file pic32mz.h
pic32: add file mips_pic32mx7.c
pic32: add file mips_pic32mz.c
pic32: add file pic32_load_hex.c
pic32: add file pic32_uart.c
pic32: add file pic32_gpio.c
pic32: add file pic32_spi.c
pic32: add file pic32_sdcard.c
pic32: add file pic32_ethernet.c
pic32: update makefiles to cover pic32 support

 default-configs/mipsel-softmmu.mak |    1 +
 hw/mips/Makefile.objs              |    3 +
 hw/mips/cputimer.c                 |   41 +-
 hw/mips/mips_fulong2e.c            |    2 +-
 hw/mips/mips_int.c                 |    8 +-
 hw/mips/mips_jazz.c                |    2 +-
 hw/mips/mips_malta.c               |    4 +-
 hw/mips/mips_mipssim.c             |    2 +-
 hw/mips/mips_pic32mx7.c            | 1641 +++++++++++++++++++++
 hw/mips/mips_pic32mz.c             | 2829 ++++++++++++++++++++++++++++++++++++
 hw/mips/mips_r4k.c                 |    2 +-
 hw/mips/pic32_ethernet.c           |  557 +++++++
 hw/mips/pic32_gpio.c               |   39 +
 hw/mips/pic32_load_hex.c           |  238 +++
 hw/mips/pic32_peripherals.h        |  210 +++
 hw/mips/pic32_sdcard.c             |  428 ++++++
 hw/mips/pic32_spi.c                |  121 ++
 hw/mips/pic32_uart.c               |  228 +++
 hw/mips/pic32mx.h                  | 1290 ++++++++++++++++
 hw/mips/pic32mz.h                  | 2093 ++++++++++++++++++++++++++
 include/hw/mips/cpudevs.h          |    2 +-
 target-mips/cpu.h                  |    9 +-
 target-mips/helper.c               |   18 +-
 target-mips/translate_init.c       |   46 +
 24 files changed, 9786 insertions(+), 28 deletions(-)
 create mode 100644 hw/mips/mips_pic32mx7.c
 create mode 100644 hw/mips/mips_pic32mz.c
 create mode 100644 hw/mips/pic32_ethernet.c
 create mode 100644 hw/mips/pic32_gpio.c
 create mode 100644 hw/mips/pic32_load_hex.c
 create mode 100644 hw/mips/pic32_peripherals.h
 create mode 100644 hw/mips/pic32_sdcard.c
 create mode 100644 hw/mips/pic32_spi.c
 create mode 100644 hw/mips/pic32_uart.c
 create mode 100644 hw/mips/pic32mx.h
 create mode 100644 hw/mips/pic32mz.h

--
2.2.2