macro_rules! app_desc {
() => { ... };
}Expand description
Emit the esp-idf application descriptor. Invoke once in the binary (not
the BSP) so it captures the application’s CARGO_PKG_VERSION. Thin wrapper
over esp_bootloader_esp_idf::esp_app_desc! so the binary keeps a single
m5stack_core::app_desc!(); line instead of naming the bootloader crate.
With the identity feature off (default), the descriptor’s version field
is plain CARGO_PKG_VERSION, as always. With identity on, this same call
site — unchanged — instead requires M5STACK_CORE_BUILD_MARK, a build-time
git descriptor the consumer’s own build.rs sets (see the
m5stack-core-build crate). BSP owns the mechanism, never the content: if
the build.rs wiring is missing, env!() fails to compile in the
consumer’s crate — a real compile error, not a silent fallback.
project_name is CARGO_BIN_NAME, not CARGO_PKG_NAME: a package can
have more than one [[bin]], and only the per-binary compilation (where
this macro expands) knows which one is being built — CARGO_PKG_NAME
would report the same value for every binary in a multi-bin package.
Also exports CARGO_PKG_VERSION under its own linker symbol (see
[__str_to_fixed]) — even though the descriptor’s own version field
already holds it here, identity’s arm below doesn’t have that field
free, so both arms export it the same way for [log_boot_identity] /
[pkg_version()] to read uniformly.