Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 2.85 KB

README.md

File metadata and controls

71 lines (52 loc) · 2.85 KB

Visual Studio Code (VSCode) Integration

Setup

  1. Install the needed tools

    Ubuntu:

    sudo apt update
    sudo apt install gdb-multiarch git cmake build-essential lldb         # development tools
    sudo apt install libelf-dev libsdl2-dev libvncserver-dev libslirp-dev # dependencies
  2. Run the setup script to fetch the compiled Linux kernel from avp64_sw and the source files for debugging

    <avp64 root>/vscode/setup.bash
  3. Install the VSCode extensions

    • In the end of the setup script, VSCode opens
    • Import the avp64.code-profile by following the instructions here. This install the required extensions
  4. Configure the project

    • Press F1 and type CMake: Configure
    • Select the C++ compiler
  5. Build the project

    • Press F1 and type CMake: Build
  6. Install the project

    • The project is configured to be installed at <avp64 root>/build/{debug|release}/. (This setting can be changed in the <avp64 root>/.vscode/settings.json file)
    • To install the project, press F1 and type CMake: Install

Start AVP64

  1. Open the Debug view (Ctrl+Shift+D)

  2. At the top, after the green arrow, select Debug AVP64

  3. Press the green arrow to start AVP64

  4. Change to the terminal window (Ctrl+Shift+`) to see the the output of avp64. The VP waits for a debugger to connect. Sample output:

            SystemC 2.3.3-MachineWare GmbH --- Jul 26 2024 14:01:36
            Copyright (c) 1996-2018 by all Contributors,
            ALL RIGHTS RESERVED
    [I 0.000000000] system.term0: listening on port 52010
    [I 0.000000000] system.term1: listening on port 52011
    [I 0.000000000] system.term2: listening on port 52012
    [I 0.000000000] system.term3: listening on port 52013
    [D 0.000000000] created slirp ipv4 network 10.0.0.0/24
    [D 0.000000000] created slirp ipv6 network fec0::
    [I 0.000000000] system: starting infinite simulation using 100 us quantum
    [I 0.000000000] system.cpu: waiting for GDB connection on port 5555
    [I 0.000000000] system.cpu.arm0: listening for GDB connection on port 52100
    [I 0.000000000] system.cpu.arm1: listening for GDB connection on port 52101
    
  5. Connect the debugger by going back to the Debug view (Ctrl+Shift+D)

  6. At the top, after the green arrow, select Debug Target SW

  7. Press the green arrow to connect the debugger

  8. You can control the target using the control panel at the top. You can use the dropdown menu to switch between debugging avp64 and the target software.