- December 21, 2015 at 4:50 pm #52282
I’ve recently started implementing a small operating system with my students. The OS is supposed to run on ChipKIT WiFire board (PIC32MZ processor). Git repository is available here: https://github.com/cahirwpz/wifire-os.
We’re using unofficial patches to Qemu provided by Serge Vakulenko available here: https://github.com/sergev/qemu. I’m somewhat disappointed that this branch is not officially supported by ImgTec nor by Microchip. It’s quite complete, to the point it’s able to run LiteBSD operating system, however certain interesting features are missing. For instance: simulation of External Interrupt Controller is not really fully implemented and we’re expecting more things to be broken.
We’d like to use some more advanced simulators that will implement microAptive core as described in official documentation. What kind of software could we use? Could we obtain IASim copy for academic use?December 21, 2015 at 8:18 pm #52285
I’ve asked for inputs on this.
First suggestion is to use the Simultor in Microchip’s MPLAB XDecember 22, 2015 at 2:56 pm #52292
We got a helpful reply from Serge Vakulenko:
“This version of QEMU has been created as a tool in developing LiteBSD OS. It implements a subset of PIC32MZ peripherals required to run LiteBSD, namely:
• External interrupt controller [EIC], a subset of MZ spec
• UART ports
• SPI ports
• SD card, connected to SPI port
• GPIO ports, a minimal functionality
• Ethernet port
• Dummy MZ system controller, prefetch controller, PPS registers, timers and USB port
In it’s current state, the simulator is neither functionally complete with respect to the MZ specification, nor verified with any trusted PIC32MZ tests. But it’s still a helpful tool in developing sensitive OS internals like context switching, exception processing and virtual memory mapping. Currently it’s the most advanced PIC32 simulator available.
A few months ago I took an effort to push these changes into main QEMU repository. The process turned out to be too time consuming as it requires a lot of discussions with QEMU team, code reviews, and finally resulted in a need for essential code redesign. QEMU team insists on implementing all the peripherals as separate objects with a predefined API, which would substantially increase the code size. Methodologically it’s OK, but I just don’t have extra two months to spend on it…. LiteBSD is still my hobby project!
The current intent is to continue development of PIC32 QEMU as part of PRPL initiative.
It would be great if Microchip joined the PIC32 QEMU project. The chip is so rich in peripherals. Every peripheral has to be not only implemented, but also verified with some trusted tests. I’m sure Microchip has such tests – and in this case we can be sure the simulator is functionally complete and accurate. Potentially, QEMU can replace the current simulator in the MPLAB X toolchain. It’s a big project though, and requires significant engineering resources.
IASim can be an alternative to QEMU, but it lacks all the PIC32 peripherals and EIC as well. Actually, I’ve started LiteBSD development with the PIC32 simulator based on IASim. You can find the sources on GitHub [https://github.com/sergev/pic32sim]. Later I’ve rebased it to QEMU as a a free alternative. IASim/OVPsim has some benefits: it’s much more accurate in modeling TLB state, especially ASID behavior. In most other aspects QEMU is as good, and notably faster.”
Sergey, many thanks.