Documentation

This commit is contained in:
Robin Dietzel 2023-02-03 19:56:27 +01:00
parent 47cf5388e3
commit bb0cd45a76
10 changed files with 82 additions and 3 deletions

8
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

1
.idea/.name generated Normal file
View File

@ -0,0 +1 @@
FloatPUMP

11
.idea/cmake.xml generated Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeSharedSettings">
<configurations>
<configuration PROFILE_NAME="Debug-fw" ENABLED="true" GENERATION_DIR=".out/fw-debug" CONFIG_NAME="Debug" TOOLCHAIN_NAME="dev-arm-stm32" NO_GENERATOR="true" />
<configuration PROFILE_NAME="Release-fw" ENABLED="true" GENERATION_DIR=".out/fw-release" CONFIG_NAME="Release" TOOLCHAIN_NAME="dev-arm-stm32" NO_GENERATOR="true" />
<configuration PROFILE_NAME="RelWithDebInfo-fw" ENABLED="true" GENERATION_DIR=".out/fw-relwithdebinfo" CONFIG_NAME="RelWithDebInfo" TOOLCHAIN_NAME="dev-arm-stm32" NO_GENERATOR="true" />
<configuration PROFILE_NAME="MinSizeRel-fw" ENABLED="true" GENERATION_DIR=".out/fw-minsizerel" CONFIG_NAME="MinSizeRel" TOOLCHAIN_NAME="dev-arm-stm32" NO_GENERATOR="true" />
</configurations>
</component>
</project>

2
.idea/floatpump-firmware.iml generated Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />

4
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
</project>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/floatpump-firmware.iml" filepath="$PROJECT_DIR$/.idea/floatpump-firmware.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -1,4 +1,43 @@
# Toolchain Setup # FloatPUMP - Firmware Repository
## Prerequisites This repository contains the necessary files to completely build the firmware for the FloatPUMP controller.
- Install Docker The toolchain used in this project is built up using **docker**. The following sections describe how to setup the jetbrains
CLion IDE to automatically use the included docker image to build the project. It also contains some description
on how to use OpenOCD to flash the controller using a **STLink-V2** Programmer.
## Toolchain Setup
This chapter describes how to setup the CLion IDE to use the toolchain built with docker.
### Prerequisites
- Install jetbrains CLion IDE
- Install Docker
- Open the Project by clicking _New project from version control_
### Build the docker image
You can build the image by yourself. Alternatively you can pull the image from the robtor.de registry.
Open a command line and enter the subdirectory build-tools. There run the follwing command to
build the docker image:
`docker build -t dev-arm-stm32:latest .`
As an alternative you could open the Dockerfile in this directory using CLion and build it directly out of the IDE!
### Pulling the image
This method is currently not supported. Coming soon...
### Configure toolchain
First enter the Settings dialog in CLion while the floatpump-firmware project is opened.
Under `Build, Execution, Deployment > Toolchain` add a new toolchain and choose the type `docker`.
Now setup everything as depicted in this screenshot:
![toolchain_settings.png](toolchain_settings.png)
If you named the image different than dev-arm-stm32:latest, choose the correct image corresponding to your name.
Usually now the correct CMake build targets should appear under `Build, Execution, Deployment > CMake`.
### Configure OpenOCD
To configure OpenOCD for directly flashing and debugging out of CLion go to the BuildTargets dropdown in the
header line and click on `Edit configurations`.
There add a new configuration for `OpenOCD` and enter the following proerties:
![openocd_settings.png](openocd_settings.png)
As `Board config file` chosse the correct `floatpump.cfg` file contained in the project root dir.

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB