Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2026 Khalil Estell and the libhal contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 🔤 Spellcheck

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
spellcheck:
name: 🔤 Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.1
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2026 Khalil Estell and the libhal contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

repos:
# Spell checking, with the technical words in cspell.json
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.6.0
hooks:
- id: cspell
files: \.(md|rst)$
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ our static documentation and [sphinx](https://www.sphinx-doc.org/en/master/)
for our API documentation

If you'd like to contribute to the libhal website and documentation you can do
so by quickly setting up the enviornement by running the following commands.
so by quickly setting up the environment by running the following commands.
Please note that the build script is designed for a bash environment and is
intended to be used on unix-based operating systems. The documentation is fully
compatible with Windows, however you will need to write your own `.bat` install
Expand Down
138 changes: 136 additions & 2 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,147 @@
"fprintf",
"fputs",
"offsetof",
"uart"
"uart",
"baremetal",
"bkpt",
"bootloaders",
"bringup",
"choco",
"cinttypes",
"clangd",
"climits",
"cmdline",
"CMSIS",
"conanbuild",
"conanfile",
"conset",
"consteval",
"constprop",
"countr",
"cout",
"Cpplang",
"cstdint",
"cstdio",
"cstring",
"dacs",
"datasheet",
"datasheets",
"deadsnakes",
"demangle",
"devirtualizes",
"dialout",
"Doxyfile",
"doxygenclass",
"doxygenfile",
"doxygengroup",
"doxygennamespace",
"dynamixel",
"eabi",
"EEPROM",
"endianness",
"ensurepath",
"errc",
"Espressif",
"Estell",
"exelinkflags",
"fexceptions",
"footgun",
"gamepad",
"gdbserver",
"gpdma",
"gpio",
"GPIOs",
"InvenSense",
"iostream",
"ISER",
"JEDEC",
"JTAG",
"kammce",
"Kbit",
"Khalil",
"libc",
"libexcept",
"libunwind",
"LQFP",
"LSDA",
"Mbit",
"Memfault",
"microcontroller",
"microcontrollers",
"micromod",
"minimp",
"misaligns",
"MISRA",
"mkdocs",
"multiarch",
"newlib",
"NMEA",
"noinline",
"NOLINT",
"noreturn",
"nullopt",
"NVIC",
"nxpprog",
"OEM",
"OLED",
"ostream",
"PCLKDIV",
"Pico",
"picolibc",
"picosdk",
"pimpl",
"pinout",
"pipx",
"POSIX",
"prescale",
"PRIMASK",
"pyocd",
"RDWR",
"readelf",
"regs",
"riscv",
"Robotis",
"rodata",
"Rohde",
"Schwarz",
"semihost",
"semihosting",
"SIGTRAP",
"SIMD",
"softwareupdate",
"Sparkfun",
"sstream",
"Stargirl",
"struct",
"structs",
"SWCLK",
"SWDIO",
"syscalls",
"toctree",
"UDLs",
"UFCS",
"unrepresentable",
"upscaling",
"uptr",
"usart",
"usbserial",
"usermod",
"usize",
"veltor",
"vtable",
"winget",
"Xtensa"
],
"ignorePaths": [
"build/",
"*.json"
],
"enableFiletypes": [
"markdown"
"markdown",
"restructuredtext"
],
"ignoreRegExpList": [
"\\.conan2/\\S*",
"(?:^|[\\s`])-[DOT][a-z_]+"
]
}
14 changes: 7 additions & 7 deletions mkdocs/contributor_guide/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ libhal will increment its major number to indicate that it has upgraded compiler
versions.

This decision exists to escape the issues of vendor and toolchain lock in thats
prevalant in the C++ and embedded industry. With sufficient testing, upgrading
prevalent in the C++ and embedded industry. With sufficient testing, upgrading
compilers shouldn't result in bugs in applications.

## A.2 Interface Design Choices
Expand Down Expand Up @@ -198,7 +198,7 @@ input parameters to allow libraries to customize and control how the CI works.

libhal's CI attempts to use as many tools as reasonable to make sure that the
C++ source code follows the style guide, C++ core guidelines and retains a
certain level of quality. All offical libhal libaries must opt in to the common
certain level of quality. All official libhal libraries must opt in to the common
libhal/libhal workflow.

