Skip to content

Commit

Permalink
Print supported card list when a non-supported card is entered
Browse files Browse the repository at this point in the history
  • Loading branch information
pcw-mesa committed Nov 16, 2023
1 parent 71ac3bc commit 2045e8e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions anyio.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ int anyio_find_dev(board_access_t *access) {

if (supported_board == NULL) {
printf("ERROR: Unsupported device %s\n", access->device_name);
anyio_print_supported_board_names();
return -1;
}

Expand Down Expand Up @@ -446,3 +447,13 @@ void anyio_bitfile_print_info(char *bitfile_name, int verbose_flag) {
print_bitfile_header(fp, (char*) &part_name, verbose_flag);
fclose(fp);
}

void anyio_print_supported_board_names() {
printf("Supported card names are:\n");
for (size_t i=0; supported_boards[i].name != NULL; i++) {
printf("%10s,",supported_boards[i].name);
if ((((i+1) % 6) == 0) & (i != 0)) { printf("\n"); };
}
printf("\n");
}

1 change: 1 addition & 0 deletions anyio.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ void anyio_dev_print_pin_descriptors(board_t *board);
void anyio_dev_print_localio_descriptors(board_t *board);
void anyio_dev_print_sserial_info(board_t *board);
void anyio_bitfile_print_info(char *bitfile_name, int verbose_flag);
void anyio_print_supported_board_names();

#endif
1 change: 1 addition & 0 deletions hostmot2.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,3 +865,4 @@ void hm2_print_bob_hint_names() {
}
printf("\n");
}

2 changes: 1 addition & 1 deletion mesaflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#endif

#ifndef VERSION
#define VERSION "3.5.3"
#define VERSION "3.5.4"
#endif

static int device_flag;
Expand Down

0 comments on commit 2045e8e

Please sign in to comment.