![]() |
stm32-camera
1.0
|
A simple driver for the OV7670 on the STM32 platform. This is the base of the project. Built behind the F4 MCU family, NUCLEO-F446ZE.
This is a project to test my skills with writing tests for embedded systems and creating drivers from data-sheets.
Docs are hosted at https://stm32-camera.readthedocs.io/ they are rebuilt automatically every commit or PR. Doxygen is used to create the docs.
To get the repo, you will need git installed on your computer.
Open a terminal and type git clone https://gitlab.com/stm32-camera/ov7670-stm32-driver --recursive
, this will get the repo and all the sub modules of the drivers along side it in one big clone.
This project requires, Ceedling for the tests.
Get Ceedling through the 'gem' ruby package manager. On Fedora Linux install this by running
sudo dnf install gem
Then install Ceedling by running
gem install ceedling
This project uses a lot of build tools to compile the project.
The main list of them is as follows:
`arm-none-eabi-gcc arm-none-eabi-gcc-cs cmake make meson arm-none-eabi-newlib openocd `
These can be installed through your distro's repos.
After you have all the build tools, go into the root of the project and type ./build.sh
.
This will then build and link the project into .bin and .elf files. It will then prompt you to press y or n for running the tests. This will be run when a new PR is created or when code is pushed but it is good practise to always run these after making a few changes and before pushing.
If on Windows get STM32CubeIDE from the ST website (https://www.st.com/en/development-tools/stm32cubeide.html) and run and install the application per instructions.
If on a Linux based OS, the easiest way to install the STM32CubeIDE is through flathub, configuring flatpak and flathub on your distro is as easy as typing a few commands, see here https://flatpak.org/setup/
Once flathub is configured, into a new terminal, type:
sudo flatpak install com.st.STM32CubeIDE
to install the IDE regardless of distribution.
Talking to the development board is nessisary to flash and debug the code, on Windows the drivers can be installed by getting the single binary file from this Github page https://github.com/stlink-org/stlink .
On Linux, getting the tools can be done by install the stlink-tools
in your distributions repos, see here for more help https://github.com/stlink-org/stlink .
Configuring the application is pretty simple, open the cloned repo in STM32CubeIDE by pressing on File->Import, then type 'ioc' and select the option.
From here select the .ioc file in the cloned directory, this will open the code in your IDE, you from here can run or debug the application and make edits to the .ioc file.
Coming soon...
To build the doxygen documentation manually, run doxygen doxygen.yml
in the root of the cloned directory. This will output the documentation in the Documentation/
folder.
For this project the OV7670 camera, a 1.8inch adafruit ST7735R display, £15 logic analyser and a NUCLEO-F446ZE.
Links are here:
OV7670: https://www.amazon.co.uk/AZDelivery-Camera-Module-OV7670-Parent/dp/B0797QDDPJ
Display: https://www.adafruit.com/product/358
Logic analyser: https://www.amazon.co.uk/Hobby-Components-24MHz-Analyser-1-1-16/dp/B00DAYAREW
Had to change boards because the last one was out of stock till August, the F446ZE will do.
Coming soon...
Coming soon...