Author Topic: Using The Bootloader with Luminary Micro Chips  (Read 10203 times)

Offline mhoneywill

  • Full Member
  • ***
  • Posts: 173
    • View Profile
Using The Bootloader with Luminary Micro Chips
« on: February 24, 2009, 02:41:46 PM »
Hi Mark,

I've just tested the boot loader, and worked out how to use it. I downloaded the generated "z_Upload.bin" file by ftp. And rebooted and the new software was flashed and verified to be running.

I then connected via ftp again and say the "z_Upload.bin" file, does this mean the next time the board is rebooted it will flash the code again? or is the file flagged some how as being used. Does the user need to delete this file from the file system?

Under the server option in FileZilla you can enter custom FTP commands, this would be a great way to handle an addition "RESET" command that would force a reboot and reprogram of the target, without having to do a power down.

Cheers

Martin

Offline mhoneywill

  • Full Member
  • ***
  • Posts: 173
    • View Profile
Re: Using The Bootloader with Luminary Micro Chips
« Reply #1 on: February 24, 2009, 03:46:19 PM »
I've just reconnected to the utasker via ftp, and the file "z_Upload.bin" is no longer shown in the listing so maybe my previous worries were unfounded? Does utasker delete z_Upload.bin when it has finished with it?

Martin

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Using The Bootloader with Luminary Micro Chips
« Reply #2 on: February 24, 2009, 06:01:29 PM »
Hi Martin

Yes, the uploaded file is deleted automatically when the copy has been confirmed to have been successful (this is the last step in the sequence).

Normally FTP is not used for uploads - HTTP Post is the preferred solution. In this case the web server automatically resets the target after the successful upload (after a short delay to allow the last web page to be served).

Since FTP is an autonomous module there is no interaction with the application. The application doesn't know that a firmware upload has taken place. This is the main disadvantage of uploading via FTP, but it is possible to add code in the file system part to recognize that an upload of a specific (pre-defined) file has just taken place and then inform the application, or else command a reset itself.

You may also like to look at cURL - this is a command line HTTP tool which enables scripts to perform file posts and so would be compatible with automated firmware uploads to the HTTP server and its inherent advantages of application interaction: http://www.utasker.com/forum/index.php?topic=496.0

The cURL post support is integrated in the latest Coldfire HTTP.c and has proven successful. The HTTP.c is not processor specific and can also be used for the Luminary project if required.

regards

Mark