Skip to content
The code repository for the DCPU-16 Toolchain.
C C++ Perl Objective-C Other D Other
Latest commit e55abf3 Apr 21, 2014 @patflick patflick updated dcpu-cc reference
Failed to load latest commit information.
CMakeScripts fixing readline issue #205 Jan 10, 2013
api-demos/json-test Fix json-test so it compiles Feb 12, 2013
cmake Finished implementation of linker policies. Nov 4, 2012
contrib Updated sanitization script again. Oct 27, 2012
docs Fixed a few more things in the "How DCPU-16 works" tutorial. Nov 21, 2012
dtasm Added ability to provide error location via dhaltloc/dwarnloc. Jan 31, 2013
dtcc integrating dtcc2 (dcpu-cc) Feb 10, 2013
dtdb-gui ncurses fix Jan 10, 2013
dtdb ncurses fix Jan 10, 2013
dtemu Added ability to provide error location via dhaltloc/dwarnloc. Jan 30, 2013
dtide finished renaming timer->clock Dec 17, 2012
dtimg Fixed version information not showing in tools. Nov 5, 2012
dtld Added ability to provide error location via dhaltloc/dwarnloc. Jan 30, 2013
dtlua Clean up debug.h includes Dec 13, 2012
dtmm Fixed curl linking on Windows Dec 31, 2012
dtpolicy Added QScintilla2 library for Windows. Nov 5, 2012
dtpp Added ability to provide error location via dhaltloc/dwarnloc. Jan 30, 2013
examples/assembler Fix off-by-one error in :getscreen. Nov 1, 2012
kernel Got packaging working for Windows installers. Nov 12, 2012
libdcpu-cc @ a1e41f3 updated dcpu-cc reference Apr 21, 2014
libdcpu-ci-asm Hackily prevented .dat from being lexed as a local label Jan 24, 2013
libdcpu-ci-dbgfmt Fixed rparse.c in compliance with the new pp Nov 9, 2012
libdcpu-ci-objfmt Fixed rparse.c in compliance with the new pp Nov 9, 2012
libdcpu-ld-policy Added support for kernel independent calling via .CALL directive. Nov 5, 2012
libdcpu-ld fix for CPP, fix for stdlib, newest dcpu-cc, performance fixes in linker Feb 16, 2013
libdcpu-pp-expr Fixed rparse.c in compliance with the new pp Nov 9, 2012
libdcpu-pp fix for CPP, fix for stdlib, newest dcpu-cc, performance fixes in linker Feb 16, 2013
libdcpu-vm-dbg Fixes for compilation warnings. Jan 28, 2013
libdcpu-vm-python Add a vm_reset function Dec 13, 2012
libdcpu-vm Fix issue #233 Mar 29, 2013
libdcpu integrating dtcc2 (dcpu-cc) Feb 10, 2013
modules @ bdc0de3 Updated 'modules' submodule. Nov 13, 2012
package Added Mac packaging data. Nov 12, 2012
stdlib-c Fixed strncmp function Feb 21, 2013
tests Added ability to provide error location via dhaltloc/dwarnloc. Jan 30, 2013
third-party Removed unused library. Jan 28, 2013
tool-errgen Added error message for issue #191 and reverted previous fix. Nov 13, 2012
.gitignore fixing windows build errors Feb 11, 2013
.gitmodules fixing submodule Feb 12, 2013
AUTHORS.txt Added myself to AUTHORS.txt Oct 4, 2012
CMakeLists.txt integrating dtcc2 (dcpu-cc) Feb 10, 2013
MIT-LICENSE.txt Fixed top level line endings. Apr 26, 2012
README.md Improved Linux build README Dec 31, 2012
package.bat Updated package.bat for Windows distribution. May 13, 2012

README.md

DCPU-16 Toolchain

  • Windows build status; Windows build status
  • Linux build status; Linux build status
  • Mac build status; Mac build status

The build server and it's waterfall status can be accessed from http://bb.dcputoolcha.in:8080/waterfall.

Binaries

You can download binaries for Windows from the main http://dcputoolcha.in/ website.

Source

Instructions for Windows

IMPORTANT NOTICE: GnuWin32 no longer works as it is too out-of-date to support the reentrant lexer and parser used in the preprocesser system. If you used the old instructions, you must now uninstall the GnuWin32 versions, remove GnuWin32 from your PATH and then follow the instructions below.

You need to install Cygwin. You can do this by downloading Cygwin from this link:

Ensure that during the setup process you select the Flex and Bison packages during installation. Do not install CMake under Cygwin. You should install Cygwin into a path without spaces (it will inform you to do this).

Once installed, you must then add the Cygwin bin/ folder (located under where-ever you installed Cygwin) to your system PATH environment variable (Google has the answer if you don't know how to do this). For example, I install Cygwin in C:\UNIX, thus the path for me to add would be C:\UNIX\bin.

You must then install CMake; you can download CMake from:

You now need to add CMake to your system PATH. CMake does offer to do this for you in the installer, but occasionally this will fail and you will need to do it yourself.

Once CMake is installed, start a command prompt (you must open a new command prompt since you modified PATH) and type the following commands:

> cd path/to/repo
> cmake -G "Visual Studio 10"

Otherwise, this should work correctly and produce a Visual Studio 2010 solution that you can open up in Visual Studio 2010 C++ Express and compile!

Cygwin Notice

When using Cygwin, then there are some important notes:

  • You must use the Windows version of CMake. You can't have this installed as part of Cygwin.
  • and most importantly you must initially run cmake -G "Visual Studio 10" from the command prompt. Cygwin's case sensitivity causes the initial configuration and detection of the C compiler to fail. You will need to terminate all instances of MSBuild.exe and run the configuration again from the command prompt if this occurs.
  • Once you have done the initial configuration, you may then run cmake from Cygwin to update project files; it's just the initial configuration that can't be done in Cygwin.

Instructions for Linux

Installing libraries

First you have to install some required libraries

Ubuntu 12.04
$ sudo apt-get install bison flex cmake build-essential libreadline-dev libsdl1.2-dev libcurl4-openssl-dev 
Fedora 16

IMPORTANT NOTICE: Build Instructions outdated libcurl dev headers need to be installed aswell

$ sudo yum install bison flex cmake mesa-lib* zlib-devel libpng-devel
$ sudo yum groupinstall "Development Tools"

Getting the sources from Git

Next clone the repository into a new folder

$ git clone git://github.com/DCPUTeam/DCPUToolchain.git dcputoolchain
$ cd dcputoolchain

Building

Now generate the Makefiles and and compile with

[dcputoolchain]$ cmake . && make

There's a possible issue about generating error definitions with the CMake scripts. If the make fails for you try this instead:

[dcputoolchain]$ cmake . && make -C libdcpu && make

Instructions for Mac

First install Xcode which should install everything you need to compile.

Next, you'll need to install a few other things, I'll be using homebrew for this, which you can download here, but you could use port, fink or any other way you want to install it.

You will need to install cmake, git and sdl.

IMPORTANT NOTICE: Build Instructions outdated libcurl dev headers need to be installed aswell

$ brew install cmake
$ brew install git
$ brew install sdl

Now that you've installed git, you should be able to clone DCPUToolchain if you haven't already.

$ git clone https://github.com/DCPUTeam/DCPUToolchain.git dcputoolchain
$ cd dcputoolchain

Now we can build it.

[dcputoolchain]$ cmake . && make

If everything looks like it didn't crash and burn, then you should find everything you need in dcputoolchain/Debug

Instructions for Emscripten

We have dropped support for Emscripten builds. As the toolchain increases in functionality, having full Emscripten support was no longer practical.

Something went wrong with that request. Please try again.