Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
lynx:compilers [2021/01/13 05:01] – created Igorlynx:compilers [2024/04/17 22:33] (current) Igor
Line 5: Line 5:
 ===== CC65 ===== ===== CC65 =====
  
-FIXME Add an introduction and background here+The [[https://cc65.github.io/|CC65 compiler]] is a great starting point for Lynx coding - you can use it for both C and ASM compilation and linking. It also has a graphics library called TGI that makes Lynx coding relatively easy.
  
   * [[https://cc65.github.io/doc/intro.html|CC65 Compiler Intro]]   * [[https://cc65.github.io/doc/intro.html|CC65 Compiler Intro]]
   * [[https://cc65.github.io/doc/lynx.html|Atari Lynx specific information for cc65]]   * [[https://cc65.github.io/doc/lynx.html|Atari Lynx specific information for cc65]]
   * [[https://cc65.github.io/doc/using-make.html|Using GNU Make with cc65]]   * [[https://cc65.github.io/doc/using-make.html|Using GNU Make with cc65]]
 +
 +==== Building CC65 ====
 +
 +CC65 can be built from source on any *NIX compatible system with the following commands. Note that these commands assume you want to get the **latest** source for CC65 and are only interested in compiling your code for the Lynx. CC65 can be used to compile for many other 6502 based systems, if you are after that, please adjust the targets accordingly.
 +
 +Note: Due to some "fixes" that were done in the latest release of CC65, it is recommended to get the code for the 2.19 version (https://github.com/cc65/cc65/releases/tag/V2.19) and use that instead.
 +
 +<code>
 +git clone https://github.com/cc65/cc65.git --single-branch
 +cd cc65
 +make all TARGETS=lynx
 +</code>
 +
 +Once CC65 is built, the **cc65/bin** directory will contain all of the binaries and **cc65/lib** will contain the Lynx library. To build Lynx code all you need to do is include the **cc65/bin** directory in your **PATH**. For example...
 +
 +<code>
 +export CC65_HOME=`pwd`
 +export PATH="$CC65_HOME/bin:$PATH"
 +</code>
 +
 +==== LLVM-MOS ====
 +
 +[[https://github.com/llvm-mos/llvm-mos-sdk|LLVM-MOS]] provides a BLL format ".o" executable file output for the Lynx. It is meant to produce better code than CC65.
 +__This section needs more details added.__
  
 ===== Other Compilers ===== ===== Other Compilers =====
Line 15: Line 39:
 FIXME Add info on other compilers e.g. Karri's CC65 fork, NewCC65, etc. FIXME Add info on other compilers e.g. Karri's CC65 fork, NewCC65, etc.
  
 +[[https://bitbucket.org/atarilynx/lynx/src/master/tools/cc65/|Karri's CC65 Compiler]]