cu-ecen-aeld / final-project-aasu8675

final-project-aasu8675 created by GitHub Classroom
MIT License
0 stars 0 forks source link

Sprint 3 - Integrate device driver code and change application code to integrate it . #5

Closed aasu8675 closed 9 months ago

aasu8675 commented 9 months ago

Find a mechanism to integrate the gpio device driver code into the tegra image. Either by adding another layer to the base image which contains the recipe for the gpio driver or by adding the recipe to an existing layer and resolving issues which exists in sprint 2.

DoD:

Blockers: Integrating the recipe in an existing layer throws an error related to a linker file defined here in the last comment. Existing documentation for tegra image is minimal.

aasu8675 commented 9 months ago

Device driver is functional. Echoing 0 and 1 switches off/on the buzzer.

Driver Repo Code: https://github.com/aasu8675/Jetson_Nano_GPIO_Driver.git

IMG_6863

Video showcases working

https://github.com/cu-ecen-aeld/final-project-aasu8675/assets/123521880/5fef567b-27bc-47bc-adad-436a5991c717

aasu8675 commented 9 months ago

Wrote a start-up service script to load the driver at boot time using systemd init manager.

Using the journalctl utility which is a logging utility for systemd, the installation was verified.

IMG_6862

The package added is called gpioservice which is located here: https://github.com/aasu8675/meta-nanovision-ai/tree/main/recipes-device-drivers/gpioservice

aasu8675 commented 9 months ago

Added a meta-nanovision-ai layer in the yocto build repository. This layer would contain newly created recipes liked the gpio driver recipes and its start-up service scripts support.

The layer inclusion is placed at: https://github.com/cu-ecen-aeld/final-project-aasu8675/blob/master/layers/meta-nanovision-ai

It uses a symbolic link to references the repository under repos directory. Which references the following repository:

https://github.com/aasu8675/meta-nanovision-ai End Product at Commit ID: 18b127575f2886f6d674bee47351f0fb9a6a8e37

aasu8675 commented 9 months ago

Added a test application which is added into the image.

The recipe (recipe-device-driver/gpioapplication) is placed in the following repo: https://github.com/aasu8675/meta-nanovision-ai.git [Commit ID] (https://github.com/aasu8675/meta-nanovision-ai/commit/3005a0acc831f9f1d21ce9635457c45a8e8541ec)

Source Code for the test Application is sourced from the following repo: https://github.com/aasu8675/gpio_test.git

aasu8675 commented 9 months ago

Integrated gpio device driver code into the application code present at : https://github.com/cu-ecen-aeld/final-project-Suraj-Ajjampur.git Commit ID: 0e10a2f429e2ef7badfa4a345f1bf953e72722a6

The docker container now checks for valid Line Crossing Cumulation Count, and if its more than 0 it switches on the buzzer.