-
Notifications
You must be signed in to change notification settings - Fork 0
Building cFrOSt
azertyfun edited this page Oct 7, 2016
·
1 revision
cFrOSt currently uses clang and llvm-dcpu16, originally modified by the guys over at https://github.com/llvm-dcpu16.
- You need to download llvm-dcpu16/llvm-dcpu16 (you can download their sdk, complete with binutils-dcpu16, here), yamakaky/dcpu and DCPU-Toolchain-cli;
- Extract the bin folder from the sdk here, or copy the binaries you compiled in a tools/ folder here. You should now have cFrOSt/tools/clang.exe;
- Install rust and build the assembler part of yamakaky/dcpu, and copy target/release/assembler.exe to the tools/ folder;
- Extract DCPU-Toolchain-cli.zip in tools/, so you have tools/DCPU-Toolchain.jar
- Create an assembly file with src/include.c, and all *.dasm files into one file. Compile it by running
bin/clang.exe file.c
thenbin/assembler.exe file.s -o FrOSt.bin
thenmove FrOSt.bin tools/
, or if you have cygwin just runmake
thenmake run
. - If you do not have cygwin, run the project with
cd tools
thenjava -jar DCPU-Toolchain.jar java -jar DCPU-Toolchain.jar run none --rom=FrOSt.bin --clock --keyboard --lem1802 --lem1802-fps=10 --debugger
- Run
git clone https://github.com/FrOSt-Foundation/cFrOSt --depth=1
to download cFrOSt ; - Run
cd cFrOSt/tools && ./download-toolchain.sh
to download DCPU-Toolchain ; - Run
make
, thenmake run
.
Useful env variables:
- AS: the assembler to use
- CC: the C compiler to use (must support the DCPU)
- CFLAGS, CPPFLAGS, ASFLAGS: pass custom arguments