28 QCoreApplication a(argc, argv);
35 numtargets = atoi(argv[1]);
36 printf(
"BEGIN PROVISION - ################# %d TARGETS #################\n",numtargets);
38 retrycount = atoi(argv[2]);
39 printf(
"RETRY COUNT - ################# %d RETRIES #################\n",retrycount);
43 printf(
"XFSTK: xfstk-api-example-serial performs multi-target provisioning of both fw and os in a serial raound robin fashion. This approach is useful when dealing with unreliable USB connectivity.\n\n");
44 printf(
"Usage: xfstk-api-example-serial.exe <number of targets> <number of retries>\n");
45 printf(
"\nExample: xfstk-api-example-serial.exe 8 1000\n");
46 printf(
"\nThe above commandline will perform provisoning for 8 targets and retry 1000 times on I/O error.\n");
49 bool provisioningok =
false;
56 int targetcounter = 0;
60 while(targetcounter < numtargets) {
61 provisioningok = test.
downloadfwos(
"//tmp//fwdnx.bin",
"//tmp//fwimage.bin",
"//tmp//osdnx.bin",
"//tmp//osimage.bin",
"0x80000001");
63 printf(
"TARGET: %d - ################# SUCCESS!!! ###############\n",targetcounter);
67 printf(
"TARGET: %d - !!!!!!!!!!!!!!!!! FAILURE... !!!!!!!!!!!!!!!\n",targetcounter);
68 printf(
"\nXFSTK: SUMMARY - TOTAL PASS = 0 - TOTAL FAIL = %d\n", numtargets);
69 printf(
"\nXFSTK: Programming NOT completed for all %d targets - FAIL\n",numtargets);
74 provisioningok =
false;
76 if(sanity > 2*numtargets) {
77 printf(
"\nXFSTK: SUMMARY - TOTAL PASS = 0 - TOTAL FAIL = %d\n", numtargets);
78 printf(
"\nXFSTK: Programming NOT completed for all %d targets - FAIL\n",numtargets);
83 printf(
"\nXFSTK: SUMMARY - TOTAL PASS = %d - TOTAL FAIL = %d\n", provpass, provfail);
85 printf(
"\nXFSTK: Programming NOT completed for all %d targets - FAIL\n",numtargets);
88 printf(
"\nXFSTK: Programming completed for all %d targets - PASS!\n",numtargets);
virtual bool downloadfwos(char *fwdnx, char *fwimage, char *osdnx, char *osimage, char *gpflags)
Performs single shot firmware and operating system download.
virtual bool registerstatuscallback(xfstkstatuspfn statuspfn, void *clientdata)
Registers a callback with the xfstk api in order to obtain download status information.
void status(char *message, void *clientdata)
Definition: xfstk-dldr-example-serial.cpp:22
virtual void settargetretrycount(int retries)
Sets the number of retries to perform during faulty USB I/O.
void(* xfstkstatuspfn)(char *status, void *)
Represents an optional status callback function that can be provided to xfstk API to obtain status in...
Definition: xfstkdldrapi.h:113
This interface enables the development of Intel SoC firmware/operating system provisioning applicatio...
Definition: xfstkdldrapi.h:124