fupy / micropython

MicroPython port to litex FPGA platforms
https://micropython.org
MIT License
40 stars 14 forks source link

Make FuPy MicroPython arch independent #3

Open mithro opened 7 years ago

mithro commented 7 years ago

LiteX supports multiple CPU architectures, lets try and support all of them!

mithro commented 7 years ago

I think this has been done now? https://github.com/upy-fpga/micropython/tree/master/litex

Just need to check if or1k is working.

ewenmcneill commented 6 years ago

@mithro or1k is not working for MicroPython. The top level failure is that ports/fupy/irq.h tries to include system.h for or1k, which looks like it has to be the third_party/litex/litex/soc/software/include/base/system.h, which in turn needs third_party/litex/litex/soc/software/include/base/spr-defs.h, and both of those are included as if they're directly on the include path.

While we can fiddle with INC and ASFLAGS in ports/fupy/Makefile to make them appear directly on the include path, the result of doing that is that then a bunch of other include files of our libc are then coming from that directory which breaks a bunch of other things :-(

I suspect the only workable option is to copy system.h and spr-defs.h (and csr-defs.h for vexriscv) out of the litex directory, into a build directory... probably generated, so that's what I am going to try next.

Ewen

ewenmcneill commented 6 years ago

@mithro Created WIP pull requests to record progress to date -- it seems closer with copying in relevant header files (rather than changing include path), but build still fails in ports/fupy/Makefile for other reasons (see https://github.com/timvideos/litex-buildenv/pull/41).

Needs: https://github.com/timvideos/litex-buildenv/pull/41 and https://github.com/fupy/micropython/pull/50, to attempt building, plus possibly some other changes.

Ewen