Repository navigation
Conversation
AudioTask drives the Qwiic buzzer over I2C (Wire TX/RX buffers) and walks the melody tables via audioPlayEvent()/audioPlayTone(). At 256 words (1KB) the stack had very little headroom for that call chain plus any DEBUG_SERIAL output. Bump to 384 words (1.5KB) for margin. The existing stack high-water-mark check is DEBUG_MODE-only, so tight margins were not observable in production builds. Closes review finding M6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finding M6
STACK_AUDIOwas 256 words / 1KB (SongbirdConfig.h:88-94).AudioTaskdrives the Qwiic buzzer over I2C (Wire TX/RX buffers) and walks the melody tables viaaudioPlayEvent()/audioPlayTone()— a deep enough call chain that 256 words left very little headroom, especially withDEBUG_SERIALprinting in debug builds. Stack exhaustion in FreeRTOS is silent and corrupting.Fix
Bump
STACK_AUDIOto 384 words (1.5KB). This is within the 384-512 range recommended by the review and adds meaningful margin at trivial RAM cost (+512 bytes; total RAM usage stays ~11%).Note: the stack high-water-mark instrumentation in
tasksLogStackUsage()is#ifdef DEBUG_MODEonly, so tight margins were not observable in production builds — this is a defensive sizing change rather than a response to a measured overflow.Build
pio run— both envs pass (blues_cygnet + cygnet_debug SUCCESS).Closes review finding M6