This repository contains all the materials and exercises for the Computer Architectures and Operating Systems course. The repository utilizes a script to keep all submodules up to date.
Note: This repository is for educational purposes only. Make sure to follow the course rules and guidelines when utilizing these materials.
Note: The current implementation is not fully up to date. Modifications will follow to address all outstanding issues.
This repository serves as a collection point for all the labs and exercises related to the course. It is designed to automatically clone or pull updates from the official teaching repositories and to provide a clear workflow for adding personal modifications to the exercises.
By using a script to manage submodules, the repository ensures that all dependencies and repositories are always up-to-date.
Laboratories/
: Contains all laboratory repositories.Exercises/
: Contains all exercise repositories.urls.txt
: A file containing all repository URLs and their custom names.manage_submodules.sh
: A script used to automatically clone and update all submodules (laboratories and exercises).
Below is the current list of repositories managed by the script:
Type | Repository URL | Custom Name |
---|---|---|
CAOS | CAOS Repository | CAOS Repository |
FreeRTOS | FreeRTOS Repository | FreeRTOS Repository |
Lab | Lab1 - Setup | Lab1 - Setup |
Lab | Lab2 - baremetal | Lab2 - baremetal |
Lab | Lab3 - FreeRTOS | Lab3 - FreeRTOS |
Lab | Lab4 - Synch | Lab4 - Synch |
Lab | Lab5 - Peripherals | Lab5 - Peripherals |
Exercise | ARM Bare Metal | ARM Bare Metal |
Exercise | CrossCompilation | CrossCompilation |
Exercise | FreeRTOS_HelloWorld | FreeRTOS_HelloWorld |
Exercise | MyFirstOS | MyFirstOS |
Exercise | Process Scheduling | Process Scheduling |
Exercise | MySpinLockARM | MySpinLockARM |
Exercise | Timers | Timers |
Exercise | FreeRTOS_sampleapp | FreeRTOS_sampleapp |
Exercise | Interrupts | Interrupts |
Exercise | Synchronization and intertask communications | Synchronization and intertask communications |
To clone the repository along with all the submodules:
git clone --recurse-submodules https://github.com/neo-CAOS/Teaching-material.git
cd Teaching-material
The script manage_submodules.sh
automates the process of updating all the submodules (labs and exercises). It reads repository URLs from the urls.txt
file, clones them (if not already cloned), or pulls updates from the remote repositories.
To run the script:
./manage_submodules.sh
The script will:
- Clone any missing repositories into the
Laboratories/
andExercises/
directories. - Pull updates for existing repositories.
Although many labs and exercises rely on the FreeRTOS
submodule, it is more convenient to clone the FreeRTOS
repository only once at the root of this repository. This reduces redundancy and ensures that the FreeRTOS codebase remains consistent across all exercises and labs.
To simplify this process, the provided manage_submodules.sh
script is designed to clone the FreeRTOS repository into the root directory of this repository (Teaching-material
). Once cloned, users must manually update the paths in the Makefile
file of each lab and exercise to use a relative path pointing to the centralized FreeRTOS
repository.
-
Clone the FreeRTOS Repository: If you haven't already cloned the
FreeRTOS
repository, run the following command:./manage_submodules.sh
This will clone the FreeRTOS repository into the root directory.
-
Remove Empty FreeRTOS Directories: To avoid potential conflicts, empty
FreeRTOS
directories in individual labs and exercises should be deleted. For example:find Laboratories/ Exercises/ -type d -name "FreeRTOS" -empty -delete
This ensures that the centralized
FreeRTOS
repository is used instead. -
Update Relative Paths: Update the paths in each lab and exercise's
README
or configuration files to point to the centralizedFreeRTOS
repository. For example:Old Path: ../../FreeRTOS New Path: ../../../FreeRTOS
Ensure that these paths are consistent across all dependent repositories.
- It is the responsibility of each user to update the paths in their local environment. The repository does not automatically handle this configuration.
- Check the
README
of each lab or exercise for specificFreeRTOS
requirements and compatibility information.
To work on the exercises and make your own modifications without affecting the main repository, follow these steps to create a new personal
branch:
-
Switch to the
main
branch (if you're not already on it):git checkout main
-
Create and switch to a new branch called
personal
:git checkout -b personal
-
Make your changes and commit them:
git add . git commit -m "My modifications to the exercises"
-
Push your personal
branch
to GitHub:git push -u origin personal
Once the branch is pushed, you will be able to switch between the main
and personal
branches in GitHub and view your modifications by selecting the corresponding branch.
Feel free to fork the repository and make pull requests to improve the workflow or fix any issues. Contributions are always welcome!
This repository is licensed under the MIT License. See the LICENSE file for more details.
- Copy the above content into a file named
README.md
and place it in the root directory of your repository. - This provides a comprehensive overview of how to manage the repositories and how the script works, including a section for personal modifications.
Let me know if you'd like any changes!