mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-01 08:06:16 +02:00
added 0x for hex
This commit is contained in:
parent
a1c4ecab6b
commit
40602c2235
@ -203,7 +203,10 @@ int main(int argc, char** argv)
|
||||
fprintf(stderr, "Error - number of %s parameters %i\n", argv[1], argc);
|
||||
goto xout_xburst_interface;
|
||||
}
|
||||
u32_param = strtoul(argv[2], 0 /* endptr */, 16 /* base */);
|
||||
if (argv[2][0] == '0' && argv[2][1] == 'x')
|
||||
u32_param = strtoul(&argv[2][2], 0 /* endptr */, 16 /* base */);
|
||||
else
|
||||
u32_param = strtoul(argv[2], 0 /* endptr */, 10 /* base */);
|
||||
|
||||
usb_status = usb_control_msg(xburst_h,
|
||||
/* requesttype */ USB_ENDPOINT_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
||||
@ -244,7 +247,10 @@ int main(int argc, char** argv)
|
||||
fprintf(stderr, "Error - number of %s parameters %i\n", argv[1], argc);
|
||||
goto xout_xburst_interface;
|
||||
}
|
||||
read_len = strtol(argv[2], 0 /* endptr */, 16 /* base */);
|
||||
if (argv[2][0] == '0' && argv[2][1] == 'x')
|
||||
read_len = strtol(&argv[2][2], 0 /* endptr */, 16 /* base */);
|
||||
else
|
||||
read_len = strtol(argv[2], 0 /* endptr */, 10 /* base */);
|
||||
read_buf = (char*) malloc(read_len);
|
||||
if (!read_buf) {
|
||||
fprintf(stderr, "Error - cannot allocate %i bytes read buffer.\n", read_len);
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
../host-app/xbboot set_addr 80002000
|
||||
../host-app/xbboot set_addr 0x80002000
|
||||
../host-app/xbboot bulk_write ../target-stage1/stage1.bin
|
||||
../host-app/xbboot start1 80002000
|
||||
../host-app/xbboot set_addr 81c00000
|
||||
../host-app/xbboot start1 0x80002000
|
||||
../host-app/xbboot set_addr 0x81c00000
|
||||
../host-app/xbboot bulk_write ../target-echokernel/echo-kernel.bin
|
||||
../host-app/xbboot flush_cache
|
||||
../host-app/xbboot start2 81c00000
|
||||
../host-app/xbboot start2 0x81c00000
|
||||
|
Loading…
Reference in New Issue
Block a user