Skip to content

fix(zkernel): make runtime assertions configurable - #62

Open
TenZeroToOnE wants to merge 1 commit into
intercreate:mainfrom
TenZeroToOnE:fix/33-configurable-assert
Open

TenZeroToOnE wants to merge 1 commit into
intercreate:mainfrom
TenZeroToOnE:fix/33-configurable-assert

Conversation

@TenZeroToOnE

Copy link
Copy Markdown

Make __ASSERT and __ASSERT_NO_MSG conditional on CONFIG_ASSERT,
defaulting to n. Disabled assertions evaluate neither argument.

Include esp_rom_sys.h directly in kernel.h so esp_rom_delay_us
does not depend on assertion logging headers being included.
Preserve warning-free timer compilation with assertions disabled.

Add regression tests, configuration documentation, and CI coverage
for both assertion settings.

Validation on ESP-IDF v5.5.5:

  • Linux, assertions enabled and disabled: 227 tests, 0 failures,
    1 intentionally ignored in each configuration.
  • ESP32-S3: both configurations built successfully.
  • ESP32-S3, assertions disabled: IRAM symbol check passed.
  • Manually verified that a false assertion terminates when enabled
    and is skipped when disabled.

ESP-IDF v5.4 and on-device execution were not tested locally.

Fixes #33

Add CONFIG_ASSERT with a default of n. Disabled assertions do not evaluate their arguments.

Include esp_rom_sys.h directly and suppress the unused timer result warning when assertions are disabled.

Add regression tests, configuration documentation, and CI coverage for both settings.

Fixes intercreate#33
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.

__ASSERT should be compile-out-able via Kconfig (CONFIG_ASSERT)

1 participant