2023-07-31 08:47:57 +00:00
|
|
|
# Zephyr configurator
|
|
|
|
|
2023-08-08 06:35:04 +00:00
|
|
|
## Project structure
|
|
|
|
### File structure
|
|
|
|
```
|
|
|
|
├── data
|
|
|
|
│ ├── app.overlay
|
|
|
|
│ ├── CMakeLists.txt
|
|
|
|
│ ├── main.c
|
|
|
|
│ ├── prj.conf
|
|
|
|
│ └── VERSION
|
|
|
|
├── Dockerfile
|
|
|
|
├── Entwicklungsleitfaden.md
|
|
|
|
├── images
|
|
|
|
│ ├── ...
|
|
|
|
├── README.md
|
|
|
|
├── script.sh
|
|
|
|
└── snippets
|
|
|
|
├── ...
|
|
|
|
```
|
|
|
|
|
|
|
|
`data` contains the empty project, that is used to generate a new project \
|
|
|
|
`images` contains images for the documentation \
|
|
|
|
`snippets` contains code snippets for functions \
|
|
|
|
`script.sh` main script
|
|
|
|
|
|
|
|
### Snippets
|
|
|
|
The snippets are used to add new functions to the project. Each function has one directory with one or more files.
|
|
|
|
|
|
|
|
To add new functions, you have to create a new directory in the `snippets`-directory and adjust the script.
|
|
|
|
|
|
|
|
### script.sh
|
|
|
|
The main script that is the entrypoint of the docker container
|
|
|
|
|
2023-07-31 08:47:57 +00:00
|
|
|
## Run
|
2023-07-31 09:02:35 +00:00
|
|
|
### [Optional] Build manually
|
|
|
|
```
|
|
|
|
docker build . -t git.flokaiser.com/h4ck3r-01/zephyr-configurator
|
2023-07-31 08:47:57 +00:00
|
|
|
```
|
|
|
|
|
2023-07-31 09:02:35 +00:00
|
|
|
### Create volume and run
|
|
|
|
Creating the volume is needed due to permission problems on some systems.
|
|
|
|
```
|
2023-07-31 08:47:57 +00:00
|
|
|
docker volume create --driver local --name zephyr --opt type=none --opt device=$HOME/zephyrproject --opt o=uid=root,gid=root --opt o=bind
|
2023-07-31 09:02:35 +00:00
|
|
|
|
|
|
|
docker run -it -v zephyr:/workdir --rm git.flokaiser.com/h4ck3r-01/zephyr-configurator
|
2023-07-31 08:47:57 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Developing
|
|
|
|
1. Create the zephyr workspace if you are running the container for the first time by using the first option in the menu
|
|
|
|
2. Create a new project by selecting the second option
|
|
|
|
3. Open the `$HOME/zephyrproject/app` directory in your IDE. The source code is located in the `src` subdirectory.
|
|
|
|
4. Build and flash the project using the options 4 and 5.
|
2023-07-31 08:59:16 +00:00
|
|
|
|
|
|
|
If you want to compile zepyhr for another plattform you have to clear the build directory first.
|