Hi Stan
Be careful with the parameter block. If you are using a swap buffer (USE_PAR_SWAP_BLOCK) there will be 2 x the parameter block size. If you increase the parameter block content by 6k it will need 2 x 6k space! This would give 0x12a800 as start of the file system (after it).
If your size of 7k is to fit 2 x 3.5k your addresses are of course correct.
Note also that the location 'z' will have a maximum size defined by its address to the end of the defined file system (97k in the demo project). Increasing the parameter part will reduce the maximum upload size, unless its position is moved down to compensate (eg. to 't')...
>>0...9A...Za...z like in ASCII:If you download the newest versions of the documents from
http://www.utasker.com/docs/documentation.html you should find that these have been corrected.
I don't think that it's good idea UPLOAD_FILE_LOCATION to be constant numberThe location must match between the application project and the bootloader project. If you take the value from the application project (by including a header file from the application) it will avoid a fixed definition. However it is always necessary to carefully decide where this location is - so this decision part will still be necessary.
>>0x118 000 to 0x118
3ff - Parameters (0x400 = 1024 = 1k which is by default)
>>0x118
400 to 0x127 7FF - File System
You can also see the file system layout in the document
\Applications\uTaskerV1.3\WebPages\WebPagesSAM7X\FileSystem\FileSystemSAM7X_160k.docThe details you give are correct.
>>4) Where ucKey[] = {0xa7, 0x48, 0xb6, 0x53, 0x11, 0x24} is placed in the bin file? This key is not placed in the bin file. It is used as additional
secret input to the check sum of the binary file. The check sum of the binary file is only correct when the same key is pass through the algorithm. This makes it necessary to use the same key to achieve the same check sum - resulting in a simple integrity check of the code (against tampering or unautherised source).
>>00 00 B3 61 12 34 ... at the start of the file. What 0000 and B361 are for?0000b361 is the length of the software (big endian).
See the header definition:
typedef struct stUPLOAD_HEADER
{
unsigned long ulCodeLength;
unsigned short usMagicNumber;
unsigned short usCRC;
#ifdef _ENCRYPTED
unsigned short usRAWCRC;
#endif
} UPLOAD_HEADER;>>69 B3 00 00 05 00 00 B3 61 12 34 ...0000b369 is the length of the 'file' (little endian) in which the data and its header are stored.
0x05 is the MINE type of the file (binary) - the rest is the start of the header as above.
This file header corresponds to the uFileSystem definition:
http://www.utasker.com/docs/uTasker/uTaskerFileSystem_3.PDFThe file header was added when the file was saved by FTP or HTTP post. The boot loader first checks the file header and then reads the content.
Regards
Mark