
codeblocks-cpc-project-v1.2.zip | |
File Size: | 422 kb |
File Type: | zip |
Preconfigured SDCC project for the Code::Blocks IDE
This file contains a simple Code::Blocks project which is configured to compile binaries for the Amstrad CPC with the SDCC compiler. It is based on the second SDCC tutorial by Arnaud Storq. You can find the tutorials on http://www.norecess.net
Disclaimer
This article is based on Octoate's README.TXT file included in original archive. Many thanks to him for sharing his experience to the community ! :)
File Contents
- Code::Blocks project
- Pasmo Z80 cross-assembler v0.5.4.beta2 by Julian Albo (http://www.arrakis.es/~ninsesabe/pasmo/)
- SDCC2Pasmo v1.5 by Arnaud Storq (http://www.norecess.net)
- ManageDSK v0.20 by Demoniak
- Pasmo Z80 cross-assembler v0.5.4.beta2 by Julian Albo (http://www.arrakis.es/~ninsesabe/pasmo/)
- SDCC2Pasmo v1.5 by Arnaud Storq (http://www.norecess.net)
- ManageDSK v0.20 by Demoniak
Installation
1. Download and install the latest version of the SDCC compiler from http://sdcc.sf.net
2. Download and install the latest version of the Code::Blocks IDE from http://www.codeblocks.org
3. Start the Code::Blocks IDE
4. Open "Settings-Compiler and debugger..."
5. Open tab "Toolchain executables" and choose the correct path of your SDCC installation directory in "Compiler's installation directory"
6. Load the CPCProject.cbp project file
7. You can now compile the project ("Build-Build" or just CTRL-F9) and use the binary file in the Release directory of your project tree in an emulator.
2. Download and install the latest version of the Code::Blocks IDE from http://www.codeblocks.org
3. Start the Code::Blocks IDE
4. Open "Settings-Compiler and debugger..."
5. Open tab "Toolchain executables" and choose the correct path of your SDCC installation directory in "Compiler's installation directory"
6. Load the CPCProject.cbp project file
7. You can now compile the project ("Build-Build" or just CTRL-F9) and use the binary file in the Release directory of your project tree in an emulator.
Setup of the project file
If you want to create your own project file (instead of copying the included project file :-)), you have to use SDCC in the project build settings. There you have to use the -mz80 switch in the Compiler settings - Compiler flags to enable code generation for the Z80 CPU. Under Other options you have to set -s for just creating a file with assembler syntax and --no-std-crt0 to not use the standard CRT0 startup file of SDCC.
I also added the following lines to the Post-build steps, to convert the generated assembler file to Pasmo (Maxam) syntax and compile it with Pasmo:
tools/SDCC2Pasmo/SDCC2Pasmo.exe $(TARGET_OBJECT_DIR)main.rel $(TARGET_OBJECT_DIR)main_maxam.asm
tools/pasmo/pasmo.exe main_entrypoint.asm $(TARGET_OUTPUT_DIR)main.bin
NOTE: This doesn't contain the pre-build and post-build batch file execution.
I also added the following lines to the Post-build steps, to convert the generated assembler file to Pasmo (Maxam) syntax and compile it with Pasmo:
tools/SDCC2Pasmo/SDCC2Pasmo.exe $(TARGET_OBJECT_DIR)main.rel $(TARGET_OBJECT_DIR)main_maxam.asm
tools/pasmo/pasmo.exe main_entrypoint.asm $(TARGET_OUTPUT_DIR)main.bin
NOTE: This doesn't contain the pre-build and post-build batch file execution.
Changelog
v1.2 (2011-09-03):
- Added SDCC2Pasmo v1.5
- Added ManageDSK v0.20- Added defines.h to show definition of multi-line assembler definitions- Added example BREAKPOINT (for WinApe breakpoints) and MODE definitions
v1.1 (2011-03-22):
- Added SDCC2Pasmo v1.3
- Changed project settings (filename can be set in project properties)
- Changed post-build options to use the filename of the project properties
- Added pre- and post-build batch files to execute own commands before and after the build process (e.g. for compressing files and adding files to a DSK file)
- Added ManageDSK with example in post-build batch file which creates a new DSK image which contains all .BIN files from the bin/Release directory
v1.0 (2011-01-26):
- Initial version
- Added SDCC2Pasmo v1.5
- Added ManageDSK v0.20- Added defines.h to show definition of multi-line assembler definitions- Added example BREAKPOINT (for WinApe breakpoints) and MODE definitions
v1.1 (2011-03-22):
- Added SDCC2Pasmo v1.3
- Changed project settings (filename can be set in project properties)
- Changed post-build options to use the filename of the project properties
- Added pre- and post-build batch files to execute own commands before and after the build process (e.g. for compressing files and adding files to a DSK file)
- Added ManageDSK with example in post-build batch file which creates a new DSK image which contains all .BIN files from the bin/Release directory
v1.0 (2011-01-26):
- Initial version