Skip to content

Commit

Permalink
updating instructions, antlr4 removing uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
sylefeb committed Jan 20, 2024
1 parent 051bea3 commit 836f185
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 44 deletions.
45 changes: 5 additions & 40 deletions GetStarted_Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,13 @@

## Compiling Silice

First, some dependencies are required. To install all of them you may run the script `install_dependencies_linux.sh` that uses `apt`, or inspect the script content and manually add the missing packages. Note that the Java jre/jdk are only required for compilation.
Hopefully this will be as simple as running `./get_started_linux.sh`
Beware that this script is installing dependencies and will request sudo access. If that is not ok, please open the script and see what it wants to install.

Compiling Silice should then be as simple as:
```shell
git clone --recurse-submodules https://github.com/sylefeb/Silice.git
cd Silice
./compile_silice_linux.sh
```
Dependencies are installed by the scripts `install_dependencies_*.sh`. The `get_started_linux.sh` script attempts to detect your distrib to call the corresponding dependencies installation script, but if that fails you may have to manually install the dependencies. In such a case, please refer to the script's contents to see what's needed. Note that the Java jre/jdk are only required for compilation.

Done! This compiled and installed the Silice executable in `Silice/bin/`.

**Note:** It is highly recommended for all tools to be available from the PATH (Silice/bin, yosys, nextpnr, dfu-utils, fujprog, etc.). This is required by the default build system.

## Getting the toolchain

Using Silice with your FPGA requires many other tools: yosys, icestorm, trellis, nextpnr, verilator, icarus verilog (*iverilog*), gtkwave, fujprog, dfu-utils.

**Note:** It is highly recommended for all tools to be available from the PATH. This is required by the default build system.

The most critical are yosys, icestorm, trellis, nextpnr. For these ones, please do not use any package that
may come with your system. These are likely outdated and won't understand the latest features. Verilator also often needs to be updated.

There are two options:

### Compile from source (recommended)

Yosys, icestorm, trellis, nextpnr, verilator are not difficult to compile and install, and have detailed instructions on their git pages:
- [Yosys](https://github.com/YosysHQ/yosys)
- [Project trellis](https://github.com/YosysHQ/prjtrellis)
- [Project icestorm](https://github.com/YosysHQ/icestorm)
- [NextPNR](https://github.com/YosysHQ/nextpnr)
- [Verilator](https://github.com/verilator/verilator)

Note that trellis and icestorm have to be compiled and installed before nextpnr (please refer to the NextPNR setup instructions).

These tools take a bit of time to compile, but it is worth doing as they constantly improve.

> **Note** You might want to apply my [ice40 DSP patch](https://github.com/sylefeb/fpga-binutils/blob/master/patches/yosys_patch_ice40_dsp.diff) on Yosys before compiling.
### Use compiled binaries

Checkout the [fpga-toolchain project](https://github.com/open-tool-forge/fpga-toolchain) as they provide nightly builds of many tools for multiple platforms.
The `get_started_linux.sh` script will install all dependencies, including pre-compiled binaries for the FPGA toolchain (from [oss-cad-suite](https://github.com/YosysHQ/oss-cad-suite-build)).
It will then compile and install Silice using standard paths (`/usr/local/bin` and `/usr/local/shared/silice`).

## Testing

Expand Down
2 changes: 1 addition & 1 deletion GetStarted_Windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Then, from the prompt, enter the Silice directory and type: `./get_started_mingw

> **Note:** The script adds Silice and the FPGA toolchain to PATH in` ~/.bashrc`. Open a new MinGW64 prompt to start using Silice.
> **Note:** This automatically downloads pre-compiled FPGA tools from https://github.com/sylefeb/fpga-binutils/ (~16MB) as well as installs required MinGW64 packages. For details please refer to the [script source code](get_started_mingw64.sh).
> **Note:** This automatically downloads a pre-compiled FPGA toolchain from [oss-cad-suite](https://github.com/YosysHQ/oss-cad-suite-build) as well as installs required MinGW64 packages. For details please refer to the [script source code](get_started_mingw64.sh).
## Drivers

Expand Down
6 changes: 3 additions & 3 deletions antlr/antlr4-cpp-runtime-4.7.2-source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ endif()

if(CMAKE_SYSTEM_NAME MATCHES "Linux")
find_package(PkgConfig REQUIRED)
pkg_check_modules(UUID REQUIRED uuid)
# pkg_check_modules(UUID REQUIRED uuid)
endif()
if(APPLE)
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
Expand Down Expand Up @@ -106,7 +106,7 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHE
if(NOT (GCC_VERSION VERSION_GREATER 5.0 OR GCC_VERSION VERSION_EQUAL 5.0))
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 5.0 or greater.")
endif ()
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND ANDROID)
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND ANDROID)
# Need -Os cflag and cxxflags here to work with exception handling on armeabi.
# see https://github.com/android-ndk/ndk/issues/573
# and without -stdlib=libc++ cxxflags
Expand All @@ -123,7 +123,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND ( CMAKE_SYSTEM_NAME MATCH
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
elseif(MSVC_VERSION GREATER 1800 OR MSVC_VERSION EQUAL 1800)
# Visual Studio 2012+ supports c++11 features
# Visual Studio 2012+ supports c++11 features
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
# default fallback (e.g. EMSCRIPTEN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
Expand Down

0 comments on commit 836f185

Please sign in to comment.