antonio bergnoli wrote:
> Does anyone has some experience with ujtag used as library? If yes, i'd
> like to have some example, ( a code snippet is enough ) to get started.
> Thank you in advance.
Yes. My program essentially does things like:
urj_chain_t *chain;
const urj_cable_driver_t **d;
urj_cable_t *cable;
int r;
const char *cable_name = "gnICE";
urj_log_state.level = URJ_LOG_LEVEL_NORMAL;
chain = urj_tap_chain_alloc();
if (chain == NULL) {
printf("Error: %s\n", urj_error_describe());
return -1;
}
for (d = urj_tap_cable_drivers; *d != NULL; d++) {
if (strcasecmp((*d)->name, cable_name) == 0) {
break;
}
}
if (*d == NULL) {
printf("Error: %s\n", urj_error_describe());
return -1;
}
printf("Invoke 'urj_tap_cable_usb_connect()' ... ");
cable = urj_tap_cable_usb_connect(chain, *d, NULL);
if (cable == NULL) {
printf("Error: %s\n", urj_error_describe());
return -1;
}
mrg_diag_printf(" ... OK\n");
mrg_diag_printf("Invoke 'urj_tap_detect()' ... ");
r = urj_tap_detect(chain);
if (r == URJ_STATUS_FAIL) {
printf("Error: %s\n", urj_error_describe());
return -1;
}
printf(" ... %s\n", urj_status_string(r));
and then you do your JTAG actions (SVF player or whatever).
The configure part may also be a bit challenging. I have (among others):
./autogen.sh .... --disable-shared --disable-apps ....
Rutger Hofman
VU Amsterdam
------------------------------------------------------------------------------
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development