preparing_a_build_environment_in_cygwin
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
preparing_a_build_environment_in_cygwin [2016/07/05 15:30] – added missing img gurce | preparing_a_build_environment_in_cygwin [2024/12/24 05:03] (current) – gurce | ||
---|---|---|---|
Line 63: | Line 63: | ||
{{http:// | {{http:// | ||
+ | |||
+ | ===== Cygwin Prerequisites ===== | ||
+ | |||
+ | Run the Cygwin setup exe again and install the following packages: | ||
+ | |||
+ | * **gcc-core** | ||
+ | * **gcc-g++** | ||
+ | * **gcc-ada** | ||
+ | * **gdb** | ||
+ | * **gmp-devel** | ||
+ | * **mpfr-devel** | ||
+ | * **libmpc-devel** | ||
+ | * **wget** | ||
+ | * **git** | ||
+ | * **libpng-devel** | ||
+ | |||
+ | For example, for " | ||
+ | |||
+ | {{http:// | ||
+ | |||
+ | Note that you can search and select multiple items this way prior to clicking on the wizard' | ||
+ | |||
+ | ===== Retrieve the MEGA65 source code ===== | ||
+ | |||
+ | The source code for the MEGA65 project is housed in a git repository hosted by github. | ||
+ | |||
+ | To retrieve it, inside the Cygwin Terminal, do the following: | ||
+ | |||
+ | * **cd ~** (ie, go to your home folder) | ||
+ | * **git clone https:// | ||
+ | |||
+ | The source-code will then be placed in the " | ||
===== Installing Ophis ===== | ===== Installing Ophis ===== | ||
Line 70: | Line 102: | ||
It is a cross-compiler for the 6502-family of processors. Paul has tweaked it so that it can also support his new 4502 processor. | It is a cross-compiler for the 6502-family of processors. Paul has tweaked it so that it can also support his new 4502 processor. | ||
- | * You'll need to grab it from Paul's github fork of Ophis: | + | You'll need to grab it from Paul's github fork of Ophis, as follows: |
- | * "Ophis @ 98ffd2a" | + | |
- | * https:// | + | |
- | * It also needs to be housed in a path that relates to where your mega65 code is located, so that mega65 code can see it. | + | |
- | TODO: Provide more detailed steps for this, just placeholder stuff for now. | + | * **cd ~** |
+ | * **git clone https:// | ||
+ | |||
+ | __NOTE__: Ophis needs to be housed within the same parent-folder that you previously cloned the mega65 code to, as the mega65 code uses relative-paths to access it. So if you chose a different parent-folder | ||
+ | |||
+ | __NOTE2__: You won't need to compile Ophis as it is written in python. I believe the default Cygwin install comes with python. If you find this isn't the case for you, please install it via the cygwin setup exe. | ||
===== Installing GHDL ===== | ===== Installing GHDL ===== | ||
Line 82: | Line 116: | ||
It also needs to be built from the source, so here are some steps for getting it done. | It also needs to be built from the source, so here are some steps for getting it done. | ||
- | |||
- | ==== Prerequisites ==== | ||
- | |||
- | Run the cygwin setup exe and install the following: | ||
- | |||
- | * gcc-g++ | ||
- | * gcc-ada | ||
- | * gmp-devel | ||
- | * mpfr-devel | ||
- | * libmpc-devel | ||
- | * wget | ||
- | * git | ||
==== 1) Grab the source for gcc v4.9.3 ==== | ==== 1) Grab the source for gcc v4.9.3 ==== | ||
- | * cd ~/ | + | |
- | * wget http:// | + | |
- | * mkdir gcc | + | * NOTE: (12/ |
- | * cd gcc | + | * https:// |
- | * tar xvf ../ | + | |
+ | | ||
+ | | ||
* (wait patiently for it all to decompress) | * (wait patiently for it all to decompress) | ||
==== 2) Grab the latest version of ghdl via git and copy its source into gcc ==== | ==== 2) Grab the latest version of ghdl via git and copy its source into gcc ==== | ||
- | * cd ~/ | + | |
- | * git clone http:// | + | * **%%git clone http:// |
- | * cd ghdl-updates | + | * NOTE: I think it might be better to grab a newer version of this repo at this location (which might work better with newer versions of gcc too): |
- | * ./configure --with-gcc=$HOME/ | + | * https:// |
- | * make copy-sources | + | |
+ | * **%%./configure --with-gcc=$HOME/ | ||
+ | | ||
==== 3) Build and install gcc+ghdl ==== | ==== 3) Build and install gcc+ghdl ==== | ||
- | * cd ~/ | + | |
- | * mkdir gcc-objs; cd gcc-objs | + | |
- | * ../ | + | * **%%../ |
- | * make -j2 | + | |
- | * make install | + | * If you get an error saying "// |
- | * rm / | + | * Edit the " |
- | * ln -s / | + | * Towards the start of the file, add " |
- | * As a test, try typing "ghdl --disp-config" | + | * run **make -j2** again |
- | * take a look at the output, and assure that there' | + | * If you get an error saying "//: No such file or directory//", |
+ | * **export SHELLOPTS** | ||
+ | * **set -o igncr** | ||
+ | * run **make -j2** again | ||
+ | | ||
+ | | ||
+ | | ||
+ | * As a test, try typing "**%%ghdl --disp-config%%**" | ||
+ | * take a look at the output, and assure that there' | ||
==== 4) Take it for a spin! ==== | ==== 4) Take it for a spin! ==== | ||
- | * cd " | + | |
- | * make simulate | + | |
* this churns away at quite a lot of *.vhdl files this time, no errors given | * this churns away at quite a lot of *.vhdl files this time, no errors given | ||
- | * then you will get a " | + | * then you will get a "**cpu_test.exe**" file |
* Then give Paul's suggestion a try, of: | * Then give Paul's suggestion a try, of: | ||
- | * ./ | + | |
+ | |||
+ | You should start seeing cpu instructions being outputted to the screen as they are executed, something like the following: | ||
- | You should start seeing cpu instructions being outputted to the screen as they are executed. | + | < |
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | gs4510.vhdl: | ||
+ | </ |
preparing_a_build_environment_in_cygwin.1467754235.txt.gz · Last modified: 2016/07/05 15:30 by gurce