docs: comments state what is, not how it came to be
The loader build, the gate script and the line-ending rule each carried the story of their arrival - a measurement off the bench, a loop got wrong by hand, a checkout reached from two hosts - where a sentence of what holds now is enough. .gitattributes loses two patterns for files this repository does not have, .clangd its two non-ASCII dashes, two headers a "per C" that read as a stripped degree sign, and the README a "(new)" and the port's own first attempt at stopping monitor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
51535953b9
commit
f8e136e8ad
7 files changed
+18
-27
No files matched your search
@@ -5,7 +5,7 @@ CompileFlags:
|
||||
Add:
|
||||
# clang has no 24-bit integer and GCC's are keywords, not macros, so the
|
||||
# editor needs a stand-in for avr::uint24_t. The next width up is the only
|
||||
# one available — clang rejects _BitInt(24) on this target.
|
||||
# one available - clang rejects _BitInt(24) on this target.
|
||||
- -D__uint24=unsigned long
|
||||
- -D__int24=long
|
||||
# clangd forwards the driver's system includes but not its own header
|
||||
@@ -14,7 +14,7 @@ CompileFlags:
|
||||
- -D__STDC_LIMIT_MACROS
|
||||
- -D__STDC_CONSTANT_MACROS
|
||||
# isr::emit spells a vector number into [[gnu::signal(N)]], which clang
|
||||
# rejects rather than ignores — enough of them in one TU to reach the
|
||||
# rejects rather than ignores - enough of them in one TU to reach the
|
||||
# default limit of 19 inside the headers and truncate the parse.
|
||||
- -ferror-limit=0
|
||||
Remove:
|
||||
|
||||
+2
-7
@@ -1,12 +1,7 @@
|
||||
# Line endings are the repository's, not the editing machine's: this checkout
|
||||
# is reached from two hosts, and a file rewritten by a Windows tool comes back
|
||||
# with every line changed unless something says otherwise. Naming the source
|
||||
# extensions left Markdown, Python, shell and CMake to whatever the writing
|
||||
# tool defaulted to, which is CRLF on one of the two.
|
||||
# Line endings are the repository's, not the editing tool's: a file rewritten
|
||||
# by a Windows tool must not come back with every line changed.
|
||||
* text=auto eol=lf
|
||||
|
||||
# Atmel Studio writes these and expects them back.
|
||||
*.vcxproj* eol=crlf
|
||||
*.cppproj eol=crlf
|
||||
*.sln eol=crlf
|
||||
*.atsln eol=crlf
|
||||
+6
-8
@@ -37,14 +37,12 @@ add_custom_command(TARGET fantemp POST_BUILD
|
||||
COMMAND ${CMAKE_OBJCOPY} -O ihex -R .eeprom
|
||||
$<TARGET_FILE:fantemp> $<TARGET_FILE_DIR:fantemp>/fantemp.hex)
|
||||
|
||||
# The board's loader, built here rather than named from memory: consuming
|
||||
# pureboot for its geometry alone left the one image this deployment cannot be
|
||||
# recovered without outside the repository that pins it. Every parameter is
|
||||
# pureboot's own default for this chip - USART0 at 115200 on the 16 MHz crystal
|
||||
# `src/board.hpp` declares - and that is measured rather than assumed, the
|
||||
# image being byte-for-byte the 386 B the board's slot reads back. It goes on
|
||||
# over the wire (`--update-loader`), which is why there is no flash target
|
||||
# beside it: no programmer has ever been in this board's path.
|
||||
# The board's loader, built from the pin, so the one image this deployment
|
||||
# cannot be recovered without is rebuilt by the commit that names it. Every
|
||||
# parameter is pureboot's own default for this chip - USART0 at 115200 on the
|
||||
# 16 MHz crystal `src/board.hpp` declares. It goes on over the wire
|
||||
# (`--update-loader`), which is why there is no flash target beside it: the
|
||||
# board has no programming header.
|
||||
pureboot_add_loader(pureboot)
|
||||
|
||||
enable_testing()
|
||||
|
||||
@@ -18,7 +18,7 @@ Commands may be abbreviated to any unambiguous-by-order prefix, as the legacy
|
||||
firmware allowed: `up` is `uptime`, `st` is `statistics`, `sa` is `save`. The
|
||||
table order resolves ties, so `s` is `show` — and `reset` is deliberately the one
|
||||
command that cannot be abbreviated, because `r` should not be able to wipe the
|
||||
histogram. `save` (new) forces a writeback, which otherwise happens every 30
|
||||
histogram. `save` forces a writeback, which otherwise happens every 30
|
||||
minutes and on the way into the bootloader.
|
||||
|
||||
`show`, `statistics` and the histogram print one value per line behind a dotted
|
||||
@@ -28,9 +28,8 @@ from 10 to 60 with a bar, because the curve is a cubic and five-degree samples
|
||||
without a graph show none of its shape.
|
||||
|
||||
**Ctrl+C** abandons a half-typed line and gives a fresh prompt, echoing `^C`, and
|
||||
it is what stops `monitor`. Stopping on *any* byte, which is what the port did
|
||||
first, reads well right up until a host sends a line ending: `monitor\r\n` then
|
||||
stopped itself on the `\n` it arrived with, one reading in.
|
||||
it is what stops `monitor`. Stopping on *any* byte would not do: a host's line
|
||||
ending would stop `monitor\r\n` on the `\n` it arrived with, one reading in.
|
||||
|
||||
## Reaching the bootloader
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#include <libavr/flash.hpp>
|
||||
|
||||
// The auto-mode fan curve, tabulated at compile time as a flash_table of duty
|
||||
// percent per C: a cubic that is held at zero below the temperature the fan
|
||||
// percent per degree C: a cubic that is held at zero below the temperature the fan
|
||||
// starts at.
|
||||
namespace app::curve {
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "board.hpp"
|
||||
|
||||
// Temperature histogram: one uint32 bucket per C 0..99, sampled once a
|
||||
// Temperature histogram: one uint32 bucket per degree C 0..99, sampled once a
|
||||
// second, written back to EEPROM every 30 minutes (update() only touches
|
||||
// changed bytes).
|
||||
namespace app {
|
||||
|
||||
+3
-4
@@ -1,11 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# The task gate: every configure preset built, and only then every one tested.
|
||||
#
|
||||
# The loop itself is libavr's (tools/check-presets.sh) because the order in it
|
||||
# is subtle and was got wrong by hand more than once - the mode-identity checks
|
||||
# read the sibling mode's tree, so a build-then-test-per-preset run compares a
|
||||
# The loop is libavr's (tools/check-presets.sh): the mode-identity checks read
|
||||
# the sibling mode's tree, so a build-then-test-per-preset run would compare a
|
||||
# fresh image against a stale sibling. Anything this repository needs beyond
|
||||
# the presets is written after the call, where every tree is built and tested.
|
||||
# the presets goes after the call, where every tree is built and tested.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
||||
"${LIBAVR_ROOT:-libavr}/tools/check-presets.sh" "$@"
|
||||
Reference in new issue
Block a user