On Wed, Aug 10, 2011 at 12:01 AM, Spencer Oliver <s...@spen-soft.co.uk>wrote:
> On 09/08/2011 22:15, Øyvind Harboe wrote: > >> Any objections? >> >> > I would like to give this a test-run tomorrow. > > One observation - other targets that do not yet support the new functions > will output a LOG_ERROR to the user. Maybe this should be a LOG_DEBUG as the > user will have no idea what it means. > > Cheers > Spen > + if (!target->type->start_algorithm) { + LOG_ERROR("Target type '%s' does not support %s", + target_type_name(target), __func__); Are you referring to this? That's in line with the corresponding check in target_run_algorithm(), I think. If some code is executing target_xxx_algorithm() when it isn't supported by the target in question, that's clearly an error, right? Well, I can see a scenario where for example an architecture specific checksum_memory function had been (re-)written to make use of target_start/wait_algorithm, and a target x of that architecture points to that checksum_memory function as well as the architecture's start/wait_algorithm functions. If another target of the same architecture uses the same checksum_memory function but hasn't yet populated the start/wait_algorithm pointers, then the user would get an ERROR when checksumming on that target. On the other hand, maybe that's a good way to make someone update the target's pointers. LOG_ERROR or LOG_DEBUG, I don't care much. It shouldn't happen in the current tree anyway, unless I've overlooked something. /Andreas
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development