Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keiichiw/ucc
Udon C Compiler: C compiler for our original CPU
https://github.com/keiichiw/ucc
c compiler ocaml
Last synced: about 3 hours ago
JSON representation
Udon C Compiler: C compiler for our original CPU
- Host: GitHub
- URL: https://github.com/keiichiw/ucc
- Owner: keiichiw
- Created: 2014-11-24T13:42:42.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-18T15:39:28.000Z (almost 8 years ago)
- Last Synced: 2023-12-13T20:57:41.137Z (11 months ago)
- Topics: c, compiler, ocaml
- Language: C
- Homepage:
- Size: 510 KB
- Stars: 81
- Watchers: 9
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UCC - Udon C Compiler [![Build Status](https://travis-ci.org/kw-udon/ucc.svg?branch=master)](https://travis-ci.org/kw-udon/ucc)
C compiler for [GAIA](https://github.com/wasabiz/GAIA3) CPU written in OCaml.
Requirement
==============
* OCaml >= 4.0.1
* ocamlbuild >= 4.0.1
* Clang (for preprocessing and syntax check)Build
==============
``make``To run the tests, use the following command.
``make test``
Example
==========
You can compile C file by the following command.``./bin/ucc ./test/printf.c``
Then, `a.out` will be created. It runs on the simulator.
``./bin/sim -simple a.out``
You can check generated assembly by `-S` option.
``./bin/ucc -S ./test/printf.c``
If you want to see other options, please use `-h` option.
In addition, UCC can compile [xv6 ported to GAIA](https://github.com/wasabiz/xv6), a simple Unix-like OS.
Please use this [Makefile](https://gist.github.com/kw-udon/0fcedda2d29c81a2d1be) to try it.Article
=========
* http://kw-udon.hatenablog.com/entry/2015/03/19/171921 (written in Japanese)