Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
feat(readme): improve formatting and content
Browse files Browse the repository at this point in the history
  • Loading branch information
MCMattia committed Aug 16, 2024
1 parent 3ddd0a7 commit d28adee
Showing 1 changed file with 45 additions and 7 deletions.
52 changes: 45 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This project was created to ensure secure and verifiable file copying into the D

The resulting Docker image can be utilized to build STM32CubeIde projects in CI/CD environments.

The STM32CubeIde software available in the docker container is licensed under the [ST software license agreement](https://st.com/resource/en/license/SLA0047_TrueSTUDIO.pdf)
The STM32CubeIde software available in the docker container is licensed under the [ST software license agreement](https://st.com/resource/en/license/SLA0047_TrueSTUDIO.pdf).

## Image versions

Expand All @@ -18,27 +18,65 @@ The STM32CubeIde software available in the docker container is licensed under th

## Usage

Verify the image with github cli (optional):
### Verify the image with github cli (optional)

```
gh attestation verify oci://docker.io/mcmattia/stm32cubeide-docker:1.0 -R mcmattia/stm32cubeide-docker
```

Pull the image from [docker hub](https://hub.docker.com/r/mcmattia/stm32cubeide-docker):
### Pull the image from [docker hub](https://hub.docker.com/r/mcmattia/stm32cubeide-docker)

```
docker pull mcmattia/stm32cubeide-docker:1.0
```

Run the image:
### Run the image

```
docker run -it mcmattia/stm32cubeide:1.0
docker run -i -t -v .:/workspace mcmattia/stm32cubeide:1.0
```

Execute STM32CubeIde build command:
where:

- `-i` keeps stdin open
- `-t` allocates pseudo TTY
- `-v .:worskpace` binds your current folder to a folder in the docker container

### Execute the STM32CubeIde build command

```
stm32cubeide --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data tmp/ide-workspace -import workspace -build ProjectName/BuildConfiguration
```
stm32cubeide --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data buildWorkspace -import STM32Project -build STM32Project/Debug

where:

- `-data tmp/ide-workspace` use specified directory as STM32CubeIde workspace
- `-import workspace` import directory previously bound to docker container
- `-build ProjectName/Debug` build project with specified build configuration

## Example

### Clone the repo [STM32-VSCode-CMake-streamlined](https://github.com/MCMattia/STM32-VSCode-CMake-streamlined)

```
git clone https://github.com/MCMattia/STM32-VSCode-CMake-streamlined.git
cd STM32-VSCode-CMake-streamlined
```

### Pull the image from [docker hub](https://hub.docker.com/r/mcmattia/stm32cubeide-docker)

```
docker pull mcmattia/stm32cubeide-docker:1.0
```

### Run the image

```
docker run -i -t -v .:/workspace mcmattia/stm32cubeide:1.0
```

### Execute the STM32CubeIde build command

```
stm32cubeide --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data tmp/ide-workspace -import workspace -build STM32-VSCode-CMake-streamlined/Debug
```

0 comments on commit d28adee

Please sign in to comment.