Skip to content

Commit

Permalink
Add: book pagessss
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonyang-ee committed Aug 6, 2023
1 parent c72c95d commit 991bb4f
Show file tree
Hide file tree
Showing 42 changed files with 3,146 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "STM32",
"image": "ghcr.io/jasonyang-ee/stm32-builder:Ubuntu-latest",
"image": "ghcr.io/jasonyang-ee/stm32-builder:ubuntu-latest",
"privileged": true,
"customizations": {
"vscode": {
Expand Down
90 changes: 51 additions & 39 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,6 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "Build Project",
"command": "cmake",
"args": [
"--build",
"${command:cmake.buildDirectory}",
"-j",
"20"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "shell",
"label": "Clean Project",
"command": "cmake",
"args": [
"--build",
"${command:cmake.buildDirectory}",
"--target",
"clean"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": []
},
{
"type": "shell",
"label": "Windows: Flash Firmware",
Expand Down Expand Up @@ -95,9 +59,57 @@
"cwd": "${workspaceFolder}"
},
"problemMatcher": []
},
{
"type": "cmake",
"label": "CMake: build",
"command": "build",
"targets": [
"all"
],
"preset": "${command:cmake.activeBuildPresetName}",
"group": "build",
"problemMatcher": [],
"detail": "CMake template build task"
},
{
"type": "cmake",
"label": "CMake: clean rebuild",
"command": "cleanRebuild",
"targets": [
"all"
],
"preset": "${command:cmake.activeBuildPresetName}",
"group": "build",
"problemMatcher": [],
"detail": "CMake template clean rebuild task"
},
{
"type": "shell",
"label": "Build Book",
"command": "mdbook",
"args": [
"build",
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [],
},
{
"type": "shell",
"label": "Serve Book",
"command": "mdbook",
"args": [
"serve",
"--open",
"--port",
"8000"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [],
}



]
}
25 changes: 7 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,9 @@

# STM32G431 Playground

## Experimental Documentation Using mdBook
## Documentation

[Documentation Book Site](https://doc.jasony.org/STM32G431KB)

Book Generation:
* [Install Rust](https://www.rust-lang.org/tools/install)
* Install mdBook
```bash
cargo install mdbook
```
* Build Book
```bash
mdbook build
```
Visit [Documentation](http://doc.jasony.org/STM32G431KB) for more information.

## Hardware Basics

Expand All @@ -38,7 +27,7 @@ More Docker Details: https://github.com/jasonyang-ee/STM32-Dockerfile
docker run -rm -v {Your_Local_Full_Path}:/home jasonyangee/stm32-builder:ubuntu-latest https://github.com/jasonyang-ee/STM32G431KB
```
> Visit Here for More Details: https://github.com/jasonyang-ee/STM32-Dockerfile
![Run](doc/img/run.gif)
![Run](docs_src/page/img/run.gif)

- Manual Build
```
Expand All @@ -52,8 +41,8 @@ cmake --build build

Use /CubeMX/CubeMX.ioc for complete info

![diagram](doc/img/HardwareMap.png)
![map](doc/img/PinMap.png)
![diagram](docs_src/page/img/HardwareMap.png)
![map](docs_src/page/img/PinMap.png)



Expand Down Expand Up @@ -172,7 +161,7 @@ const uint32_t m_address_end{0x08040000 - 0x8};
const uint8_t m_page_total{127};
```

![flash](doc/img/FlashTable.png)
![flash](docs_src/page/img/FlashTable.png)


The configuration data are packaged into a struct and union aligned to `uint64_t array` for double word HAL flash writing function. The pack and unpack is done manually by user.
Expand Down Expand Up @@ -216,7 +205,7 @@ void Flash::Load() {

The memory save example:

![FlashMem](doc/img/FlashMem.png)
![FlashMem](docs_src/page/img/FlashMem.png)



Expand Down
2 changes: 1 addition & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title = "STM32G431KB Documentation"
authors = ["Jason Teng"]
language = "en"
multilingual = false
src = "docs_src/src"
src = "docs_src/page"

[build]
build-dir = "docs"
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="chapter_1.html"><strong aria-hidden="true">1.</strong> Chapter 1</a></li></ol>
<ol class="chapter"><li class="chapter-item expanded affix "><a href="Introduction.html">Introduction</a></li><li class="spacer"></li><li class="chapter-item expanded affix "><li class="part-title">User Guide</li><li class="chapter-item expanded "><a href="SerialUART.html"><strong aria-hidden="true">1.</strong> Serial UART</a></li><li class="chapter-item expanded "><a href="LED.html"><strong aria-hidden="true">2.</strong> LED</a></li><li class="chapter-item expanded "><a href="CLI.html"><strong aria-hidden="true">3.</strong> CLI</a></li><li class="chapter-item expanded "><a href="FreeRTOS.html"><strong aria-hidden="true">4.</strong> FreeRTOS</a></li><li class="chapter-item expanded "><a href="StateMachine.html"><strong aria-hidden="true">5.</strong> State Machine</a></li><li class="chapter-item expanded "><a href="Flash.html"><strong aria-hidden="true">6.</strong> Flash</a></li><li class="chapter-item expanded "><a href="DAC.html"><strong aria-hidden="true">7.</strong> DAC</a></li><li class="chapter-item expanded "><a href="ADC.html"><strong aria-hidden="true">8.</strong> ADC</a></li><li class="spacer"></li><li class="chapter-item expanded affix "><a href="Author.html">Author</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
Expand Down
Loading

0 comments on commit 991bb4f

Please sign in to comment.