Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
Build macros

The fuzz build reuses the app's real compile-time -D defines so fuzzed code matches the device build. It extracts them from the app Makefile (make list-defines) and then lets you adjust the set for the host build. Both files are optional; most apps need neither.

macros/add_macros.txt

Extra -D defines appended to the extracted set. Use it when the fuzz build needs a flag the release build does not. One define per line; # starts a comment:

# enable a code path only exercised under fuzzing
FUZZ_APP_EXTRA_FEATURE=1

macros/exclude_macros.txt

Defines to remove from the extracted set. Use it to strip a release-only shim that breaks on the host. One define per line; # starts a comment:

SOME_RELEASE_ONLY_FLAG

At SDK level this is how PRINTF(...)= is removed so app sources compile real PRINTF calls, which the app then satisfies with a no-op stub in mocks.c (see The mocks).