To allow overriding of the boot stack size from the Mbed configuration
system, consistently use MBED_CONF_TARGET_BOOT_STACK_SIZE rather than
MBED_BOOT_STACK_SIZE.
Fixes#10319
Previously we get the common erase size of the whole flash, which
may or may not exists if there are multiple regions. In this case
the size returned is zero and the test fails.
Fix this by allocating read and write buffers that are large enough
for all sectors. The test itself already supports non-uniform
erase sizes, and the erase size at any address can be smaller
than our buffers.
The test case only uses one specific sector, but the erase size
is obtained for the whole block device instead. This doesn't work
if different regions of the flash don't have a common erase size.
Fix the issue by getting the erase size at the address we use.
The first revision (1.0) of SFDP (ref: JESD216) does not include
fields for software reset support. It's only been added in the
second revision (1.5) (ref: JESD216A).
Some Mbed OS targets such as DISCO_F746NG include flashes with
legacy SFDP, thus we add an option to preset the reset mode.