Author Topic: uTasker Utilities  (Read 23544 times)

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3240
    • View Profile
    • uTasker
uTasker Utilities
« on: May 14, 2011, 04:32:42 PM »
Hi All

In order to centralise the uTasker utilities - the small programs in the Tools directory - the most up-to-date package is maintained here, including release notes. The package always contains all tools.

Latest version: http://www.uTasker.com/software/Tools/uTaskerUtilitiesV2.18.zip


uTaskerCombine


Version V1.1 14-10-2009
===================

"uTaskerCombine -v" to get the version number.

Utility used to combine two binary files into a single file - often used to combine a boot loader with application
code to result in a single downloadable file.

Use "uTaskerCombine file1.bin file2.bin 0x1000 file3.bin"

Adds the content of file 2 at an offset of 0x1000 to the content of file2 (filling and space between the two with 0xff)
and saves the result to file3.bin.

Option = "uTaskerCombine file1.bin file2.bin 0x1000 file3.bin file4.ihex"

Adding a further file causes the resulting binary to be also saved in file4.ihex in Intel hex format. This is mainly
used for NXP projects where the program FlashMagic is used to program the combined binary file, but requires the code
to be in this format.

Version V1.2 20-09-2012
=======================

Option = "uTaskerCombine file1.bin file2.bin 0x1000 file3.bin file4.srec"

If the optional hex file has an extension .srec or .out it is considered as requiring Motorola S-REC instead.

Option = "uTaskerCombine file1.bin file2.bin 0x1000 file3.bin file4.srec 0x80000000"

An address following the hex file output is interpreted as an offset to be added to the content of the hex file - for example
the AVR32 has its code in internal flash starting at 0x80000000 and so requires this offset to load to the correct address.

If the exact format of the srec file is to be controlled it can be done so by specifying S1, S2 or S3 after the file name
(before any optional offset) eg. "uTaskerCombine file1.bin file2.bin 0x1000 file3.bin file4.srec S3 0x80000000"



Version V1.3 21-01-2016
=======================

Allow concatenating two binary files by defining 0 offset.

Option = "uTaskerCombine file1.bin file2.bin 0 file3.bin file4.srec"


Version V1.4 19-04-2016
=======================

Correct optional offset when building with VS2010, respecting that the input is now in unicode

Version V1.5 31-07-2017
=======================

Terminate iHex line with CR + LF (rather than just LF)

Version V1.6 17-03-2020
=======================

Correctly recognise srec/ihex files in unicode

Version V1.7 06-07-2020
=======================

Add option to combine binary files with file object entries compatible with the uTasker USB MSD device loader.
This makes it possible to combine complete loader/application images for single-step production progamming.

Use example:

uTaskerCombine uTaskerBootLoader.bin uTaskerV1.4_application.bin 0x10000[0x100-UPLOAD_DISK] uTaskerComplete.bin

The binary input file "uTaskerBootLoader.bin" is combined with the binary input file "uTaskerV1.4_application.bin", whereby a FAT file
object for the second file is generated and inserted at 0x10000, with a length of 0x100. This directory entry contains also a disk volume ID
"UPLOAD_DISK" so that the USB MSD device loader can display the disk and file names accordingly. The file itself contains its original date/time/size
for version management purposes.
the second file is thus located at 0x10100, after the file object, in order to give the exact same layout as if it had been loaded using the serial loader.

Version V1.8 13-07-2020
=======================

Remove complete file path when embedding file objects
Ensure iHex extended record is terminated with CR and LF

Version V1.9 22-07-2022
=======================

Correct short file name cluster location in file object



Source file for building with Linux/MAC: http://www.uTasker.com/software/Tools/uTaskerCombineV1.8_source.zip




uTaskerConvert

Version V1.4 original
===============

"uTaskerConvert -v" to get the version number.

This utility is used mainly to convert a binary input file, linked to an address suitable for operation with the
uTasker boot loader, to an uploadable file which is recognised by the BM-boot loader.

Use 1: "uTaskerConvert file1.bin file2.bin -0x22ba -b267a8200926"

