Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

APAI-LAB01: Basics of Embedded Programming on PULP

Material

Assignment: here Slides: here

Summary:

The target device for the lab sessions is the multi-core PULP platform. The PULP Virtual Platform simulator GVSOC, which is included within the PULP SDK, will be used during the class.

  • Subject(s): hello-world, vector sum, matrix-vector mul, profiling code execution;
  • Programming Language: C;
  • Lab duration: 3h
  • Objective: Embedded programming & profiling. You will learn basics of embedded programming, the pulp architecture, basic operations (sum & matmul), and how to profile your code execution (MAC, cycles) !
  • AI policy: You may use AI tools, but the lab is meant to be a hands-on learning experience. The AGENTS.md file instructs AI agents to guide you towards the solution rather than give it to you directly.

Contacts

How to deliver the assignment:

Use Virtuale, upload only the assignment file named as follows: LAB#_APAI_yourname.pdf

Assignment DEADLINE: Sunday, 25/10/2026 (at 23:59)


Quickstart

The steps differ depending on whether you work on your personal machine (Docker container) or on a lab machine (pre-configured virtual machine). See the "Prerequisites" section of the slides for detailed instructions.

Prerequisites (personal machines only)

  1. (Windows only) Install WSL 2.
  2. Install Docker Desktop (on Windows, choose the Windows version even if you work with WSL).
  3. Install VS Code and the Dev Containers extension.

How to set the environment (personal machines)

  1. Open a terminal in the location where you wish to work (on Windows, a WSL terminal).
  2. Clone this repository:
git clone https://github.com/EEESlab/APAI26-LAB01-PULP-Embedded-Programming.git
  1. Enter the cloned directory:
cd APAI26-LAB01-PULP-Embedded-Programming/
  1. Open the directory in VS Code:
code .
  1. Reopen the project inside the Docker container: press CTRL + Shift + P, type Dev Containers: Reopen in Container and press Enter. The bottom-left corner of VS Code confirms that you are inside the container.
  2. Open a terminal inside VS Code (Terminal -> New Terminal). This terminal runs inside the container, with the PULP SDK already set up.
  3. Now you're ready to start!

Troubleshooting (Windows + WSL): if VS Code reports a Docker error when reopening in the container, open Docker Desktop, go to Settings -> Resources -> WSL integration, enable the integration for your installed distros (or all of them), then click Apply & Restart. If needed, close and reopen VS Code.

How to set the environment (lab machines)

The lab computers provide an Ubuntu-based virtual machine that already contains the PULP SDK and VS Code (used only for code editing and the terminal), so the Docker container is not needed.

  1. From a browser outside the virtual machine, download the lab resources from Virtuale as a zip file and extract it (right-click -> Extract).
  2. Go to C:/VM_APAI and double-click PULP-box.ova. When VirtualBox opens, click on "Finish"/"Fine".
  3. Once the VM is imported, start it by clicking on "Start"/"Avvia".
  4. Log in with username pulp-box and password pulp.
  5. From the top-bar menu, open Machine -> File Manager (left panel: files on the PC, right panel: files in the VM; enter the login credentials at the bottom of the right panel). Drag and drop the lab files into a subdirectory of the VM home directory (required for write permissions).
  6. Inside the VM, open a terminal and set up the PULP SDK:
source setup_pulp_sdk.sh
  1. Use cd to go to the location where you put the lab files.

How to run the code

Enter one of the exercise folders (00_pulp_hello_world, 01_vector_sum, 02_matrix_vector) and run:

make clean all run

For example, to check that everything works:

cd 00_pulp_hello_world/
make clean all run

You should see the Hello, world! -from PULP message in the terminal.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages