Author Topic: uTaskerConvert problems  (Read 3710 times)

Offline LuisHS

  • Newbie
  • *
  • Posts: 32
    • View Profile
uTaskerConvert problems
« on: December 23, 2019, 10:53:53 AM »
Hello Mark.

I am trying to use uTaskerConvert for a new project and I have problems. The resulting file is not loaded by the bootloader.

All codes are correct, the only thing I notice is that if I encrypt a small-sized program it is when do not load it, for example, 26K once encrypted, however, another program with 75K size does load it. Both encrypted with uTaskerConvert with the same codes.

I know it's because of the size because if I edit the source that loads ok, and reduce it to keep only the main() function empty, to create a small program, the bootloader no longer loads it after converting it with uTaskerConvert.

The parameterization that I use with uTaskerConvert is the one indicated in the manual:

uTaskerConvert uTasker_demo uTasker_update.bin -0x1234 –A748b6531124 –ab627735ad192b3561524512 -17cc - f109

My codes are other, but with the same format and length of fields. Some time ago I had a similar problem and it was because I had defined the first field as -1234 instead of -0x1234, but now it's fine and I'm still having problems.

Why can it be failing me, and only with small programs?

Best Regards
« Last Edit: December 23, 2019, 10:56:33 AM by LuisHS »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: uTaskerConvert problems
« Reply #1 on: December 23, 2019, 04:42:40 PM »
Hi Luis

I have not heard of such an issue so I am wondering whether it is a problem with saving the content rather than the converted content? For example, when the content is copied (usually be the application) to the intermediate storage location is it fully and correctly copied? If there were, for example, to be a byte not saved it would cause it to fail because the check sum of the file would not match.
Make sure that after the copy has been completed there is a
fnWriteBytesFlash(ptrFile, 0, 0);                                   // close any outstanding FLASH buffer
performed to ensure that the final buffer is committed to Flash (when using internal flash and custom save routines).

See also this video for a guide to building and testing the loader:
https://www.youtube.com/watch?v=lm3M-ZlaFLQ
whereby the verification can also be done with a debugger on the HW.

If you don't make progress please post the two binary files (the one working and the one not working) so that I can check their integrity.

Regards

Mark

Offline LuisHS

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: uTaskerConvert problems
« Reply #2 on: December 25, 2019, 07:13:53 AM »

Thanks mark.
I have tried to reduce the value of the magic number, to a lower value and now it works.

I read something in the manual that this value should be as low as the minimum value of the program page size, or something like that. I didn't understand exactly what this means, but it worked for me by reducing the value of this parameter.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: uTaskerConvert problems
« Reply #3 on: December 28, 2019, 05:21:41 PM »
Hi

The magic number is simply a value that needs to match so I don't think that it will have any range restriction.

There was a restriction with the offset when encrypting in an original version of the program (where it needed to be smaller than the program length) but this should be resolved when using the latest version of the tool.

In case you experience such a problem again (with latest version of the untility) please send me the binary files so that I can check it.

Regards

Mark

Offline LuisHS

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: uTaskerConvert problems
« Reply #4 on: December 31, 2019, 05:05:25 AM »

ok, thanks.