Skip to content

perf(build): enable release O2 optimization - #124

Open
zjwhitehead wants to merge 1 commit into
masterfrom
codex/p2-release-optimization
Open

perf(build): enable release O2 optimization#124
zjwhitehead wants to merge 1 commit into
masterfrom
codex/p2-release-optimization

Conversation

@zjwhitehead

Copy link
Copy Markdown
Member

Summary

  • build the ESP32-S3 production environment in release mode
  • select ESP-IDF performance optimization (-O2) in both the checked config and defaults
  • keep compiler assertions enabled at level 2
  • exclude all benchmark instrumentation

Verification

  • pio test -e native-test: 60/60 passed
  • pio test -e native-screenshot: 34/34 passed using the known harness options missing from current master; those temporary harness edits are not in this PR
  • pio run -e OpenPPG-CESP32S3-CAN-SP140: passed
  • compile database: 1,448 of 1,449 compile commands contain -O2
  • target size: 120,080 bytes RAM; 1,165,885 bytes flash

ESP-IDF 4.4 note

CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER depends on CONFIG_COMPILER_OPTIMIZATION_DEFAULT in this IDF version, so Kconfig disables the wrapper when -O2 is selected. Task entry points must continue to avoid returning. Assertions remain enabled at level 2.

Hardware acceptance

Before flight release, smoke-test boot, BLE, display, idle telemetry, arm/disarm, cruise, OTA validation, and live ESC/BMS traffic on the optimized binary.

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