micropython/ports/powerpc
Michael Neuling 079cc940a6 powerpc: Add initial port to bare metal PowerPC arch.
Runs in microwatt (GHDL and FPGA) and qemu.

Port done initially by Michael Neuling, with help from Anton Blanchard and
Jordan Niethe.
2019-10-22 22:45:33 +11:00
..
Makefile powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
README.md powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
frozentest.mpy powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
frozentest.py powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
head.S powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
main.c powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
mpconfigport.h powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
mphalport.h powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
powerpc.lds powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
qstrdefsport.h powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
uart_core.c powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
uart_lpc_serial.c powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
uart_lpc_serial.h powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
uart_potato.c powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
uart_potato.h powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
unistd.h powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00

README.md

The PowerPC port that runs on microwatt and qemu

This port is intended to be a minimal MicroPython port that runs in QEMU, microwatt simulator with ghdl or microwatt on Xilinx FPGA with potato UART.

Building

By default the port will be built for the host machine:

$ make

Cross compilation for POWERPC

If you need to cross compilers you'll want to grab a powerpc64le compiler (not powerpc or powerpc64).

On Ubuntu (18.04) you'll want:

$ apt install gcc-powerpc64le-linux-gnu

(Use CROSS_COMPILE=powerpc64le-linux-gnu-)

If your distro doesn't have cross compilers, you can get cross compilers here:

(Avoid musl libc as it defines __assert_fail() differently to glibc which breaks the micropython powerpc code)

Then do:

$ make CROSS_COMPILE=<compiler prefix>

Building will produce the build/firmware.bin file which can be used QEMU or microwatt.

To run in QEMU use:

$ ./qemu-system-ppc64 -M powernv -cpu POWER9 -nographic -bios build/firmware.bin