File1 is converted to file2 by adding a header containing details of its length and CRC16 check sum. The magic number 0x22ba is
used to identify the project that the code is related to (it can be any 16 bit hex value). The key -b267a8200926 is used as an
encryption key to ensure that only code converted using the project key (this can be up to 100 hex bytes long) is recognised as
valid code by the boot loader

Use 2: "uTaskerConvert file1.bin file2.bin -0x22ba -b267a8200926 -ab627735ad192b3561524512 -17cc –f109"

ab627735ad192b3561524512 is an encryption key which is used to transform the data content. It must have a length divisible by 4
and its length determines the strength of the coding.
17cc is used to prime a pseudo-random number generator used during the process (should not be zero) which must also match.
F109 is a shift value in the code which makes it much more difficult to break using brute-force techniques. Without this shift
it would be much easier to match known code patterns at the start of the file. Since the start code can be anywhere in the data
this avoids this possible weakness.

For full details about the use see http://www.utasker.com/docs/uTasker/uTasker_BM_Loader.pdf


Version V1.5 4-12-2010
==================

Allows use with no key specified.


Version V1.6 14-05-2011
===================

Added capability to convert Motorola binary to raw binary output. This is useful for CodeWarrior binary output
which can otherwise not be used directly as a code image - after the conversion the content is in raw binary format
and so suitable for general binary program use.

User "uTaskerConvert uTasker_BM.bin raw.bin -b"

Version V1.7 01-10-2013
===================
Version 1.7 increase the maximum target size from 512k to 1M


Version V1.8 24-04-2014
========================
Version 1.8 increase the maximum target size from 1M to 2M

Version V1.9 09-06-2014
========================
Version 1.9 allow encryption offset values larger than the file length

Version V1.10 02-10-2015
========================
Version 1.10 protect against motorola to raw binary conversion when (invalid) 0xffffffff length block is found

Version V1.11 06-11--2018
=========================
Version V1.11 adds AES256 encryption:

Usage 1: uTaskerConvert.exe uTaskerV1.4_BM.bin aes256_coded.bin $"aes256 secret key" $"initial vector"
$"aes256 secret key" is a AES256 encryption key string that can be up to 32 characters long
If shorter than 32 bytes it is extended to 32 bytes in length by adding 'X' characters.
$"initial vector" is the AES256' initial vector value, which is up to 16 characters long (padded with 'x's when shorter).
This string is optional and when not present a reset (all 0) initial vector is used.

Usage 2: uTaskerConvert.exe uTaskerV1.4_BM.bin aes256_coded.bin +"8d5E5f42ffs4a9000135f2" +"001122f354e4b8"
+"8d5E5f42ffs4a9000135f2" is a hex AES256 encryption key string that can be up to 32 characters long.
If shorter than 32 bytes it is extended to 32 bytes in length by adding 'X' characters.
+"001122f354e4b8" is the AES256' initial vector value, which is up to bytes long (padded with 'X's when shorter).
This string is optional and when not present a reset (all 0) initial vector is used.

The length of the encrypted file is always divisible by 32 and so may be up to 31 bytes longer than the input file.

Version for MAC OS High Sierra: http://www.uTasker.com/software/Tools/uTaskerConvertMAC_OS_High_Sierra.zip


Version V1.12 18-07-2020
=========================
Version V1.12 adds AES128-CTR encryption option.

Usage 1: uTaskerConvert.exe uTaskerV1.4_BM.bin aes256_coded.bin E=128 $"aes256 secret key" $"initial vector"
Usage 2: uTaskerConvert.exe uTaskerV1.4_BM.bin aes256_coded.bin E=128 +"8d5E5f42ffs4a9000135f2" +"001122f354e4b8"
Note the new E=128 (before the secret key)

The AES256 option can be used as default as in version V1.11 or shown more clearly with
uTaskerConvert.exe uTaskerV1.4_BM.bin aes256_coded.bin E=256 $"aes256 secret key" $"initial vector"
Note the new E=256 (before the secret key)
The length of the encrypted file is always divisible by 16 and so may be up to 16 bytes longer than the input file.


Version V1.13 27-07-2020
=========================

