Changes

Jump to: navigation, search

Programming:Cross Development

4,588 bytes added, 08:25, 17 November 2017
Where cpcdiskxp is mentioned (Windows-specific), mention dsktools (Linux) too.
= Tools needed for cross development =
 
== Integrated toolchains ==
 
An integrated cross-development toolchain is a time saver for development as it automates all necessary steps from a full set of source materials (source code, graphics, music, parameters in whatever format is practical for editing, etc) to one or several formats ready to run on the target machines. It also sometimes includes automatically launching or notifying an emulator or target device. See e.g. [http://en.wikipedia.org/wiki/Build_automation#Advantages Build Automation on wikipedia].
 
Such a design has several advantage:
* allows the usage of any text/graphic editor of modern platforms
* you can change anything in one or more source files and you get an updated build quickly without error-prone manual steps
* allows arbitrary transform or generation of intermediary files (code or data).
* makes easy to have specific builds (e.g. for automated tests like to check if a different compiler produces correct code, variant build for slightly different targets)
* since most material are text files or small independent files, it benefits hugely from modern tools for revision control like [http://en.wikipedia.org/wiki/Git_%28software%29 Git] which makes sharing and merging code between developers much easier, increasing the time saved.
 
An ideal toolchain does not force its user into specific ways of doing things but is flexible enough to let the user adjust for whatever specific needs (use different languages, compilers, linkers, etc). Along with a properly designed and structured source tree, this makes projects less dependent on specific tools used to build them, and be more resilient to [http://en.wikipedia.org/wiki/Bit_rot bit rot] due to [http://en.wikipedia.org/wiki/Software_rot#Environment_change software build environment change].
 
Please note that an integrated toolchain has little to do with anything visible on-screen. A good toolchain can be triggered by most flexible enough graphical environments and generally produces a text log of the work done. Nevertheless, the concept of toolchains is more natural to Linux/Unix way of thinking/doing things, and those environments are already full of reusable and combinable tools that ease the creation and maintenance of a toolchain. Windows users can generally use tools developed for Unix through the cygwin software adaptation layer but running a Linux distribution in a virtual machine may be more practical.
 
There are some attempts at creating toolchains targeting the CPC.
 
Active as of 2017-11:
 
* '''[[CPCtelera]]''' integrates an out-of-the-box preconfigured build system, along with a game development library and tools. It is also multiplatform, working on Linux, OSX and Windows.
* [https://github.com/cpcitor/cpc-dev-tool-chain cpc-dev-tool-chain] integrated C or ASM development toolchain for the Amstrad CPC platform (or emulator). Includes compiler, assembler, makefile-based projects, interface between C and firmware. Designed for quick start on Linux (or similar) systems : get a copy, run "make" and get a DSK ready to run into the emulator. It even downloads and compiles tools (the cross-compiler, iDSK) if needed. Made for Linux, also works with Windows (via cygwin or similar), and probably Mac OS X. Most project+build-oriented features claims by CPCTelera comes from cpc-dev-tool-chain.
* Not an integrated toolchain, but a collection of tools that can be strung together to make one, including a DockerFile. Mentioned on [http://www.cpcwiki.eu/forum/off-topic/cpc-sdk-for-linuxunix/ CPC SDK for Linux/Unix]. Appears to have moved to https://github.com/cpcsdk
 
* 2012-11-12 [http://www.cpcwiki.eu/forum/programming/recommended-linux-cross-dev-tool-chain/ Recommended Linux cross-dev tool chain?] mentions a makefile-based toolchain targeting dsk images or tapes
* 2009-06-16 [http://www.cpcwiki.eu/forum/emulators/my-new-cross-development-kit/new/#new My new cross-development kit] explain what is basically a toolchain but link is broken as of 2013-01-08
== Linux ==
* GNU Binutils for z80 (z80-unknown-coff platform)
* [[Z80asm]] [http://savannah.nongnu.org/projects/z80asm]
* [[pasmo]]
* [[naken_asm]] [https://www.mikekohn.net/micro/naken_asm.php]
 
=== Cross compilers ===
* [[ZXBasic]]
=== Crunching ===
* [[CPCTools]]
* [[ManageDSK|iDSK]] / * [[cpcfs]] / [[cpcxfs]]
* [[dsktools]]
* [[cpmtools 2]] [http://www.moria.de/~michael/cpmtools/]
=== Editing ===
* scite
* pico
* xemacs
* [[How to use VIM for CrossDev|Vim]]
* pluma
* gedit
=== Emulators ===
* [[Arnold (Emulator)|Arnold]]
* [[Caprice]] [http://sourceforge.net/projects/caprice32/]
* [[cpcemu]] [http://www.cpc-emu.org/]
*[http://little-bat.de/prog/ zasm]
*[[WinApe|WinApe]]'s built in assembler
* [[naken_asm]] [https://www.mikekohn.net/micro/naken_asm.php]
=== Cross compilers (C) ===
 
For tutorial, see http://www.cpcmania.com/Docs/Programming/Programming.htm by Mochilote
* [[Z88DK]]
* [[SDCC]], notably [[SDCC and CPC]] had hints and practical examples about the principles of writing in C for CPC.
* [[PhrozenC]]
 
=== Cross compilers (Java) ===
 
WIP
 
* [[JavaGrinder]]
=== Graphics ===
* Then you can run the program on the emulator the same way as you would run it on a real CPC
If your CPC has a 3.5" disc drive then the easiest method is to transfer the DSK to a 3.5" disc using the a PCwith a 3.5" drive (internal, not USB).
- * Then use CPCDiskXP to write the DSK to a 3.5" disc drive - , using dsktools (Linux) or CPCDiskXP (Windows).* Put the disc into your CPC's 3.5" disc drive and type - |B: RUN "<gamename>
== Snapshots ==
== Web links ==
* [http://ramlaid.free.fr/Amstrad/English/crossDev.htm CPC Cross Development tools by Ramlaid](Link broken as 2012-01-08. If you can help, please update.)
[[Category:Programming]] [[Category:CrossDev]]
11
edits