You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Jim Mussared d4190815a3 py/mpconfig: Disable qstr hashing at minimum feature level. 1 year ago
..
Makefile all: Use += rather than = everywhere for CFLAGS/LDFLAGS/LIBS. 2 years ago
README.md powerpc/uart: Choose which UART to use at build time, not runtime. 5 years ago
head.S all: Fix spelling mistakes based on codespell check. 2 years ago
main.c py/builtinevex: Handle invalid filenames for execfile. 1 year ago
mpconfigport.h py/mpconfig: Disable qstr hashing at minimum feature level. 10 months ago
mphalport.h all: Reformat C and Python source code with tools/codeformat.py. 5 years ago
powerpc.lds all: Fix spelling mistakes based on codespell check. 2 years ago
qstrdefsport.h all: Add *FORMAT-OFF* in various places. 5 years ago
uart_lpc_serial.c ports: Fix sys.stdout.buffer.write() return value. 11 months ago
uart_lpc_serial.h powerpc: Add initial port to bare metal PowerPC arch. 5 years ago
uart_potato.c ports: Fix sys.stdout.buffer.write() return value. 11 months ago
uart_potato.h powerpc: Add initial port to bare metal PowerPC arch. 5 years ago
unistd.h powerpc: Add initial port to bare metal PowerPC arch. 5 years ago

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 with the potato uart for microwatt:

$ make

To instead build for a machine with LPC serial, such as QEMU powernv:

$ make UART=lpc_serial

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