Skip to content

FREEWING-JP/zpugcc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 

Repository files navigation

32bitマイコン Zylin CPUの ZPU用の GCC toolchainを WSL環境でビルドする方法

(How to build Zylin ZPU's GCC toolchain with Windows WSL)
http://www.neko.ne.jp/~freewing/fpga/zpu_soft_core_build_zpu_gcc_toolchain/

Environment

  • Windows 10 WSL Windows Subsystem for Linux
  • Raspberry Pi OS Lite Release date: April 4th 2022 32-bit

zpugcc

This repository contain the gcc, which is adapted for https://github.com/zylin/zpu CPU, the worlds smallest 32 bit CPU with GCC toolchain.

ZPU toolchain source code

The ZPU toolchain is too big to be hosted together with the HDL and the idea is that most HDL or normal users would not want to download and build their own toolchain.

ZPU build instructions to build unstable on linux (same for CygWin32)

git clone https://github.com/zylin/zpugcc.git
cd toolchain/toolchain
sh fixperm.sh
. env.sh
sh build.sh
tar -cjvf zpugcclinux_unstable.tar.bz2 install 

Build a different version

git log => shows log entries
git checkout 322875263beccb1d75936bd1dd9150c1647dc9c0 => checkout a version
Note that build.sh is only present in the later versions, but that it should work fine for those versions in git where it is absent. 

Cygwin build problems

If you are having problems building with Cygwin, try erasing the entire c:\cygwin folder and try again.

Languages

  • C 52.4%
  • Ada 14.3%
  • Java 5.8%
  • C++ 5.6%
  • Makefile 4.6%
  • Assembly 4.6%
  • Other 12.7%