Tests: USB: Move control endpoint buffers to heap #11607
Merged
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.
Description
This fixes a stack overflow error in the basic USB tests.
I updated the
ctrl_buf
member of theUSBTester
andUSBEndpointTester
test classes to be allocated on the heap. This saves 2 KB of a main stack.The error was discovered on
DISCO_L475VG_IOT01A
. Bisecting showed that a regression occurred at 84e228a (PR #11136) which increased the size of theUSBDevice
by 240 B, from584
to824
. This in turn increased sizes of both test classes that inherit from theUSBDevice
; to 3048 (from 2808) in case of theUSBTester
, and 2980 (from 2740) in case of theUSBEndpointTester
.Pull request type
Reviewers
@maciejbocianski, @jamesbeyond, @jeromecoutant
Release Notes