MIPS32 port

ChibiOS public support forum for topics related to the micro-controllers based on MIPS32 cores.
Dmytro
Posts: 98
Joined: Sun Oct 07, 2012 11:49 am

Re: MIPS32 port

Postby Dmytro » Sun Nov 11, 2012 5:12 pm

Hi MaBl,
mabl wrote:do you run the kernel test cases in qemu? If so, is there a documentation on how to get the serial output? What hardware does qemu simulate for serial?
Yes I did. QEMU is emulating i8250 serial device and the driver is available for chibi-mips-qemu.
You should launch qemu with -nographic option as I didn't try to cook a driver for VGA.

best regards,
-- dmytro

Dmytro
Posts: 98
Joined: Sun Oct 07, 2012 11:49 am

Re: MIPS32 port

Postby Dmytro » Sun Nov 11, 2012 5:16 pm

All the documentation for MIPS-QEMU is in the readme: https://github.com/niamster/ChibiOS/tre ... /MIPS-QEMU

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: MIPS32 port

Postby mabl » Sun Nov 11, 2012 5:18 pm

Dmytro wrote:Hi MaBl,
mabl wrote:do you run the kernel test cases in qemu? If so, is there a documentation on how to get the serial output? What hardware does qemu simulate for serial?
Yes I did. QEMU is emulating i8250 serial device and the driver is available for chibi-mips-qemu.
You should launch qemu with -nographic option as I didn't try to cook a driver for VGA.

Very interesting, probably this driver would also work for cortex m3 simulation and qemu, right? I'm thinking of adding automated testing of kernels to chibios...

Dmytro
Posts: 98
Joined: Sun Oct 07, 2012 11:49 am

Re: MIPS32 port

Postby Dmytro » Sun Nov 11, 2012 6:26 pm

mabl wrote:
Dmytro wrote:Hi MaBl,
mabl wrote:do you run the kernel test cases in qemu? If so, is there a documentation on how to get the serial output? What hardware does qemu simulate for serial?
Yes I did. QEMU is emulating i8250 serial device and the driver is available for chibi-mips-qemu.
You should launch qemu with -nographic option as I didn't try to cook a driver for VGA.

Very interesting, probably this driver would also work for cortex m3 simulation and qemu, right? I'm thinking of adding automated testing of kernels to chibios...
Yep, that should work fine. You will just also need PIC i8259 driver which is also included in os/hal/platforms/MIPS-QEMU

etmatrix
Posts: 46
Joined: Sun Oct 21, 2012 10:05 pm

Re: MIPS32 port

Postby etmatrix » Sun Nov 11, 2012 11:24 pm

Dmytro wrote:Hi, etmatrix,

first of all thanks for trying this =)

Hi, Dmytro

thank you for your work

Dmytro wrote:Hum, as far as I remember the toolchain at http://developer.mips.com/tools/compile ... toolchain/ is for x86.
Sure but x86_64.

Dmytro wrote:Unfortunately I didn't try too much to build complete image with xc32. I don't like it a lot ...
Do you know the project Pinguino32? In the svn repository there is a compiler mips-elf, has no dependencies with XC32 or C32, it compile for PIC32MX without problems.

Dmytro wrote:Anyway you have to change the way the linker script is provided to the linker:
Ok thank you, I will try.

Dmytro
Posts: 98
Joined: Sun Oct 07, 2012 11:49 am

Re: MIPS32 port

Postby Dmytro » Mon Nov 12, 2012 11:17 am

Hi etmatrix,

etmatrix wrote:
Dmytro wrote:Hum, as far as I remember the toolchain at http://developer.mips.com/tools/compile ... toolchain/ is for x86.
Sure but x86_64.
Oh, I didn't notice.
Anyway once I polish the usage of shadow registers I'll try to make the port toolchain-independant.

etmatrix wrote:Do you know the project Pinguino32? In the svn repository there is a compiler mips-elf, has no dependencies with XC32 or C32, it compile for PIC32MX without problems.
I heard about it but never looked inside. Thanks for the link I'll take a look.

Dmytro
Posts: 98
Joined: Sun Oct 07, 2012 11:49 am

Re: MIPS32 port

Postby Dmytro » Mon Nov 12, 2012 2:29 pm

From the first glance in pinguino for pic32 they use precompiled binaries. That's not what I want for chibios.
I would like to have a way to supply fuse configuration in an open way.

Dmytro
Posts: 98
Joined: Sun Oct 07, 2012 11:49 am

Re: MIPS32 port

Postby Dmytro » Sun Nov 18, 2012 4:08 pm

Hi,
I've pushed some updates to mips-pic32mx branch: use shadow registers in ISRs and difinition of boot config registers w/o xc32 support.
This getting the port closer to be xc32-independant, though it still depends on some sources and headers from xc32 toolchain.
I'm going to rewrite most of them but I will copy some target-definition headers as rewriting thousands of lines of register definition is a stupid work. As far as I remember the license permits copying.

Regarding the usage of shadow registers - it definetely gives perfomance boost but not doubling it(sorry, no numbers this time - I have issues with ISP at home so writing these lines from my work place and I forgot to save the results ...)

I've also played with xc32 as a toolchain to build the firmware but the magic done by xc32's linker is too black for me.
Eventually I was able to build an ELF which looks good for me, but in the end it does not boot on target. Even in debug mode I can't trace what's going on there.

cheers,
-- dmytro

Dmytro
Posts: 98
Joined: Sun Oct 07, 2012 11:49 am

Re: MIPS32 port

Postby Dmytro » Sat Nov 24, 2012 4:58 pm

Hi,
I've updated mips-pic32mx branch with following changes:
- completely get rid of xc-32 dependency
- implementation of vectored interrupts if no shadow registers supported
- few bugfixes and cleanups

I've still been trying to build the whole thing with xc-32 but still have some issues with the sections. Linker does not want to include .data section.
Please let me know if support of xc-32 is that important so I'll try harder ...

regards,
-- dmytro

etmatrix
Posts: 46
Joined: Sun Oct 21, 2012 10:05 pm

Re: MIPS32 port

Postby etmatrix » Sat Nov 24, 2012 10:44 pm

Dmytro wrote:Please let me know if support of xc-32 is that important so I'll try harder ...
For me was only a simple test. I have used xc-32 because the alternative was compile a mips-gcc from source code.


Return to “MIPS32 Support”

Who is online

Users browsing this forum: No registered users and 0 guests