|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Greppable stack-frame deviation marker. More...
Go to the source code of this file.
Macros | |
| #define | RA8_STACK_BUDGET(bytes) |
| Marker macro recording an approved stack-frame deviation. | |
Greppable stack-frame deviation marker.
Static stack-overflow is the silent equivalent of dynamic allocation (NASA Power-of-10 Rule 3). This project caps individual stack frames at 2048 bytes via the per-target -Wstack-usage=N warning attached by cmake/ra8_warnings.cmake, and aggregates a project-wide report via scripts/checks/stack_usage_check.py. See docs/STACK_USAGE.md for the full procedure.
When a function legitimately needs more stack than its module's default budget, the deviation MUST be marked at the function site with RA8_STACK_BUDGET(N) so it is greppable and so the next reader sees the documented bound before refactoring. The macro itself is a no-op marker; its job is to:
Usage (place as the first statement inside the function body so the preceding Doxygen block continues to be detected by doxy_audit.py):
Compliance:
Definition in file ra8_stack_budget.h.
| #define RA8_STACK_BUDGET | ( | bytes | ) |
Marker macro recording an approved stack-frame deviation.
Expands to nothing; the macro exists purely so git grep finds the deviation site and so a code reviewer must touch this annotation to change the budget. The numeric argument N is the maximum frame size in bytes that the function is permitted to consume, as verified against its <file>.su entry.
| [in] | bytes | Approved upper bound on this function's stack frame (units: bytes, must match the corresponding .su line). |
Definition at line 81 of file ra8_stack_budget.h.
Referenced by ra8_rsip_protected_aes_init(), ra8_rsip_protected_ecdsa_sign(), and ra8_rsip_protected_rsa_decrypt().