This is an automated email from Gerrit. Spencer Oliver ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/1007
-- gerrit commit 0f2ef0c34fdd178173699ec6e54886d3d04b0fec Author: Spencer Oliver <[email protected]> Date: Fri Dec 7 11:08:33 2012 +0000 flash: stm32lx fallback to slow memory writes when no working area The current stm32lx driver will fail if no working area is provided - fallback to using slow writes if this is the case. Change-Id: I92b1535fec4aebc855c63ce2c54b10f168f3c07e Signed-off-by: Spencer Oliver <[email protected]> diff --git a/src/flash/nor/stm32lx.c b/src/flash/nor/stm32lx.c index 6d7efb8..ce41f94 100644 --- a/src/flash/nor/stm32lx.c +++ b/src/flash/nor/stm32lx.c @@ -399,10 +399,16 @@ static int stm32lx_write(struct flash_bank *bank, uint8_t *buffer, } if (halfpages_number) { - retval = stm32lx_write_half_pages(bank, buffer, offset, 128 - * halfpages_number); - if (retval != ERROR_OK) - return ERROR_FAIL; + retval = stm32lx_write_half_pages(bank, buffer, offset, 128 * halfpages_number); + if (retval == ERROR_TARGET_RESOURCE_NOT_AVAILABLE) { + /* attempt slow memory writes */ + LOG_WARNING("couldn't use block writes, falling back to single memory accesses"); + halfpages_number = 0; + words_remaining = (count / 4); + } else { + if (retval != ERROR_OK) + return ERROR_FAIL; + } } bytes_written = 128 * halfpages_number; -- ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
