diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-05-04 13:26:52 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-05-05 15:24:24 +0200 |
commit | 82ea640830fe13f9ab8ef33c65a76480b697f856 (patch) | |
tree | 3db8a893b3bf7ac1fd7d92cf39691a8f5fe0a69d /src/flash/nor/core.h | |
parent | 812e21ac396247767da0144748b5f52ad11b3e17 (diff) |
gdb: connect will now fail if flash autoprobe fails
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 <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/flash/nor/core.h')
-rw-r--r-- | src/flash/nor/core.h | 5 |
1 files changed, 3 insertions, 2 deletions
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 |