Skip to content

doc: document config/library.csv, following doc/config/constants.md - #1733

Open
Wiljea wants to merge 1 commit into
c3d:stablefrom
Wiljea:doc-library
Open

doc: document config/library.csv, following doc/config/constants.md#1733
Wiljea wants to merge 1 commit into
c3d:stablefrom
Wiljea:doc-library

Conversation

@Wiljea

@Wiljea Wiljea commented Aug 29, 2026

Copy link
Copy Markdown

evgaster asked for this on #1722, on the model of his own #1703, as the thing that would stop the next contributor walking into the same trap. It documents the format and the three ways a value is read, and then the three traps that this library has already paid for.

File names must be ASCII. The label may be anything, but FatFs cannot open a file whose name is not, and the entry then fails with "Invalid or unknown library entry", or, when it is reached from an equation, with "Root error: Unable to solve for all variables". The bare "=" form is where this bites, since it takes the file name from the entry name: 42 of 93 programs were unusable on a DM32 that way, and every one of them worked on the simulator.

The order of the file matters. Entries are numbered by position and Attach takes those numbers; top-level sections take the soft keys of the Lib menu in file order, so inserting one moves the sections below it and src/tests.cc has to follow. That is why the library test went from F3 to F4 and then to F5.

Files in subdirectories have to be packaged. The Makefile ships one level of subdirectory, so a program two levels down is named by library.csv and never shipped.

doc/config/ is not in HELP_SOURCES, so this changes neither the help file nor the tests.

evgaster asked for this on c3d#1722, on the model of his own c3d#1703, as the thing
that would stop the next contributor walking into the same trap. It documents
the format and the three ways a value is read, and then the three traps that
this library has already paid for.

File names must be ASCII. The label may be anything, but FatFs cannot open a
file whose name is not, and the entry then fails with "Invalid or unknown
library entry", or, when it is reached from an equation, with "Root error:
Unable to solve for all variables". The bare "=" form is where this bites,
since it takes the file name from the entry name: 42 of 93 programs were
unusable on a DM32 that way, and every one of them worked on the simulator.

The order of the file matters. Entries are numbered by position and Attach
takes those numbers; top-level sections take the soft keys of the Lib menu in
file order, so inserting one moves the sections below it and src/tests.cc has
to follow. That is why the library test went from F3 to F4 and then to F5.

Files in subdirectories have to be packaged. The Makefile ships one level of
subdirectory, so a program two levels down is named by library.csv and never
shipped.

doc/config/ is not in HELP_SOURCES, so this changes neither the help file nor
the tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant