Skip to content

Commit 84075db

Browse files
authored
Run typos (#480)
```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.
1 parent 9aa48b6 commit 84075db

12 files changed

+25
-25
lines changed

_posts/2019-07-16-fix-bugs-and-secure-firmware-with-the-mpu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Let's override the default `MemManage` fault handler for the purposes of our exa
169169
a MemManage Fault is hit and we can investigate further.
170170

171171
```c
172-
// The NRF52 fault handlers can be overriden because they are declared as weak
172+
// The NRF52 fault handlers can be overridden because they are declared as weak
173173
// Let's override the handler and insert a breakpoint when it's hit
174174
__attribute__((naked))
175175
void MemoryManagement_Handler(void) {

_posts/2019-08-20-code-size-optimization-gcc-flags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ sys 0m3.386s
314314
So we traded 5 seconds of build time for ~3KiB of code space.
315315

316316
> Note: /u/xenoamor on Reddit[^7] pointed out that in some cases, LTO is dropping
317-
> vector tables even when the KEEP commmand is used. You can find more details,
317+
> vector tables even when the KEEP command is used. You can find more details,
318318
> as well as a workaround on Launchpad[^8].
319319
320320
## C Library

_posts/2019-10-22-best-and-worst-gcc-clang-compiler-flags.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ Then the following set of rules are applied to the promoted values:
488488
It can be hard to keep track of the set of conversions taking place but fortunately the
489489
`-Wconversion` option can be used to generate warnings when **implicit** conversions that are
490490
likely to change the underlying value take place. This warning can be tedious to eliminate from a codebase
491-
but I've seen it help catch real bugs on numerous occassions in the past.
491+
but I've seen it help catch real bugs on numerous occasions in the past.
492492
493493
Consider the following simple example as an illustration:
494494
@@ -704,9 +704,9 @@ documentation[^13] states that the two permitted ABI variants for enumeration ty
704704
> of its enumerated values the type occupies a double word (long long or unsigned long long).
705705
> - The type of the storage container for an enumerated type is the smallest integer type that can contain all of its enumerated values
706706
707-
There a few key disadvantges of truncating enums to the shortest width type:
707+
There a few key disadvantages of truncating enums to the shortest width type:
708708
709-
- Binary compatiblity can be broken if the values in an enum change between releases. For example, if the max value in
709+
- Binary compatibility can be broken if the values in an enum change between releases. For example, if the max value in
710710
one version is 255 and then in a future version it's 4096, the size of the enum will change from a
711711
1-byte to a 2-byte representation. This means linking against a pre-compiled library using the older version
712712
of the enum will no longer work.
@@ -722,7 +722,7 @@ There a few key disadvantges of truncating enums to the shortest width type:
722722
723723
The following is an example of how operating on a shorter width type (`uint8_t`) requires an extra
724724
masking instruction than operating on a type aligned with the architecture register size
725-
(`int`). When an enum is trucated to a smaller width, the same type of masking instructions may be
725+
(`int`). When an enum is truncated to a smaller width, the same type of masking instructions may be
726726
needed when operations are performed with it.
727727
728728
```c

_posts/2019-10-30-cortex-m-rtos-context-switching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Mode**. The rest of the time the MCU runs in **Thread Mode**.
4949

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

5555
Switching Thread Mode from the unprivileged to privileged level

_posts/2020-03-03-gnu-make-guidelines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ $ make -l $(python -c "import multiprocessing; print(multiprocessing.cpu_count()
119119
#### Output During Parallel Invocation
120120

121121
If you have a lot of output from the commands Make is executing in parallel, you
122-
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).
122+
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).
123123

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

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

413413
#### Implicit Rules
@@ -963,7 +963,7 @@ $(BUILD_FOLDER)/%.o: %.c
963963

964964
# The rule for building the executable "example", using OBJ_FILES as
965965
# prerequisites. Since we're not relying on an implicit rule, we need to
966-
# explicity list CFLAGS, LDFLAGS, LDLIBS
966+
# explicitly list CFLAGS, LDFLAGS, LDLIBS
967967
$(BUILD_FOLDER)/example: $(OBJ_FILES)
968968
@echo Linking $(notdir $@)
969969
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@

_posts/2020-05-20-arm-cortexm-with-llvm-clang.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ before/after others. Take a look at the official documentation for more ideas![^
519519
Once you can compile your project with Clang, there are other compiler warnings not
520520
supported by other compilers that you can enable. These can be helpful for catching potential bugs or issues.
521521
522-
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:
522+
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:
523523
524524
```bash
525525
$ make clean && CLI_CFLAG_OVERRIDES="-Weverything -Wno-error" \
@@ -822,7 +822,7 @@ Disclaimers: At the time of writing this article,
822822
823823
- Some of the official documentation, such as the instructions for "Alternative using a cmake cache" no
824824
longer work.
825-
- It does not appear possible to compile a builtin targetting the Cortex-M hard float ABI (i.e
825+
- It does not appear possible to compile a builtin targeting the Cortex-M hard float ABI (i.e
826826
`armv7em` target).
827827
- It does not appear possible to compile `libclang_rt` for ARM Cortex-M on OSX. You need to use
828828
Docker or be running on Linux natively.

_posts/2020-09-08-secure-firmware-updates-with-code-signing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -635,11 +635,11 @@ shell>
635635
The full example is available on Github at
636636
[interrupt@fwup-signing](https://github.com/memfault/interrupt/tree/master/example/fwup-signing).
637637

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

_posts/2021-06-22-ubsan-trap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ We can see that the runtime was linked in:
145145
```
146146

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

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

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

_posts/2021-10-07-cmsis-packs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ file to flash chips) is the flash algorithm, which is specified in the top-level
127127

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

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

134134
_Note: I added the comments explaining each section_

_posts/2022-03-30-dealing-with-large-symbol-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ objcopy --compress-debug-sections
643643
```
644644
645645
This requires no changes when using the file- debuggers and binutils are all
646-
good about unpacking the data, and worst case it can be reveresed with
646+
good about unpacking the data, and worst case it can be reversed with
647647
`--decompress-debug-sections`.
648648
649649
The `dwz` tool definitely performs nice optimizations on larger binaries, but it

0 commit comments

Comments
 (0)