Skip to content
Snippets Groups Projects
Select Git revision
  • 681b6ecddbc6ed6c2f48d68f44b5bf4888913032
  • main default
  • laudantium-unde-et-iste-et
  • ea-dolor-quia-et-sint
  • ipsum-consequatur-et-in-et
  • sapiente-et-possimus-neque-est
  • qui-in-quod-nam-voluptatem
  • aut-deleniti-est-voluptatum-repellat
  • modi-et-quam-sunt-consequatur
  • et-laudantium-voluptas-quos-pariatur
  • voluptatem-quia-fugit-ut-perferendis
  • at-adipisci-ducimus-qui-nihil
  • dolorem-ratione-sed-illum-minima
  • inventore-temporibus-ipsum-neque-rerum
  • autem-at-dolore-molestiae-et
  • doloribus-dolorem-quos-adipisci-et
  • sed-sit-tempore-expedita-possimus
  • et-recusandae-deleniti-voluptas-consectetur
  • atque-corrupti-laboriosam-nobis-explicabo
  • nostrum-ut-vel-voluptates-et
  • quisquam-dolorum-minus-non-ipsam
21 results

README.md

Blame
  • set_env.sh 1.47 KiB
    #-----------------------------------------------------------------------------
    # SoC Labs Environment Setup Script
    # A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license.
    #
    # Contributors
    #
    # David Mapstone (d.a.mapstone@soton.ac.uk)
    #
    # Copyright  2023, SoC Labs (www.soclabs.org)
    #-----------------------------------------------------------------------------
    #!/bin/bash
    
    # Get Root Location of Design Structure
    if [ -z $DESIGN_ROOT ]; then
        # If $DESIGN_ROOT hasn't been set yet
        DESIGN_ROOT=`git rev-parse --show-superproject-working-tree`
    
        if [ -z $DESIGN_ROOT ]; then
            # If not in a submodule - at root
            DESIGN_ROOT=`git rev-parse --show-toplevel`
        fi
    
        # Source Top-Level Sourceme
        source $DESIGN_ROOT/set_env.sh
    else
        # Set Environment Variable for this Repository
        export NANOSOC_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
    
        # If this Repo is root of workspace
        if [ $NANOSOC_DIR = $DESIGN_ROOT ]; then
            echo "Design Workspace: $DESIGN_ROOT" 
            export DESIGN_ROOT
            # Set Default Simulator
            export SIMULATOR="ivlog"
        fi
    
        # Source environment variables for all submodules
        for d in $NANOSOC_DIR/* ; do
            if [ -f "$d/.git" ]; then
                if [ -f "$d/set_env.sh" ]; then
                # If .git file exists - submodule
                    source $d/set_env.sh
                fi
            fi
        done
    
        # Add Scripts to Path
        export PATH="$PATH:/$NANOSOC_DIR/flow"
    fi