User Tools

Site Tools






preparing_a_build_environment_in_cygwin

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
preparing_a_build_environment_in_cygwin [2016/07/06 03:44]
– [3) Build and install gcc+ghdl] - added info on a build gotchya and how to work around it gurce
preparing_a_build_environment_in_cygwin [2021/06/19 00:35] (current)
– [3) Build and install gcc+ghdl] gurce
Line 71: Line 71:
   * **gcc-g++**   * **gcc-g++**
   * **gcc-ada**   * **gcc-ada**
 +  * **gdb**
   * **gmp-devel**   * **gmp-devel**
   * **mpfr-devel**   * **mpfr-devel**
Line 91: Line 92:
  
   * **cd ~** (ie, go to your home folder)   * **cd ~** (ie, go to your home folder)
-  * **git clone https://github.com/gardners/c65gs.git mega65**+  * **git clone https://github.com/MEGA65/mega65-core.git**
  
-The source-code will then be placed in the "~/mega65" path.+The source-code will then be placed in the "~/mega65-core" path.
  
 ===== Installing Ophis ===== ===== Installing Ophis =====
Line 128: Line 129:
  
   * **cd ~/Downloads**   * **cd ~/Downloads**
-  * **git clone http://git.code.sf.net/p/ghdl-updates/ghdl-updates.git ghdl-updates**+  * **%%git clone http://git.code.sf.net/p/ghdl-updates/ghdl-updates.git ghdl-updates --config core.autocrlf=input%%**
   * **cd ghdl-updates**   * **cd ghdl-updates**
-  * **./configure --with-gcc=$HOME/Downloads/gcc/gcc-4.9.3**+  * **%%./configure --with-gcc=$HOME/Downloads/gcc/gcc-4.9.3%%**
   * **make copy-sources**   * **make copy-sources**
  
