17 #include "../../src/ISComm.h" 18 #include "../../src/serialPortPlatform.h" 19 #include "../../src/inertialSenseBootLoader.h" 24 printf(
"Upload: %d percent... \r", (
int)(percent * 100.0
f));
35 printf(
"Verify: %d percent... \r", (
int)(percent * 100.0
f));
48 int main(
int argc,
char* argv[])
50 if (argc < 3 || argc > 4)
52 printf(
"Please pass the com port, firmware file name to bootload, and optionally bootloader file name as the only arguments\r\n");
53 printf(
"usage: %s {COMx} {Firmware file} {Bootloader file (optional)}\r\n", argv[0]);
76 memset(¶m, 0,
sizeof(param));
89 param.
port = &serialPort;
112 printf(
"Bootloader success on port %s with file %s\n", serialPort.
port, param.
fileName);
117 if(param.
error[0] != 0)
118 printf(
"Bootloader failed! Error: %s\n", param.
error);
120 printf(
"Bootloader failed!\n");
static int bootloaderVerifyProgress(const void *obj, float percent)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val)
static void bootloaderStatusText(const void *obj, const char *info)
void serialPortSetPort(serial_port_t *serialPort, const char *port)
struct bootload_params_t::@41::@42 bitFields
char port[MAX_SERIAL_PORT_NAME_LENGTH+1]
pfnBootloadProgress uploadProgress
pfnBootloadStatus statusText
int bootloadFileEx(bootload_params_t *params)
int main(int argc, char *argv[])
char error[BOOTLOADER_ERROR_LENGTH]
static int bootloaderUploadProgress(const void *obj, float percent)
int forceBootloaderUpdate
pfnBootloadProgress verifyProgress
union bootload_params_t::@41 flags