Changes

Jump to: navigation, search

Programming:Cross Development

3,562 bytes added, 12:53, 15 November 2023
/* Cross compilers */ ugbasic
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 and extensive configuration. It is also multiplatform, working on Linux, OSX and Windows. CPCtelera is a fork of [https://github.com/cpcitor/cpc-dev-tool-chain cpc-dev-tool-chain] tuned for 2D-sprite-oriented productions and extensive documentation. ''Recommended for beginners.''* '''[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). '''Recommended for seasoned C programmers, Linux geeks, advanced users, general productions'''. Includes:** Designed for quick start on Linux (or similar) systems : '''get a copy, write a "hello_world.c", run "make dsk" and get a DSK ready to run into the emulator'''. On linux "make run" even runs the emulator! ** Automatically downloads and compiles tools as needed, no interference with user account or global system, no administrator permission needed.** Tools include:*** gfx2crtc (transform PNG into CPC screen data),*** png2cpcsprite (turn PNG into binary data formatted as ASM source code ''with metadata including palette'', zero run-time overhead),*** SDCC compiler, assembler and linker,*** hex2bin, addhead (prepare CPC binaries with AMSDOS header),*** cpcxfs and iDSK (prepare DSK disc image),*** rasm (Roudoudou's assembler)'''. *** 2cdt (transform CPC binary to tape image),*** playtzx (transform tape image into audio file to play to your CPC),*** caprice32 (emulator),*** cpcec (emulator),*** exomizer (high performance compressor, PC side),*** deexo (Z80 run-time exomizer decompression),** 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.** Call firmware routines from clean C code! [https://rawgit.com/cpcitor/cpc-dev-tool-chain/master/cpclib/cfwi/coverage.html advanced coverage of the CPC firmware]** Extensible projects structure based on GNU make  * 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
* Currently active (as of end of 2012): on [http://www.cpcwiki.eu/forum/off-topic/cpc-sdk-for-linuxunix/ CPC SDK for Linux/Unix] PlukoMandy mentions http://code.google.com/p/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 ==
=== Cross assemblers ===
* [[basm|Benediction ASseMbler]] [https://cpcsdk.github.io/rust.cpclib/basm/]
* [[naken_asm]] [https://www.mikekohn.net/micro/naken_asm.php]
* [[pasmo]]
* [[RASM]]
* [[SjasmPlus]]
* [[Sjasm|sjasm]]
* [[Z80asm]] [http://savannah.nongnu.org/projects/z80asm]
* [[Zasm]] [http://sourceforge.net/projects/zasm]
* [[ZMac]]
* GNU Binutils for z80 (z80-unknown-coff platform)
 === Cross compilers ===* [[Z80asmZXBasic]]* [[Turbo Rascal Syntax Error]] [http://savannahturborascal.nongnu.orgcom]* [[ugBASIC]] [https:/projects/z80asmugbasic.iwashere.eu]
=== 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/]
=== Cross Assemblers ===
 
* [[basm|Benediction ASseMbler]] [https://cpcsdk.github.io/rust.cpclib/basm/]
* [[naken_asm]] [https://www.mikekohn.net/micro/naken_asm.php]
*[[Tasm|tasm]]
*[[Pasmo|Pasmo]]
*[[ZMac|ZMacRASM]] *[http://little-bat.de/prog/ zasm]
*[[WinApe|WinApe]]'s built in assembler
*[[ZMac|ZMac]]
*[http://little-bat.de/prog/ zasm]
=== Cross compilers (C) ===
Beginner warning: unless you want to rebuild an entire toolchain by hand, you probably don't want to just download a C cross-compiler alone. Most probably, what you're looking for is an [[#Integrated_toolchains|integrated toolchain]] instead. For a C 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]]
 
=== Cross compilers (Pascal) ===
 
* [[Turbo Rascal Syntax Error]] [http://turborascal.com]
=== 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 ==
907
edits