µTasker Forum

µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: johnr on September 24, 2008, 09:23:51 PM

Title: SPI software upload
Post by: johnr on September 24, 2008, 09:23:51 PM
Hi Mark. I'm using the SP5 code with the external SPI web upload feature and
everything works Ok when I do a normal code upload.
 I've written a utility to take the elf.bin code and add a file system on top. This project
doesn't use the parameter blocks because we have a EEPROM to store params. So basically I build an image

  elf.bin code + padding + Filesystem image

 I run the image through uTaskerConvert,  upload it,  and get the success message.
After reboot I get stuck in the boot loader. When I restart the debugger the app code crashes.
so I guess we did a partial program flash.
Looking at dumps of the image it looks like uTaskerConvert just adds an 8 byte header, consisting of the code length and CRC, to the beginning of the file.

 Any ideas why this doesn't work ?


 Thanks,
 John
Title: Re: SPI software upload
Post by: mark on September 24, 2008, 09:30:19 PM
Hi John

Can it be a problem with the size of the combined application + padding + file system?

Can you see whether the boot loader is recognising the format of the uploaded file? If not it should run the old code and so not crash - this suggests therefore that it has copied and probably deleted the backup (can you check whether it has cleared the backup and jumps to the application?). If it jumps to the application but this doesn't run it then suggests that the application which it has loaded is for some reason not operational (corrupt?).

Regards

Mark
Title: Re: SPI software upload
Post by: johnr on September 24, 2008, 09:53:15 PM
Hi Mark,
 The size of the image is about 147K, layed out as

 120K code + 8K padding + 16K file system

 I'll step through the boot loader and see what's going on.
From what I understand, we should be able to do this.

 Thanks,
 John
 

Title: Re: SPI software upload
Post by: johnr on September 25, 2008, 09:02:51 PM
Hi Mark, I had to erase the app + file system areas in the boot code before programming
the new image, so now it works. The original code just erased the app area.


 Thanks,
 John