-
Notifications
You must be signed in to change notification settings - Fork 709
cam_hal: shrink ISR stack, silence spam, strip logs at low levels #765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cam_hal: shrink ISR stack, silence spam, strip logs at low levels #765
Conversation
@turenkomv feel free to test. The goal here is to be less crashy without increasing the standard stack size. |
Without increasing the stack size, I’m getting a crash like this:
Increasing the stack size for framebuffer_task as shown here helps avoid the crash:
After that, the device runs stably — no more crashes — but still doesn’t receive any frames. |
thanks! Sorry for the delayed response. I'll wait for further development that I got the hardware, which arrived in my country today. So given the usual delay it should be here on monday. |
please resolve the conflicts, do not use |
33e6180
to
3d093a9
Compare
ok, let's get this one ready now :) |
3d093a9
to
df7dcec
Compare
* Replace ESP_LOGx in ISRs/tight loops with CAM_WARN_THROTTLE(counter,msg) → uses ROM-resident ets_printf(); ~300 B less stack per hit. * At CONFIG_LOG_DEFAULT_LEVEL < 2 the macro compiles to a no-op, so *all* warning code is dropped from the binary. * First miss logs immediately, then every 100th; counter wraps at 10 000 (reset to 1 to skip the “first miss” banner after wrap). * New static uint16_t counters per call-site keep totals without globals. * Kconfig switch CAM_LOG_SPAM_EVERY_FRAME (=0) restores old per-frame debug. No functional change to capture path—just less stack, fewer cycles, smaller image, and a much quieter UART.
df7dcec
to
f8fad50
Compare
Woops, thanks for catching that! |
all done :) |
Thanks for the quick review process! :) |
Description
Requires
#758, #759 and #760 to be merged first, thus containing their commits here.→ uses ROM-resident ets_printf(); ~300 B less stack per hit.
so all warning code is dropped from the binary.
(reset to 1 to skip the “first miss” banner after wrap).
No functional change to capture path—just less stack, fewer cycles,
smaller image, and a much quieter UART.
Related
Crashes reported by @turenkomv here due to excessive stack usage.
Checklist
Before submitting a Pull Request, please ensure the following: