Skip to content
/ amacc Public
forked from jserv/amacc

Small C Compiler generating ELF executable for ARM architecture

License

Notifications You must be signed in to change notification settings

lumotuwe/amacc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMaCC = Another Mini ARM C Compiler

Introduction

AMaCC is built from scratch, supoorting ARM architecture. There are 3 execution modes AMaCC implements:

  • Just-in-Time compiler for ARM backend
  • Generate valid Executable and Linkable Format (ELF) executables
  • Interpreter-only execution

Compatibility

AMaCC is capable of compiling C source files written in the following syntax:

  • data types: char, int, struct, and pointer
  • condition statements: if, while, for, switch, return, and expression

Prerequisites

  • Install Linaro ARM Toolchain

    • linaro-toolchain-binaries (little-endian)
  • Install QEMU for ARM user emulation

sudo apt-get install qemu-user

Running AMaCC

Run 'make check' and you should see this:

[ compiled ]
hello, world
[ nested ]
hello, world

Acknowledgements

AMaCC is based on the infrastructure of c4. Hacker News discussions.

About

Small C Compiler generating ELF executable for ARM architecture

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.9%
  • Python 3.5%
  • Makefile 1.6%