Skip to content

Commit

Permalink
Run typos (#480)
Browse files Browse the repository at this point in the history
```bash
❯ typos --write-changes -- $(git whatchanged --author="noah" --name-only --oneline | rg '_posts.*\.md' | sort -u | rg -v matter)
```

Manually add only the correct changes.
  • Loading branch information
noahp authored Jun 12, 2024
1 parent 9aa48b6 commit 84075db
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Let's override the default `MemManage` fault handler for the purposes of our exa
a MemManage Fault is hit and we can investigate further.

```c
// The NRF52 fault handlers can be overriden because they are declared as weak
// The NRF52 fault handlers can be overridden because they are declared as weak
// Let's override the handler and insert a breakpoint when it's hit
__attribute__((naked))
void MemoryManagement_Handler(void) {
Expand Down
2 changes: 1 addition & 1 deletion _posts/2019-08-20-code-size-optimization-gcc-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ sys 0m3.386s
So we traded 5 seconds of build time for ~3KiB of code space.

> Note: /u/xenoamor on Reddit[^7] pointed out that in some cases, LTO is dropping
> vector tables even when the KEEP commmand is used. You can find more details,
> vector tables even when the KEEP command is used. You can find more details,
> as well as a workaround on Launchpad[^8].
## C Library
Expand Down
8 changes: 4 additions & 4 deletions _posts/2019-10-22-best-and-worst-gcc-clang-compiler-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ Then the following set of rules are applied to the promoted values:
It can be hard to keep track of the set of conversions taking place but fortunately the
`-Wconversion` option can be used to generate warnings when **implicit** conversions that are
likely to change the underlying value take place. This warning can be tedious to eliminate from a codebase
but I've seen it help catch real bugs on numerous occassions in the past.
but I've seen it help catch real bugs on numerous occasions in the past.
Consider the following simple example as an illustration:
Expand Down Expand Up @@ -704,9 +704,9 @@ documentation[^13] states that the two permitted ABI variants for enumeration ty
> of its enumerated values the type occupies a double word (long long or unsigned long long).
> - The type of the storage container for an enumerated type is the smallest integer type that can contain all of its enumerated values
There a few key disadvantges of truncating enums to the shortest width type:
There a few key disadvantages of truncating enums to the shortest width type:
- Binary compatiblity can be broken if the values in an enum change between releases. For example, if the max value in
- Binary compatibility can be broken if the values in an enum change between releases. For example, if the max value in
one version is 255 and then in a future version it's 4096, the size of the enum will change from a
1-byte to a 2-byte representation. This means linking against a pre-compiled library using the older version
of the enum will no longer work.
Expand All @@ -722,7 +722,7 @@ There a few key disadvantges of truncating enums to the shortest width type:
The following is an example of how operating on a shorter width type (`uint8_t`) requires an extra
masking instruction than operating on a type aligned with the architecture register size
(`int`). When an enum is trucated to a smaller width, the same type of masking instructions may be
(`int`). When an enum is truncated to a smaller width, the same type of masking instructions may be
needed when operations are performed with it.
```c
Expand Down
2 changes: 1 addition & 1 deletion _posts/2019-10-30-cortex-m-rtos-context-switching.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Mode**. The rest of the time the MCU runs in **Thread Mode**.

The core can operate at either a **privileged** or **unprivileged** level. Certain instructions and
operations are only allowed when the software is executing as privileged.
For example, unpriviledged code may not access NVIC registers. In Handler Mode, the core is
For example, unprivileged code may not access NVIC registers. In Handler Mode, the core is
_always_ privileged. In Thread Mode, the software can execute at either level.

Switching Thread Mode from the unprivileged to privileged level
Expand Down
6 changes: 3 additions & 3 deletions _posts/2020-03-03-gnu-make-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ $ make -l $(python -c "import multiprocessing; print(multiprocessing.cpu_count()
#### Output During Parallel Invocation

If you have a lot of output from the commands Make is executing in parallel, you
might see output interleaved on `stdout`. To handle this, Make has the option [`--ouput-sync`](https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html).
might see output interleaved on `stdout`. To handle this, Make has the option [`--output-sync`](https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html).

I recommend using **`--output-sync=recurse`**, which will print the entire
output of each target's recipe when it completes, without interspersing other
Expand Down Expand Up @@ -407,7 +407,7 @@ test: build
```

> **NOTE!!! `.PHONY` targets are ALWAYS considered out-of-date, so Make will
ALWAYS run the recipe for those targets (and therfore any target that has a
ALWAYS run the recipe for those targets (and therefore any target that has a
`.PHONY` prerequisite!). Use with caution!!**

#### Implicit Rules
Expand Down Expand Up @@ -963,7 +963,7 @@ $(BUILD_FOLDER)/%.o: %.c

# The rule for building the executable "example", using OBJ_FILES as
# prerequisites. Since we're not relying on an implicit rule, we need to
# explicity list CFLAGS, LDFLAGS, LDLIBS
# explicitly list CFLAGS, LDFLAGS, LDLIBS
$(BUILD_FOLDER)/example: $(OBJ_FILES)
@echo Linking $(notdir $@)
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
Expand Down
4 changes: 2 additions & 2 deletions _posts/2020-05-20-arm-cortexm-with-llvm-clang.md
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ before/after others. Take a look at the official documentation for more ideas![^
Once you can compile your project with Clang, there are other compiler warnings not
supported by other compilers that you can enable. These can be helpful for catching potential bugs or issues.
The exhaustive list of "Diagnostic Warnings" supported by Clang can be found in the official documentation online[^5]. However, I find it easiest to run a build with all the possible Clang warnings enabled by using `-Weverything`, disabling all errrors (`-Wno-error`) and piping the compilation output to a file I can grep after the fact. Let's try it out on the example project:
The exhaustive list of "Diagnostic Warnings" supported by Clang can be found in the official documentation online[^5]. However, I find it easiest to run a build with all the possible Clang warnings enabled by using `-Weverything`, disabling all errors (`-Wno-error`) and piping the compilation output to a file I can grep after the fact. Let's try it out on the example project:
```bash
$ make clean && CLI_CFLAG_OVERRIDES="-Weverything -Wno-error" \
Expand Down Expand Up @@ -822,7 +822,7 @@ Disclaimers: At the time of writing this article,
- Some of the official documentation, such as the instructions for "Alternative using a cmake cache" no
longer work.
- It does not appear possible to compile a builtin targetting the Cortex-M hard float ABI (i.e
- It does not appear possible to compile a builtin targeting the Cortex-M hard float ABI (i.e
`armv7em` target).
- It does not appear possible to compile `libclang_rt` for ARM Cortex-M on OSX. You need to use
Docker or be running on Linux natively.
Expand Down
10 changes: 5 additions & 5 deletions _posts/2020-09-08-secure-firmware-updates-with-code-signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,11 +635,11 @@ shell>
The full example is available on Github at
[interrupt@fwup-signing](https://github.com/memfault/interrupt/tree/master/example/fwup-signing).

> Note: While researching this post I came across Tinycrypt, an open source
> library maintained by Intel. Tinycript combines micro-ecc with additional
> primitives such as SHA-256. If I were to do it again, I would look into using
> tinycript rather than two separate libraries.
> Note: While researching this post I came across
> [Tinycrypt](https://github.com/intel/tinycrypt), an open source library
> maintained by Intel. Tinycrypt combines micro-ecc with additional primitives
> such as SHA-256. If I were to do it again, I would look into using tinycrypt
> rather than two separate libraries.
## Additional Considerations

Expand Down
4 changes: 2 additions & 2 deletions _posts/2021-06-22-ubsan-trap.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ We can see that the runtime was linked in:
```

If we run that program with problematic input, UBSan prints a warning, and the
printf was modifed to print a `(null)` value instead of the possibly problematic
printf was modified to print a `(null)` value instead of the possibly problematic
fetch.

[![img/ubsan-trap/ubsan-basic.png](/img/ubsan-trap/ubsan-basic.png)](/img/ubsan-trap/ubsan-basic.png)

If it's preferrable to have the program crash instead, use the
If it's preferable to have the program crash instead, use the
`-fno-sanitize-recover=all` to disable the error recovery functionality and
immediately crash (exit with non-zero exit code) on errors:

Expand Down
4 changes: 2 additions & 2 deletions _posts/2021-10-07-cmsis-packs.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ file to flash chips) is the flash algorithm, which is specified in the top-level

<https://www.keil.com/pack/doc/CMSIS/Pack/html/packFormat.html>

The file contains many intersting pieces of information. One particularly useful
one is the Flash Algorithms used to program a peice of hardware. Look for a
The file contains many interesting pieces of information. One particularly useful
one is the Flash Algorithms used to program a piece of hardware. Look for a
section of the XML with the `<algorithm>` tag, for example:

_Note: I added the comments explaining each section_
Expand Down
2 changes: 1 addition & 1 deletion _posts/2022-03-30-dealing-with-large-symbol-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ objcopy --compress-debug-sections
```
This requires no changes when using the file- debuggers and binutils are all
good about unpacking the data, and worst case it can be reveresed with
good about unpacking the data, and worst case it can be reversed with
`--decompress-debug-sections`.
The `dwz` tool definitely performs nice optimizations on larger binaries, but it
Expand Down
4 changes: 2 additions & 2 deletions _posts/2023-09-20-printf-on-embedded.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ handlers (and is probably a reasonable idea to prohibit them).

Here's an approach that will cause a runtime error if a non-reentrant function
is called in an interrupt context. Unfortunately it requires rebuilding newlib,
so it's really only for curiousity or the very paranoid.
so it's really only for curiosity or the very paranoid.

First, rebuild newlib (or build it as part of your project build; this is
probably only practical if you're using a compiler cache like ccache), setting
Expand Down Expand Up @@ -225,7 +225,7 @@ void Foo_Interrupt_Handler(void) {
}
```
This is a pretty manual technique but it is relatively simple, and doens't
This is a pretty manual technique but it is relatively simple, and doesn't
require disabling interrupts or knowing the relative preemption priority of the
current call site.
Expand Down
2 changes: 1 addition & 1 deletion _posts/2024-01-18-ncs-github-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ RUN . /venv/bin/activate \
We'll build the image using this command:

```bash
# note the image tag is set to use the GitHub container registy (ghcr.io), and
# note the image tag is set to use the GitHub container registry (ghcr.io), and
# we're setting the current ISO-8601 date as the tag
$ DOCKER_BUILDKIT=1 docker build -f .github/Dockerfile . -t ghcr.io/noahp/memfault-nrfconnect-ci-app:$(date --iso)
```
Expand Down

0 comments on commit 84075db

Please sign in to comment.