Author Topic: Problem to download the bootloader  (Read 12378 times)

Offline kourov

  • Newbie
  • *
  • Posts: 8
    • View Profile
Problem to download the bootloader
« on: June 16, 2008, 02:08:13 PM »
Hello

I would like to singly download the bootloader and an application in my 52235EVB but I don't succeed.
I had read the utaskerboot.pdf and thr BM-bootloader_for_M5223X.pdf but I don't understand how to download each part.
Which target in codewarrior is for the bootloader in the project ??

thanks


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Problem to download the bootloader
« Reply #1 on: June 16, 2008, 02:28:21 PM »
Hi

If you follow: http://www.utasker.com/docs/uTasker/BM-Booloader_for_M5223X.PDF
it should be possible to do this.

The application poject must be compiled using the target "bare_min_app_rom". The boot loader project has only one target setting so this doesn't have to be specifically selected.

Follow page 4/8 carefully and you should also be able to download the two codes and then start working with the boot loader.

Regards

Mark

Offline kourov

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Problem to download the bootloader
« Reply #2 on: June 17, 2008, 09:35:43 AM »
hello mark

Thanks for your reply.

I try to load a another project by the boot loader using the application to convert the file .bin but it has no effect, I have a web page which say that the download success but it is again the original project which is executing.

I would like to know if it is possible to use the botloader in order to load a project which is completely different from an uTasker project.
Or if it is possible to use the bootloader in a different  project from an uTasker project.

Thanks

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Problem to download the bootloader
« Reply #3 on: June 17, 2008, 12:45:17 PM »
Hi

If the download shows success it means that the copy of the new software successfully took place.
However the boot loader checks its content and integrity and if there is something wrong it will continue using the original code.

If the downloaded firmware is still visible in the FLASH (via FTP for example) it means that it is not compatible.

The best way to find out why is to debug the bootloader project since it will check the file and its its header and decide what to do with it. One of these checks must be failing.

As long as the format corresponds, the boot loader will program any project (it doesn't specifically need to be a uTasker project), but the new porject must also allow further uploads to be made, with the corresponding format).

Regards

Mark

Offline kourov

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Problem to download the bootloader
« Reply #4 on: June 18, 2008, 09:26:21 AM »
Hi

I still have a problem with the download of an other program.
I succeed to put the web server in the board by ftp, after I download the file .bin (converted with your application uTaskconvert), the web page "download succeed" appears but after nothing happen there is no web server I can't access to the debug menu, I can't do anythings.
However I tried to download the same application that there was just before ("bare_min_app_rom").

Another thing I don't know if it is important but I can't use the sp6 or sp7 with codewarrior v7.0, so I use the project which you give me in link in the mail I receive from uTasker.

Thanks

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Problem to download the bootloader
« Reply #5 on: June 18, 2008, 10:49:24 AM »
Hi

If I have understood correctly, you have a non-uTasker based application and you convert it to a bin file using the conversion utility. Afterwards it is successfully loaded to the board. The board then reboots and copies the new code but then the board doesn't respond any more.

If this is the case, the boot loading was successful but the new program either doesn't run (linked to incorrect address for example or doesn't use interrupt vectors from RAM) or the new program doesn't support any Ethernet debug menu operation.

Don't forget that once you have downloaded new code, the original application (uTasker web server, debug menu etc. have been overwritten by your new code). It is up to your new code to supply everything that your new application requires, including the ability to download the next program.

I haven't heard of problems with SP6 and CW7. There are some potential issues with CW7 and SP7 (possibly same with SP6 but I never received reports of them) - these are listed here: http://www.utasker.com/forum/index.php?topic=265.msg1123#msg1123
Apart from a couple of manual set up changes there shouldn't be any problem with the application. The boot loader hasn't been tested by myself with CW7 and I plan to do this shortly - I have found that the code size increases with CW7 and am wondering whether it then won't fit into the allocated space...?

Regards

Mark

Offline kourov

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Problem to download the bootloader
« Reply #6 on: June 18, 2008, 11:03:30 AM »
Hi

Thanks for your reply.
Before tryied with my own application which is a non-uTasker based application, I tried with an utasker application but it doesn't work.
so to summarize I load in my board the bootloader and the bare_min_app_rom then I load the web server and after I tried to use the boot loader in order to load the same application ("bare_min_app_rom") and it doesn't work.
I can't see in the source code where can be the problem.

regards

kourov

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Problem to download the bootloader
« Reply #7 on: June 18, 2008, 11:33:14 AM »
Hi kourov

If you download the same code, how do you know that it doesn't work. After the download the same code will run again - there is however a delay of about 4 while the new code overwrites the original code.
Also after the action the file which you loaded has been deleted from the file system - if it doesn't work (due to incompatibility) this file will still be visible.

Most perople test by making a small code change (version number for example) so that it can be identified if the file has changed or not.

Regards

Mark

Offline kourov

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Problem to download the bootloader
« Reply #8 on: June 18, 2008, 12:34:34 PM »
I Want to say that nothing works after I transfert the same application no debug terminal no webserver.
I will try with another application but it should works with the same application.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Problem to download the bootloader
« Reply #9 on: June 18, 2008, 01:38:21 PM »
kourov

Thanks - now I understand. If the board stops working after a download I believe that the download was successful (if the download is not successful the old code is not replaced by the new code). This means that the new code is not operational.

You can check:
1. That the link address fo the new code is correct (this depends on the version of boot loader and whether you are uploading to internal FLASH or external SPI). Details are on pages 2 and 3 of http://www.utasker.com/docs/uTasker/BM-Booloader_for_M5223X.PDF
2. Connect the debugger and step through the boot loader project. It should start and find that there is no waiting firmware to be updated. Then it should read the start location of the application code and jump to it - if this doesn't operate correctly the reason for it may be visible.
3. Are you using CW7 for your tests? Or are you using the pre-compiled files? I have only tested using CW6.3 so there may be a new problem with CW7.

If you send me the binary files from yout boot and application I can load them to my board and see whether I can see what is going wrong.

Regards

Mark

Offline kourov

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Problem to download the bootloader
« Reply #10 on: June 18, 2008, 02:10:24 PM »
this is my binary file obtain with the application uTaskconvert.exe and the binary file before conversion.

Thanks for your help

kourov