Line 137: Line 138:
   * **cd ~/Downloads/gcc/**   * **cd ~/Downloads/gcc/**
   * **mkdir gcc-objs; cd gcc-objs**   * **mkdir gcc-objs; cd gcc-objs**
-  * **../gcc-4.9.3/configure --prefix=/opt/gcc-4.9.3 --enable-languages=c,vhdl --disable-bootstrap --disable-lto --disable-multilib**+  * **%%../gcc-4.9.3/configure --prefix=/opt/gcc-4.9.3 --enable-languages=c,vhdl --disable-bootstrap --disable-lto --disable-multilib%%**
   * **make -j2**   * **make -j2**
     * If you get an error saying "//../../gcc-4.9.3/libcpp/system.h:142:63: error: ‘fputs_unlocked’ was not declared in this scope//":     * If you get an error saying "//../../gcc-4.9.3/libcpp/system.h:142:63: error: ‘fputs_unlocked’ was not declared in this scope//":
       * Edit the "**gcc-4.9.3/libcpp/system.h**" file       * Edit the "**gcc-4.9.3/libcpp/system.h**" file
       * Towards the start of the file, add "**#define __GNU_VISIBLE 1**" (prior to "#include <stdio.h>")       * Towards the start of the file, add "**#define __GNU_VISIBLE 1**" (prior to "#include <stdio.h>")
 +      * run **make -j2** again
 +    * If you get an error saying "//: No such file or directory//", try typing:
 +      * **export SHELLOPTS**
 +      * **set -o igncr**
       * run **make -j2** again       * run **make -j2** again
   * **make install**   * **make install**
   * **rm /usr/bin/ghdl**   * **rm /usr/bin/ghdl**
   * **ln -s /opt/gcc-4.9.3/bin/ghdl.exe /usr/bin/ghdl**   * **ln -s /opt/gcc-4.9.3/bin/ghdl.exe /usr/bin/ghdl**
-  * As a test, try typing "**ghdl --disp-config**"+  * As a test, try typing "**%%ghdl --disp-config%%**"
   * take a look at the output, and assure that there's no text anywhere that says "//ghdl: installation problem://". If not, your ghdl exe is good to go! :)   * take a look at the output, and assure that there's no text anywhere that says "//ghdl: installation problem://". If not, your ghdl exe is good to go! :)
  
Line 158: Line 163:
     * **./cpu_test.exe 2>&1 | grep gs4510 | grep MAP**     * **./cpu_test.exe 2>&1 | grep gs4510 | grep MAP**
  
-You should start seeing cpu instructions being outputted to the screen as they are executed.+You should start seeing cpu instructions being outputted to the screen as they are executed, something like the following: 
 + 
 +<code> 
 +gs4510.vhdl:915:9:@980ns:(report note): $8100 4C D3 8C  jmp  $8CD3         A:11 X:22 Y:33 Z:00 SP:BEFF P:24 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.I.. 
 +gs4510.vhdl:915:9:@1060ns:(report note): $8CD3 78        sei                A:11 X:22 Y:33 Z:00 SP:BEFF P:24 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.I.. 
 +gs4510.vhdl:915:9:@1220ns:(report note): $8CD4 A9 00     lda  #$00          A:00 X:22 Y:33 Z:00 SP:BEFF P:26 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.IZ. 
 +gs4510.vhdl:915:9:@1500ns:(report note): $8CD6 8D 00 BF  sta  $BF00         A:00 X:22 Y:33 Z:00 SP:BEFF P:26 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.IZ. 
 +gs4510.vhdl:915:9:@1900ns:(report note): $8CD9 4C E5 8C  jmp  $8CE5         A:00 X:22 Y:33 Z:00 SP:BEFF P:26 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.IZ. 
 +gs4510.vhdl:915:9:@2220ns:(report note): $8CE5 20 8E 8C  jsr  $8C8E         A:00 X:22 Y:33 Z:00 SP:BEFD P:26 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.IZ. 
 +gs4510.vhdl:915:9:@2300ns:(report note): $8C8E 78        sei                A:00 X:22 Y:33 Z:00 SP:BEFD P:26 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.IZ. 
 +gs4510.vhdl:915:9:@2380ns:(report note): $8C8F D8        cld                A:00 X:22 Y:33 Z:00 SP:BEFD P:26 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.IZ. 
 +gs4510.vhdl:915:9:@2460ns:(report note): $8C90 03        see                A:00 X:22 Y:33 Z:00 SP:BEFD P:26 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.IZ. 
 +gs4510.vhdl:915:9:@2540ns:(report note): $8C91 38        sec                A:00 X:22 Y:33 Z:00 SP:BEFD P:27 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.IZC 
 +gs4510.vhdl:915:9:@2860ns:(report note): $8C92 20 EC 95  jsr  $95EC         A:00 X:22 Y:33 Z:00 SP:BEFB P:27 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.IZC 
 +gs4510.vhdl:915:9:@3180ns:(report note): $95EC B0 06     bcs  $95F4         A:00 X:22 Y:33 Z:00 SP:BEFB P:27 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.IZC 
 +gs4510.vhdl:915:9:@3340ns:(report note): $95F4 A9 47     lda  #$47          A:47 X:22 Y:33 Z:00 SP:BEFB P:25 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.I.C 
 +gs4510.vhdl:915:9:@3620ns:(report note): $95F6 8D 2F D0  sta  $D02F         A:47 X:22 Y:33 Z:00 SP:BEFB P:25 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.I.C 
 +gs4510.vhdl:915:9:@3780ns:(report note): $95F9 A9 53     lda  #$53          A:53 X:22 Y:33 Z:00 SP:BEFB P:25 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.I.C 
 +gs4510.vhdl:915:9:@4060ns:(report note): $95FB 8D 2F D0  sta  $D02F         A:53 X:22 Y:33 Z:00 SP:BEFB P:25 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.I.C 
 +gs4510.vhdl:915:9:@4460ns:(report note): $95FE 60        rts                A:53 X:22 Y:33 Z:00 SP:BEFD P:25 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.I.C 
 +gs4510.vhdl:915:9:@4860ns:(report note): $8C95 AD 31 D0  lda  $D031         A:61 X:22 Y:33 Z:00 SP:BEFD P:25 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.I.C 
 +gs4510.vhdl:915:9:@5020ns:(report note): $8C98 09 40     ora  #$40          A:61 X:22 Y:33 Z:00 SP:BEFD P:25 $01=F5 MAPLO:4000 MAPHI:3F00   ..E-.I.C 
 +</code>
preparing_a_build_environment_in_cygwin.1467798288.txt.gz · Last modified: 2016/07/06 03:44 by gurce