SpiffsFS.create_file() rejected names only when strictly longer than
obj_name_len, but CONFIG_SPIFFS_OBJ_NAME_LEN's documented semantics
(see components/spiffs/Kconfig) are that the length includes the
zero-termination character, so the maximum number of actual name
characters is obj_name_len - 1.
With the old check, a name exactly obj_name_len characters long was
accepted. SpiffsObjIndexPage.to_binary() then computes the NUL padding
after the name as (obj_name_len - len(name)), which is 0 in that case,
so the generated image's fixed-size name field ends up with no NUL
terminator anywhere in its reserved region.
Fix the boundary so the generator enforces the same maximum length
that the Kconfig help text documents.
Without this, defaults of inverse options (--no-magic-len) were based
on the 'dest' value. In this case, dest='use_magic_len’, and the
default value is True. Which is confusing, because both
—use-magic-len and --no-magic-len show the same default value.
This adds a custom help formatter class which doesn’t add default
to the option help text if the help string already includes it.
1. Implement --aligned-obj-ix-tables which is used by default on the
ESP8266 in NodeMCU and Arduino.
2. Introduce --no-magic and --no-magic-len to allow disabling options
--use-magic-len and --use-magic. As these have been declared with
default=True and action='store_true', they couldn't be disabled
otherwise.
Closes https://github.com/espressif/esp-idf/issues/6717