summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Bech <joakim.bech@linaro.org>2016-09-02 15:19:05 +0200
committerJoakim Bech <joakim.bech@linaro.org>2016-09-02 15:19:05 +0200
commit5b7ec66adff790a8194c3c20c34541c6285030dd (patch)
tree68f39682c2d214063bbdc636463413f9f032da3a
parent981cf6fe156fccbf8ddf71a349efb68c7da45103 (diff)
Update help message
Signed-off-by: Joakim Bech <joakim.bech@linaro.org>
-rwxr-xr-xpatch_mynewt_img.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/patch_mynewt_img.py b/patch_mynewt_img.py
index cd67b0a..aa843a7 100755
--- a/patch_mynewt_img.py
+++ b/patch_mynewt_img.py
@@ -94,7 +94,11 @@ def create_jlink_script(image_file, erase=False):
def usage():
- print(sys.argv[0] + " -b <zephyr.bin> -i <zephyr.img> -o <offset> -f")
+ print(os.path.basename(sys.argv[0]) + " -b <zephyr.bin> -i <zephyr.img> -o <flash_base_offset> -f")
+ print(" -b Binary INPUT, the raw binary (zephyr.bin)")
+ print(" -i IMG OUTPUT, on a format mynewt's bootloader expect")
+ print(" -o offset in flash (for jlink flash script)")
+ print(" -f Flash IMG onto the device")
def main(argv):
@@ -105,7 +109,7 @@ def main(argv):
erase = False
try:
- opts, args = getopt.getopt(argv, 'b:i:o:feh', ['bin=', 'img=', 'offset=',
+ opts, args = getopt.getopt(argv, 'b:i:o:feh', ['bin=', 'img=', 'flash_base_offset=',
'erase', 'flash', 'help'])
except getopt.GetoptError:
usage()
@@ -123,7 +127,7 @@ def main(argv):
try_flash = True
elif opt in ('-i', '--img'):
image_file = arg
- elif opt in ('-o', '--offset'):
+ elif opt in ('-o', '--flash_base_offset'):
offset = arg
else:
usage()
@@ -132,7 +136,7 @@ def main(argv):
if DEBUG:
print("Input (bin): %s" % binary_file)
print("Output (img): %s" % image_file)
- print("Offset to reset vector: %s" % offset)
+ print("Flash base offset: %s" % offset)
hdr = create_header(binary_file)
write_partial_img(binary_file, image_file, hdr)