This helps to ensure that all projects are held to the same standard and
Expand Down Expand Up @@ -392,7 +392,7 @@ The options for these callbacks are:
`std::function` for any interface API would ensure that applications that
disallow dynamic allocations after boot or in general could never use them.

`function_ref` has two great PROS but the largets CON is lifetime issues that
`function_ref` has two great PROS but the largest CON is lifetime issues that
are really easy to fall into. Specifically something like this:

```C++
Expand All @@ -417,7 +417,7 @@ pointers (`sizeof(std::intptr_t) * 2`). This size was chosen in order to be
small and easily storable. Two pointers worth of size should be enough to hold
a pointer to `this` in classes as well a pointer to some sort of state object.

The size of the callback object was not choosen in order to improve the
The size of the callback object was not chosen in order to improve the
performance of calling callback setting class functions. Even with the small
size of `hal::callback`, its too large to take advantage of register based
parameter passing. Thus the size of 2 pointers was mostly to help in keeping
Expand Down Expand Up @@ -449,7 +449,7 @@ compile time checks as well.
This amends architectural component A.4 and pivots away from header only
libraries over to prebuilt binaries.

The following are the reasons why supporting, producing and distibuting prebuilt
The following are the reasons why supporting, producing and distributing prebuilt
binaries is critical to libhal.

- ⏱️ **Faster compilation times**: When a project grows in size, compiling
Expand Down Expand Up @@ -488,7 +488,7 @@ features of the platform, libhal emphasizes prebuilt libraries over header only.
required adding additional architecture settings, required the use of
conan profiles to make the arm-gnu-toolchain available globally for all
packages, figuring out how to insert architectural compiler flags and ensure
they propogate to all packages took time and was a complex process. And
they propagate to all packages took time and was a complex process. And
header-only libraries allowed the initial version of libhal to bypass all
of this.

Expand Down Expand Up @@ -523,7 +523,7 @@ remove that, your unwind time is deterministic.

The issue with massive code bloat when you enable `-fexceptions` only comes
from the linux version of `std::terminate` which uses `<iostream>` and some
other locale related stuff. Simply overriding this with your own implmentation
other locale related stuff. Simply overriding this with your own implementation
fixes this issue and reduces code size by ~100kB.

A link to a paper written by Khalil Estell will be linked here to describe in
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/contributor_guide/arm/arm_cortex_m_bringup.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ application.
The finer details about linker scripts and how they work can be found in the
resources below:

- [Mastering the GNU linker script by AllThingsEmbeddd](https://allthingsembedded.com/post/2020-04-11-mastering-the-gnu-linker-script/): Easy to learn 13 min read
- [Mastering the GNU linker script by AllThingsEmbedded](https://allthingsembedded.com/post/2020-04-11-mastering-the-gnu-linker-script/): Easy to learn 13 min read
- ["The most thoroughly commented linker script (probably)" by Thea "Stargirl" Flowers](https://blog.thea.codes/the-most-thoroughly-commented-linker-script/):
A very thoroughly documented and easy read on linker scripts
- [GNU Linker Scripts](https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_chapter/ld_3.html): Full user specification, if you need or want those details
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/education/adc.md
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ void application()
}
```

All tests executed on an stm32f103c8 which featues a Cortex-M3 processor which
All tests executed on an stm32f103c8 which features a Cortex-M3 processor which
does not include a floating point unit. Using GCC 12.3.1.

Built using the following commands:
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pipx install "conan>=2.18.0"

## 🔧 Setting up Conan

First install the libhal's conan configuration which is done via the commnd below.
First install the libhal's conan configuration which is done via the command below.

```bash
conan config install https://github.com/libhal/conan-config2.git
Expand Down
4 changes: 2 additions & 2 deletions mkdocs/user_guide/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ pipx install pyocd
- For SWD (most common):
- Connect GND (Ground)
- Connect SWDIO (Data line)
- Connect SWDCLK (Clock line)
- Connect SWCLK (Clock line)
- If your board uses JTAG:
- Connect GND, TDI, TMS, TCK, and TDO pins
- If you have a JTAG device that supports SWD
- Connect GND
- Connect JTAG TMS to MCU SWDIO
- Connect JTAG TCK to MCU SWDCLCK
- Connect JTAG TCK to MCU SWCLK

!!! important
Double-check all connections! Incorrect wiring can damage your board,
Expand Down
Loading