Author Topic: Boot loader trouble  (Read 6944 times)

Offline marcelo_

  • Newbie
  • *
  • Posts: 25
    • View Profile
Boot loader trouble
« on: September 17, 2010, 10:29:30 PM »
Hi Mark
I'm playing with the boot loader. I'm using uTasker 1.4, and compiling with CW 7.2 on a M52259DEMO board.
I followed all steps from the documentation, but it seems that the boot loader never pass control to the application.
I double checked that
1) The boot loader, when defined  _M5225X then #defines UTASKER_APP_START      0x1000 ( uTaskerBootLoader.c line 63 ) so
2) In the app project, the target M5225X_BM_ROM uses the M5225X_BOOT_APP_FLASH.lcf, and it has the following directives
MEMORY
{
    flash   (RX)   : ORIGIN = 0x00001000, LENGTH = 0x0003F000
   vectorram(RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000400
   sram   (RWX)  : ORIGIN = 0x20000400, LENGTH = 0x00007C00       
   ipsbar  (RWX)  : ORIGIN = 0x40000000, LENGTH = 0x0
}

and is consistent with the boot loader #define
3) Also, I changed the uTaskerCombine command line in BM_Convert.bat so it takes into account the true address of the application.

After that, I flashed the bin combined result. It dont seems to work. The better test I have is to ping the board at its default IP address. Nothing happened.

Then, to try another way, I flashed at first the boot loader, then the application. This last step both ways: leaving the flash programmer alone, and telling it to "Restrict the address range" so it dont overwrite the boot loader.
All at no luck, the board never initializes the TCP stack.

Looking in uTaskerBootLoader.c for occurrences of UTASKER_APP_START, it seems that when defined _M5223X the macro is not acted upon, so no control transfer will occur.
How and where must be the code to control trasfer to happen?

TIA

Regards

Marcelo

Offline marcelo_

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Boot loader trouble
« Reply #1 on: September 21, 2010, 11:07:14 AM »
Hi!
I was struggling with the assembler modules, and found the culprit: it was a commented macro ( #define KIRIN3 ) in config.h line 54.
After that, the boot loader is working ok!
Thank you, Mark; overall, uTasker is a great job!
Regards
Marcelo

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Boot loader trouble
« Reply #2 on: September 21, 2010, 01:38:26 PM »
Hi Marcelo

I am glad that you managed to find the reason for the difficultly. Sorry that I didn't give any advise in the meantime, but I was a bit behind on answering posts.

Regards

Mark