mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 16:38:06 +11:00
Move "emul" folder to root
This commit is contained in:
parent
40f56dd6dc
commit
72357fec86
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "tools/emul/libz80"]
|
[submodule "emul/libz80"]
|
||||||
path = tools/emul/libz80
|
path = emul/libz80
|
||||||
url = https://github.com/ggambetta/libz80.git
|
url = https://github.com/ggambetta/libz80.git
|
||||||
|
@ -34,9 +34,10 @@ path to giving Collapse OS a try.
|
|||||||
* `recipes`: collection of recipes that assemble parts together on a specific
|
* `recipes`: collection of recipes that assemble parts together on a specific
|
||||||
machine.
|
machine.
|
||||||
* `doc`: User guide for when you've successfully installed Collapse OS.
|
* `doc`: User guide for when you've successfully installed Collapse OS.
|
||||||
* `tools`: Tools for working with Collapse OS from "modern" environments. Mostly
|
* `tools`: Tools for working with Collapse OS from "modern" environments. For
|
||||||
development tools, but also contains emulated zasm, which is
|
example, tools for facilitating data upload to a Collapse OS machine
|
||||||
necessary to build Collapse OS from a non-Collapse OS machine.
|
through a serial port.
|
||||||
|
* `emul`: Emulated applications, such as zasm and the shell.
|
||||||
* `tests`: Automated test suite for the whole project.
|
* `tests`: Automated test suite for the whole project.
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
0
tools/emul/.gitignore → emul/.gitignore
vendored
0
tools/emul/.gitignore → emul/.gitignore
vendored
@ -1,10 +1,10 @@
|
|||||||
CFSPACK = ../cfspack/cfspack
|
CFSPACK = ../tools/cfspack/cfspack
|
||||||
TARGETS = shell/shell zasm/zasm runbin/runbin
|
TARGETS = shell/shell zasm/zasm runbin/runbin
|
||||||
KERNEL = ../../kernel
|
KERNEL = ../kernel
|
||||||
APPS = ../../apps
|
APPS = ../apps
|
||||||
ZASMBIN = zasm/zasm
|
ZASMBIN = zasm/zasm
|
||||||
AVRABIN = zasm/avra
|
AVRABIN = zasm/avra
|
||||||
ZASMSH = ../zasm.sh
|
ZASMSH = ./zasm.sh
|
||||||
SHELLAPPS = zasm ed
|
SHELLAPPS = zasm ed
|
||||||
SHELLTGTS = ${SHELLAPPS:%=cfsin/%}
|
SHELLTGTS = ${SHELLAPPS:%=cfsin/%}
|
||||||
CFSIN_CONTENTS = $(SHELLTGTS) cfsin/user.h
|
CFSIN_CONTENTS = $(SHELLTGTS) cfsin/user.h
|
||||||
@ -52,7 +52,7 @@ emul.o: emul.c
|
|||||||
$(CC) -c -o emul.o emul.c
|
$(CC) -c -o emul.o emul.c
|
||||||
|
|
||||||
$(CFSPACK):
|
$(CFSPACK):
|
||||||
$(MAKE) -C ../cfspack
|
$(MAKE) -C ../tools/cfspack
|
||||||
|
|
||||||
# -o in sync with USER_CODE in shell/user.h
|
# -o in sync with USER_CODE in shell/user.h
|
||||||
$(SHELLTGTS): $(ZASMBIN)
|
$(SHELLTGTS): $(ZASMBIN)
|
@ -8,7 +8,7 @@ emulator.
|
|||||||
First, make sure that the `libz80` git submodule is checked out. If not, run
|
First, make sure that the `libz80` git submodule is checked out. If not, run
|
||||||
`git submodule init && git submodule update`.
|
`git submodule init && git submodule update`.
|
||||||
|
|
||||||
After that, you can run `make` and it builds all tools.
|
After that, you can run `make` and it builds all applications.
|
||||||
|
|
||||||
## shell
|
## shell
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Calls tools/emul/zasm/zasm in a convenient manner by wrapping specified
|
# Calls emul/zasm/zasm in a convenient manner by wrapping specified
|
||||||
# paths to include in a single CFS file and then pass that file to zasm.
|
# paths to include in a single CFS file and then pass that file to zasm.
|
||||||
# Additionally, it takes a "-o" argument to set the initial ".org" of the
|
# Additionally, it takes a "-o" argument to set the initial ".org" of the
|
||||||
# binary. For example, "zasm.sh -o 4f < foo.asm" assembles foo.asm as if it
|
# binary. For example, "zasm.sh -o 4f < foo.asm" assembles foo.asm as if it
|
||||||
@ -12,7 +12,7 @@
|
|||||||
# so, if we can't get readlink -f to work, try python with a realpath implementation
|
# so, if we can't get readlink -f to work, try python with a realpath implementation
|
||||||
ABS_PATH=$(readlink -f "$0" || python -c "import os; print(os.path.realpath('$0'))")
|
ABS_PATH=$(readlink -f "$0" || python -c "import os; print(os.path.realpath('$0'))")
|
||||||
DIR=$(dirname "${ABS_PATH}")
|
DIR=$(dirname "${ABS_PATH}")
|
||||||
ZASMBIN="${DIR}/emul/zasm/zasm"
|
ZASMBIN="${DIR}/zasm/zasm"
|
||||||
|
|
||||||
usage() { echo "Usage: $0 [-a] [-o <hexorg>] <paths-to-include>..." 1>&2; exit 1; }
|
usage() { echo "Usage: $0 [-a] [-o <hexorg>] <paths-to-include>..." 1>&2; exit 1; }
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ org='00'
|
|||||||
while getopts ":ao:" opt; do
|
while getopts ":ao:" opt; do
|
||||||
case "${opt}" in
|
case "${opt}" in
|
||||||
a)
|
a)
|
||||||
ZASMBIN="${DIR}/emul/zasm/avra"
|
ZASMBIN="${DIR}/zasm/avra"
|
||||||
;;
|
;;
|
||||||
o)
|
o)
|
||||||
org=${OPTARG}
|
org=${OPTARG}
|
||||||
@ -32,8 +32,8 @@ while getopts ":ao:" opt; do
|
|||||||
done
|
done
|
||||||
shift $((OPTIND-1))
|
shift $((OPTIND-1))
|
||||||
|
|
||||||
# wrapper around ./emul/zasm/zasm that prepares includes CFS prior to call
|
# wrapper around ./zasm/zasm that prepares includes CFS prior to call
|
||||||
CFSPACK="${DIR}/cfspack/cfspack"
|
CFSPACK="${DIR}/../tools/cfspack/cfspack"
|
||||||
INCCFS=$(mktemp)
|
INCCFS=$(mktemp)
|
||||||
|
|
||||||
"${CFSPACK}" -p "*.h" -p "*.asm" -p "*.bin" "$@" > "${INCCFS}"
|
"${CFSPACK}" -p "*.h" -p "*.asm" -p "*.bin" "$@" > "${INCCFS}"
|
@ -4,9 +4,9 @@ git submodule init
|
|||||||
git submodule update
|
git submodule update
|
||||||
git clean -fxd
|
git clean -fxd
|
||||||
|
|
||||||
make -C tools/emul
|
make -C emul
|
||||||
make -C tests
|
make -C tests
|
||||||
|
|
||||||
# let's try again with an updated zasm
|
# let's try again with an updated zasm
|
||||||
make -C tools/emul updatebootstrap all
|
make -C emul updatebootstrap all
|
||||||
make -C tests
|
make -C tests
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
EMULDIR = ../tools/emul
|
EMULDIR = ../emul
|
||||||
CFSPACK = ../tools/cfspack/cfspack
|
CFSPACK = ../tools/cfspack/cfspack
|
||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
ZASM=../../tools/zasm.sh
|
ZASM=../../emul/zasm.sh
|
||||||
AVRINC=../../avr
|
AVRINC=../../avr
|
||||||
|
|
||||||
cmpas() {
|
cmpas() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
EMULDIR=../../tools/emul
|
EMULDIR=../../emul
|
||||||
SHELL="${EMULDIR}/shell/shell"
|
SHELL="${EMULDIR}/shell/shell"
|
||||||
|
|
||||||
replay() {
|
replay() {
|
||||||
|
@ -3,9 +3,8 @@ set -e
|
|||||||
# TODO: find POSIX substitute to that PIPESTATUS thing
|
# TODO: find POSIX substitute to that PIPESTATUS thing
|
||||||
|
|
||||||
BASE=../..
|
BASE=../..
|
||||||
TOOLS="${BASE}/tools"
|
ZASM="${BASE}/emul/zasm.sh"
|
||||||
ZASM="${TOOLS}/zasm.sh"
|
RUNBIN="${BASE}/emul/runbin/runbin"
|
||||||
RUNBIN="${TOOLS}/emul/runbin/runbin"
|
|
||||||
KERNEL="${BASE}/kernel"
|
KERNEL="${BASE}/kernel"
|
||||||
APPS="${BASE}/apps"
|
APPS="${BASE}/apps"
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# no "set -e" because we test errors
|
# no "set -e" because we test errors
|
||||||
|
|
||||||
ZASM=../../tools/zasm.sh
|
ZASM=../../emul/zasm.sh
|
||||||
|
|
||||||
chkerr() {
|
chkerr() {
|
||||||
echo "Check that '$1' results in error $2"
|
echo "Check that '$1' results in error $2"
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
BASE=../..
|
BASE=../..
|
||||||
KERNEL="${BASE}/kernel"
|
KERNEL="${BASE}/kernel"
|
||||||
APPS="${BASE}/apps"
|
APPS="${BASE}/apps"
|
||||||
ZASM="${BASE}/tools/zasm.sh"
|
ZASM="${BASE}/emul/zasm.sh"
|
||||||
ASMFILE="${APPS}/zasm/instr.asm"
|
|
||||||
|
|
||||||
cmpas() {
|
cmpas() {
|
||||||
FN=$1
|
FN=$1
|
||||||
|
Loading…
Reference in New Issue
Block a user