forked from amberisvibin/chibi-pc09
Update bootloader README and clean up makefile
This commit is contained in:
@@ -1,31 +1,35 @@
|
|||||||
# Boot Firmware for CHIBI PC-09
|
# Boot Firmware for CHIBI PC-09
|
||||||
|
|
||||||
TODO: Description of what the firmware does for the PC-09.
|
This is the firmware for the CHIBI PC-09. In the future it will provide the
|
||||||
|
CHIBI with initialization code, a UART driver, some self test features.
|
||||||
|
|
||||||
## Building the Firmware
|
## Building the Firmware
|
||||||
|
|
||||||
You will need GNU `make`, and [`asm6809`](https://www.6809.org.uk/asm6809) to
|
Building the firmware from source requires [LWTOOLS](http://www.lwtools.ca/) for
|
||||||
build the firmware. Obtaining a working copy of `asm6809` could be difficult if
|
building S-Records of the ROM, and `mot2bin` from
|
||||||
you aren't on Debian, Ubuntu, or Windows as instructions for building it are not
|
[F9DASM](https://github.com/Arakula/f9dasm) for building binary images. A GNU
|
||||||
given on the `asm6809` website. Functional instructions for building from Git or
|
Make makefile is provided for building on Linux.
|
||||||
tarball are given here:
|
|
||||||
|
### Using the Makefile
|
||||||
|
|
||||||
|
To generate an S-Record run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://www.6809.org.uk/git/asm6809.git
|
make boot.s19
|
||||||
cd asm6809
|
|
||||||
./configure
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
```
|
```
|
||||||
|
|
||||||
From there all you should have to do to generate a `boot.bin` is:
|
To generate a binary run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/amberisvibin/chibi-pc09.git
|
|
||||||
cd chibi-pc09/code/boot
|
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The makefile also can clean up after itself:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make clean
|
||||||
|
```
|
||||||
|
|
||||||
## Firmware Licensing
|
## Firmware Licensing
|
||||||
|
|
||||||
This firmware like the rest of the CHIBI PC-09 is licensed under the MIT
|
This firmware like the rest of the CHIBI PC-09 is licensed under the MIT
|
||||||
|
@@ -8,13 +8,14 @@
|
|||||||
# Project Defaults & Folders
|
# Project Defaults & Folders
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
TARGET := boot
|
TARGET := boot
|
||||||
TARGROM := $(TARGET).bin
|
TARGREC := $(TARGET).s19
|
||||||
SRCDIR := src/
|
TARGROM := $(TARGET).bin
|
||||||
|
SRCDIR := src/
|
||||||
BUILDDIR := build/
|
BUILDDIR := build/
|
||||||
SRCS := $(wildcard $(SRCDIR)*.s)
|
SRCS := $(wildcard $(SRCDIR)*.s)
|
||||||
OBJS := $(patsubst $(SRCDIR)%.s,$(BUILDDIR)%.o,$(SRCS))
|
OBJS := $(patsubst $(SRCDIR)%.s,$(BUILDDIR)%.o,$(SRCS))
|
||||||
INCS := $(wildcard $(SRCDIR)*.inc)
|
INCS := $(wildcard $(SRCDIR)*.inc)
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Toolchain Definitions
|
# Toolchain Definitions
|
||||||
@@ -34,11 +35,11 @@ LDFLAGS := -f srec -m map.txt -s linkscript
|
|||||||
all: $(TARGROM)
|
all: $(TARGROM)
|
||||||
|
|
||||||
# Fix srec into flashable bin file
|
# Fix srec into flashable bin file
|
||||||
$(TARGROM): $(TARGET).s19
|
$(TARGROM): $(TARGREC)
|
||||||
$(FIX) -out $@ $<
|
$(FIX) -out $@ $<
|
||||||
|
|
||||||
# Link objects
|
# Link objects
|
||||||
$(TARGET).s19: $(OBJS)
|
$(TARGREC): $(OBJS)
|
||||||
$(LD) $(LDFLAGS) -o $@ $^
|
$(LD) $(LDFLAGS) -o $@ $^
|
||||||
|
|
||||||
# Assemble objects
|
# Assemble objects
|
||||||
@@ -46,7 +47,6 @@ $(OBJS): $(BUILDDIR)%.o : $(SRCDIR)%.s
|
|||||||
-@mkdir -p $(BUILDDIR)
|
-@mkdir -p $(BUILDDIR)
|
||||||
$(AS) $(ASFLAGS) -o $@ $<
|
$(AS) $(ASFLAGS) -o $@ $<
|
||||||
|
|
||||||
.IGNORE: clean
|
|
||||||
clean:
|
clean:
|
||||||
@echo 'Cleaning up intermediary files...'
|
@echo 'Cleaning up intermediary files...'
|
||||||
@rm -rv $(TARGROM) $(TARGET).s19 map.txt $(BUILDDIR)
|
@rm -rv $(TARGROM) $(TARGREC) map.txt $(BUILDDIR)
|
||||||
|
Reference in New Issue
Block a user