]> git.sur5r.net Git - openocd/blobdiff - src/flash/nor/pic32mx.c
flash: less bogus errors
[openocd] / src / flash / nor / pic32mx.c
index 25403424535897de479a0398ed121446818c4731..4ebd2564bc9c6144c2c23683664ee833171d9f47 100644 (file)
@@ -322,7 +322,7 @@ static int pic32mx_write_block(struct flash_bank *bank, uint8_t *buffer,
                return retval;
 
        /* memory buffer */
-       while (target_alloc_working_area(target, buffer_size, &source) != ERROR_OK)
+       while (target_alloc_working_area_try(target, buffer_size, &source) != ERROR_OK)
        {
                buffer_size /= 2;
                if (buffer_size <= 256)