Page 2 of 13

Re: MIPS32 port

Posted: Sun Nov 11, 2012 5:12 pm
by Dmytro
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

Re: MIPS32 port

Posted: Sun Nov 11, 2012 5:16 pm
by Dmytro
All the documentation for MIPS-QEMU is in the readme: https://github.com/niamster/ChibiOS/tre ... /MIPS-QEMU

Re: MIPS32 port

Posted: Sun Nov 11, 2012 5:18 pm
by mabl
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...

Re: MIPS32 port

Posted: Sun Nov 11, 2012 6:26 pm
by Dmytro
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

Re: MIPS32 port

Posted: Sun Nov 11, 2012 11:24 pm
by etmatrix
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.

Re: MIPS32 port

Posted: Mon Nov 12, 2012 11:17 am
by Dmytro
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.

Re: MIPS32 port

Posted: Mon Nov 12, 2012 2:29 pm
by Dmytro
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.

Re: MIPS32 port

Posted: Sun Nov 18, 2012 4:08 pm
by Dmytro
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

Re: MIPS32 port

Posted: Sat Nov 24, 2012 4:58 pm
by Dmytro
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

Re: MIPS32 port

Posted: Sat Nov 24, 2012 10:44 pm
by etmatrix
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.