Author Topic: uTasker Utilities  (Read 7954 times)

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2962
    • 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.11.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)



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 dividable 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.




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.

« Last Edit: November 07, 2018, 02:50:39 AM by mark »