From 82ea640830fe13f9ab8ef33c65a76480b697f856 Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Tue, 4 May 2010 13:26:52 +0200 Subject: gdb: connect will now fail if flash autoprobe fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This stops GDB from launching with an empty memory map, making gdb load w/flashing fail for no obvious reason. The error message points in the direction of the gdb-attach event that can be set up to issue a halt or "reset init" which will put GDB in a well defined stated upon attach and thus have a robust flash autoprobe. Signed-off-by: Øyvind Harboe --- src/flash/nor/core.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/flash/nor/core.h') diff --git a/src/flash/nor/core.h b/src/flash/nor/core.h index 68220afe..797cf686 100644 --- a/src/flash/nor/core.h +++ b/src/flash/nor/core.h @@ -157,9 +157,10 @@ struct flash_bank *get_flash_bank_by_name(const char *name); /** * Returns a flash bank by the specified flash_bank_s bank_number, @a num. * @param num The flash bank number. - * @returns A struct flash_bank for flash bank @a num, or NULL + * @param bank returned bank if fn returns ERROR_OK + * @returns ERROR_OK if successful */ -struct flash_bank *get_flash_bank_by_num(int num); +int get_flash_bank_by_num(int num, struct flash_bank **bank); /** * Retreives @a bank from a command argument, reporting errors parsing * the bank identifier or retreiving the specified bank. The bank -- cgit v1.2.3