Browse Source

It can build on OSX with crosstool-ng

main
squeaky otter 3 years ago
parent
commit
cdd9d0eb12
Signed by: dashie GPG Key ID: C2D57B325840B755
  1. 4
      README.md
  2. 30
      bios/Makefile

4
README.md

@ -11,6 +11,10 @@
- 4x SPI
- Extension connector
# Bios
Edit `Makefile` to adapt to your TOOLCHAIN and CROSS compiler.
# Picture
<img src="https://dev.sigpipe.me/dashie/T030/raw/branch/main/assets/IMG_0035.jpg"></img>

30
bios/Makefile

@ -1,21 +1,25 @@
CROSS = m68k-elf
CC = $(CROSS)-gcc
LD = $(CROSS)-ld -v
AR = $(CROSS)-ar
AS = $(CROSS)-as
CP = $(CROSS)-objcopy
OD = $(CROSS)-objdump
CFLAGS = -I. -c -Os -Wall -std=c99 -m68030 -msoft-float -fomit-frame-pointer
AFLAGS = -m68030
LFLAGS = -Tt030.ld -nostartfiles
CPFLAGS = -Obinary
ODFLAGS = -S
# For a toolchain built with https://github.com/haarer/toolchain68k
STATICLIBS = /opt/crosschain/m68k-elf/lib/libc.a /opt/crosschain/lib/gcc/m68k-elf/9.2.0/libgcc.a
# For a toolchain built with https://github.com/autc04/Retro68
TOOLCHAIN = /Users/dashie/tmp/Retro68-build/toolchain
STATICLIBS = $(TOOLCHAIN)/m68k-apple-macos/lib/libc.a $(TOOLCHAIN)/lib/gcc/powerpc-apple-macos/9.1.0/libgcc.a
#CROSS = m68k-elf
#STATICLIBS = /opt/crosschain/m68k-elf/lib/libc.a /opt/crosschain/lib/gcc/m68k-elf/9.2.0/libgcc.a
# For a toolchain built with crosstool-ng
CROSS=m68k-unknown-elf
TOOLCHAIN = /Volumes/lol/x-tools
STATICLIBS = $(TOOLCHAIN)/m68k-unknown-elf/m68k-unknown-elf/lib/libc.a $(TOOLCHAIN)/m68k-unknown-elf/lib/gcc/m68k-unknown-elf/8.3.0/libgcc.a
CC = $(CROSS)-gcc
LD = $(CROSS)-ld -v
AR = $(CROSS)-ar
AS = $(CROSS)-as
CP = $(CROSS)-objcopy
OD = $(CROSS)-objdump
SIZE = $(CROSS)-size
all: test
@ -26,7 +30,7 @@ test: t030bios.elf
@ echo "...copying"
$(CP) $(CPFLAGS) t030bios.elf t030bios.bin
$(OD) $(ODFLAGS) t030bios.elf > t030bios.lst
m68k-elf-size t030bios.elf
$(SIZE) t030bios.elf
t030bios.elf: crt0.o vector.o main.o syscall.o startup_t030.o mfp.o xmodem.o command.o xfer.o buffer.o misc.o enc28j60.o ip_arp_udp_tcp.o spi.o dhcp_client.o netload.o tftp.o ram_test.o lxload.o tp3465.o ff.o diskio.o mmc.o sd.o ehb.o script.o cfc_ata.o t030.ld
@ echo "..linking"

Loading…
Cancel
Save