Modified iv (nonce counter) format of AES128-CTR for i.MX RT on-the-fly compatibility and added BEE mode
Encryption address added as parameter (defaults to 0x60020110 when no parameter passed).
New usage
OTFAD mode (i.MX RT 1011)
Usage 1: uTaskerConvert.exe uTaskerV1.4_BM.bin aes256_coded.bin E=128-60020110 $"aes256 secret key" $"initial vector"
Usage 2: uTaskerConvert.exe uTaskerV1.4_BM.bin aes256_coded.bin E=128-60020110 +"8d5E5f42ffs4a9000135f2" +"001122f354e4b8"

BEE mode (other i.MX RT parts' with Bus Encryption Engine)
Usage 1: uTaskerConvert.exe uTaskerV1.4_BM.bin aes256_coded.bin E=128B-60020110 $"aes256 secret key" $"initial vector"
Usage 2: uTaskerConvert.exe uTaskerV1.4_BM.bin aes256_coded.bin E=128B-60020110 +"8d5E5f42ffs4a9000135f2" +"001122f354e4b8"
(note E=128B rather than E=128)


Version V1.14 05-09-2020
=========================

Option to insert a boot header after the header.
Example:
input.bin output.bin +boot_header.txt -0x2123 -a748b6531124
The content (hex values) in boot_header.txt is inserted between the header and the input.bin content and included in the checksum

Source file for building with Linux/MAC: http://www.uTasker.com/software/Tools/uTaskerConvertV1.14_source.zip

Version V1.15 21-10-2021
=========================

Version 1.15 Increased binary size supported from 2MBytes to 8Mbytes




uTaskerFileCreate

Version V1.4 and original
==================

"uTaskerFileCreate -v" to get the version number.

This utility has various useful functions.

Example use 1: "uTaskerFileCreate favicon.ico favicon.c uFavicon"

Converts the input file into an array of name uFavicon in the file favicon.c

Example use 2: "uTaskerFileCreate -f user_files.txt UserFiles.bin"

Uses the details in user_files.txt to create a binary file called UserFiles.bin containing
a embedded combination of various sources files. In addition a file called UserFiles.c is generated which can
be used to compile the content into code.

For full details about the its use for integrating web pages and other user files into projects, or into embedded files
see http://www.uTasker.com/docs/uTasker/uTaskerUserFiles.PDF


Example use 3: "uTaskerFileCreate -fb user_pics.txt widgets.h"

Uses the details in user_pics-txt to generate a C-header file widgets.h for includion in a project,
allowing images to be converted and embedded into code: For fulle details about the its use for converting
images to integrated C-code see http://www.uTasker.com/docs/uTasker/uTaskerLCD.PDF


Version V1.5 07.03.2011
==================
- Solved problem with image names like "image/" being generated by V1.4

Version V1.6 30.03.2011
==================
- Solved problem with images without -x controls

Version V1.7 30.03.2011
==================
- Respect the colour palette of monochrome images so that an inverted image is converted as colour inverted

Version V1.8 29.06.2011
==================
- corrected conversion of 24-bit bitmaps with pixel width not divisible by 8

Version V1.9 02.03.2012
==================
- Flag -? allows file of name/type "XLM_variable.txt" to be added to an embedded file collection with access file name "XML?variable"

Example use:
XML_TestVariable.txt -c=FILE_INVISIBLE -w -? -T=MIME_HTML

The content of this file is embedded with access file name "XML?TestVariable" and will be parsed by the HTTP server to allow it to be used as control for AJAX parameters.

Version V1.10 14.11.2020
========================

Add 16 bit color support (RGB565)

Version V1.11 26.02.2021
========================

Add option to rename embedded user files

Example use:
MyFile.html -T=MIME_HTML // normal embed of file MyFile.html into the embedded user file

MyFile.txt [index.html] -T=MIME_HTML // optional embed of file MyFile.txt into the embedded user file under the name index.html

Version V1.12 06.08.2022
========================
Correct generation of array which failed with previous version and add source file name to arrays (with Linux build option) line endings normalised to CR + LF (windows)

Source file for building with Linux/MAC: http://www.uTasker.com/software/Tools/uTaskerFileCreate_V1.11_source.zip


« Last Edit: August 09, 2022, 10:32:26 PM by mark »