cortexm: Added additional debug information for part probing

This commit is contained in:
dragonmux 2022-06-22 16:50:04 -04:00 committed by Piotr Esden-Tempski
parent b5b2d4dc95
commit 680a009690
1 changed files with 18 additions and 1 deletions

View File

@ -378,8 +378,25 @@ bool cortexm_probe(ADIv5_AP_t *ap)
} else {
target_check_error(t);
}
#if PC_HOSTED
#define STRINGIFY(x) #x
#define PROBE(x) \
do { if ((x)(t)) {return true;} else target_check_error(t); } while (0)
do { \
DEBUG_INFO("Calling " STRINGIFY(x) "\n"); \
if ((x)(t)) \
return true; \
else \
target_check_error(t); \
} while (0)
#else
#define PROBE(x) \
do { \
if ((x)(t)) \
return true; \
else \
target_check_error(t); \
} while (0)
#endif
switch (ap->ap_designer) {
case AP_DESIGNER_FREESCALE: